Code covered by the BSD License  

Highlights from
3D Free Form Image Registration Toolbox (GUI)

image thumbnail
from 3D Free Form Image Registration Toolbox (GUI) by Daniel Markel
A toolbox for performing image registrations on 4D RTOG files or any other volumetric image.

disttrans(coords,size)
function distance = disttrans(coords,size)

distance = zeros(size);

for m = 1:size(1)
    for n = 1:size(2)
        distances = sqrt((coords(:,2)-m +1).^2 + (coords(:,1)-n +1).^2);
        distance(m,n) = min(distances);
    end
end

Contact us at files@mathworks.com