Code covered by the BSD License  

Highlights from
InSPIRE: optimizers and set ITK option Matlab wrap

InSPIRE: optimizers and set ITK option Matlab wrap



Uses optitool (matlab), gridsearch, random gridsearch for 2D image registration.

%InSPIRE: metric for optimization
%Rex Cheung MD, PhD P&S Columbia University '97
%Do email or call 215-287-2501 if you have comments
%This m-script calculates the metric of each iteration
%Could use other ITK metric.
%2012 winter at Mainline, PA.
function metric = imgreg2d2(param)
%param = write x into paramfile.dat 
save paramfile.txt param -ASCII;

% copy the moving image to temp image because it will be destroyed
% needs paramfile.txt
% fixedimage.png and movingimage.png
% calculate mutual information
[r s]=system('MattesMI fixedimage.png output.png');

% %write output.png back to movingimage.png for next iteration
metric = a;

Contact us