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: control points based warping
%Rex Cheung MD, PhD P&S Columbia University '97
%Do email or call 215-287-2501 if you have comments
%This m-script set the input file names and output file names
%for ITK warping.
%2002 winter at Mainline, PA.
%Could use other ITK landmark-based warping.
%Get fixedimage and movingimage from my other postings
function result = landmarktransform2d(options)
%modified from anneal.m (downloaded from Matlab Central by another author)

defaultoptions = struct(...
        'movingimage', 'movingimage.png',...
        'defmovingimage', 'defmovingimage.png');

% Check input
if ~nargin %user wants default options, give it and stop
     options = defaultoptions;
elseif nargin<2, %user gave only objective function, throw error
    error('MATLAB:anneal:noParent','You need to input a first guess.');
elseif nargin<3, %user gave no options structure, use default
else %user gave all input, check if options structure is complete
    if ~isstruct(options)
            'Input argument ''options'' is not a structure')
    fields = {'landmarks',...
    for nm=1:length(fields)
        if ~isfield(options,fields{nm}), options.(fields{nm}) = def.(fields{nm}); end

% main settings
landmarks = options.landmarks;
fixedimage = options.fixedimage;      
movingimage = options.movingimage;        
defmovingimage = options.defmovingiamge;  

result= system('LandmarkWarping2 landmarks fixedimage movingimage defimage')

Contact us