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

Albert Gubern bertkrek at gmail.com
Sun Mar 22 10:47:04 EDT 2009


Hi Luis,

I was only trying to test the application. I already thought that it
wouldn't work, but I thought and I don't understand yet why if I create my
own 3d images the registration doesn't work with 4 levels of multiresultion.
Is the error "Joint PDF summed to zero" caused because in the 4th level the
registration doesn't have enough pixels?

My 3d images are composed by the slices used in 2D test copied 4 times. In
that way I have a 3d brain image in the center as a fixed (the same slice
repeated 4times), and all the slices of the moving are the same brain with
the same rotation and translation. So, each slice overlaps each other in
both volumes, and because of this I think it should work.

Is it only caused because the size of the images is not big enough to work
with 4 multiresolution levels or is another problem?

My goal is the registration of two prostates MRI of differents patients in
order to build an atlas.


Thanks!

Albert


2009/3/21 Luis Ibanez <luis.ibanez at kitware.com>

>
> 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.
>>
>>
>>


-- 
Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090322/d233f379/attachment-0001.htm>


More information about the Insight-users mailing list