File Exchange

image thumbnail

InSPIRE utility to deform a 3D image

version 1.0.0.0 (3.73 KB) by Rex Cheung
My challenge paper listed on my profile relies on reducing a multi-modal to mono-modal def reg.

1 Download

Updated 26 Apr 2012

View License

The algorithm of Demons involves:
1. find the difference at each voxel position using the fixed image as the reference, the delta=movingimage -fixedimage (3D, minus in matlab does it element by element by default)
2. Once it is established the location where the local deformation occur (i.e. there is more intensity than expected by using the fixed image reference), calculate the downhill grad in x-, y- and z-directions, get the resultant downhill
gradient (this os the steepest slope to decent the hill i.e. how a stream will flow down a hill).
3. this direction is that of a 'stream' flowing at right angle to the contours of the 'energy' (L2 normal in this case) hill, use a step factor to multiply this to get the actual actionable stepX (in x-, y- and z-directions) size.
4. then simply compute the new voxel position by taking a step for each voxel.
5. simply assign the intensity of the movingimage at (newX, newY, newZ) as that at this same coordinate on the fixedimage.
6. repeat until reach the max number of allowed iterations or a stopping criterion.

%Intuitive interpretation of Demons: In the above algorithm, Demons could be seen as a
%force pushing the contour of iso-intensity out (like the riddles created
%by throwing a stone into the pond). Eventually, the energy (i.e. the square
%of the difference) is dissipated by repeatedly calculating the delta energy and smoothing
%the delta.
%
%In this interpretation, the symmetric force in symmetric force
%Demons implementation is more of a computational divice than having a
%physical interpretation.

Cite As

Rex Cheung (2020). InSPIRE utility to deform a 3D image (https://www.mathworks.com/matlabcentral/fileexchange/36401-inspire-utility-to-deform-a-3d-image), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux