[Insight-users] Problem with MultiResImageRegistration2.cxx: Doesn't work with rotation

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 21 12:43:05 EDT 2009


Hi Albert,


Nope,

There is *no way* that a 3D Affine registration will
work correctly if you feed it with 2D images.

I'm guessing that you are feeding 2D input images to
a 3D image reader, and therefore you end up with 3D
images that have a single slice.


They are therefore very thin in 3D space, and at the
first perturbation of the 3D terms (e.g a translation
in Z, or a rotation around X, or Y) then then overalp
of the images will be reduced to empty space of to
simply a line in 3D space.


You are trying to overlap two pieces of 2D paper in
a 3D space,... most of the time, they won't even
intersect at all.


So the big question is:


     Why would you want to register
     two 2D images in 3D space ??!!


Maybe you should give us more background on what your
real image processing application is intended to do...  :-)



     Thanks


        Luis



---------------------
Albert Gubern wrote:
> Hi again,
> 
> Thanks Luis your answer, it is working correctly in 2D.
> 
> Now I'm extending the code to 3D images. I modified the Dimension to 3 
> and the optimizer scales (9 for rotation and 3 for translation).
> 
> I test the code using the same images with the same command arguments 
> that you told me before and a new error appears before doing the 
> registration:
> 
> ##############################
> ####################
> 
> FixedImage schedule: [4, 4, 4]
> [2, 2, 2]
> [1, 1, 1]
> 
> MovingImage schedule: [4, 4, 4]
> [2, 2, 2]
> [1, 1, 1]
> 
> -------------------------------------
> MultiResolution Level : 0
> 
> ExceptionObject caught !
> 
> itk::ExceptionObject (0100FDF4)
> Location: "void __thiscall 
> itk::MattesMutualInformationImageToImageMetric<class 
> itk::Image<float,3>,class itk::Image<floa
> t,3> >::GetValueAndDerivative(const class itk::Array<double> &,double 
> &,class itk::Array<double> &) const"
> File: 
> c:\bert\itk_vtk\src\itk\insighttoolkit-3.12.0\code\algorithms\itkMattesMutualInformationImageToImageMetric.txx
> Line: 1138
> Description: itk::ERROR: 
> MattesMutualInformationImageToImageMetric(014A27B8): Joint PDF summed to 
> zero
> 
> #######################################
> 
> I thought that the error is produced because I'm working with 2d images, 
> but the registration works if the number of levels of the 
> multiresolution registration is 1. Can the 3d registration work with 2d 
> images? I know that with Mean Squares metric it isn't possible but this 
> problem shouldn't appear with Mattes Mutual information metric because 
> it works with histograms...
> 
> However, I test it with 3d images (the same 2d images of the brain 
> repeated 4 times) and the error appear when the number of levels are 4 
> (works correctly with 1,2 and 3 levels). Also I've worked with different 
> percentage of samples (from 20% to 100%) and number of bins (32 and 128) 
> and the error continues appearing.
> 
> I read in 
> http://www.itk.org/pipermail/insight-users/2009-February/028917.html 
> that it could be caused by something missed, but I think I do all the 
> necessary changes to do the 3D registration.
> 
> What could the mistake be? Working with 2d images? Something missed?
> 
> Thanks in advance,
> 
> Albert
> 
> PD: I can't attach the code without exceeding the size limit.
> 
> 


More information about the Insight-users mailing list