[Insight-users] Re: MultiResPyramid & Euler

Luis Ibanez luis.ibanez at kitware.com
Sun Dec 12 14:36:58 EST 2004



Hi Muhamad,


The Mutual Information metric is computed by taking some sample
pixels from the fixed image and mapping their positions to the
moving image.

When transform relating both image is too far from the optimal,
it is common to end up in a the situation where the overlap
between the two image is very small and therefore, the number of
samples from the fixed image that manage to get inside the moving
image is too small. At that point, this exception is thrown:

itk::ERROR: MattesMutualInformationImageToImageMetric(013DBA28):
Too many samples map outside moving image buffer: "


In other words, this happens because your transform is too far
off the optimal value.

What you should do is:

1) Provide a better initialization for your transform

2) Reduce the learning rate and/or step lenght of your optimizer

3) Fine tune the values of the scaling factors used in the
    transform parameters.



Regards,



    Luis




----------------------
Muhamad Amine wrote:

> Hi,
> 
>  
> 
> First I want to thank you for your help. I’ve been reading the sections 
> that you have suggested.
> 
> I’m at the point where I’m trying to use the MultiResPyramid filter to 
> do 2D transforms. I’m trying to incorporate the Euler2DTransform to 
> accomplish this. However, I’m getting the following error: Description: 
> itk::ERROR: MattesMutualInformationImageToImageMetric(013DBA28): Too 
> many samples map outside moving image buffer: 1646 / 10000
> 
>  
> 
> Could you perhaps explain what this means?
> 
>  
> 
> If you’d prefer me to send this out to the list, just let me know.
> 
>  
> 
> Your help is greatly appreciated.
> 
>  
> 
> Thanks
> 
>  
> 
> M. Amine
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Hi Muhamad,
> 
> Thanks for your additional information.
> 
> --
> 
> Yes, you can convert your RGB images to grayscale using any of the
> two methods described in the previous email. Then register them and
> take the transform parameters in order to resample the moving color
> images using the VectorResampleImageFilter.
> 
> You can do this with any of the registration examples of the ITK
> Software Guide, as well as with the code in InsightApplications for
> multiresolution images.
> 
> You are *strongly* encouraged to read from the ITK Software Guide
> 
>      http://www.itk.org/ItkSoftwareGuide.pdf 
> <http://abutek.com/exchweb/bin/redir.asp?URL=http://www.itk.org/ItkSoftwareGuide.pdf>
> 
> at a minimum, the following sections:
> 
> 
>     - Section on Geometrical Transformations
>     - Chapter on Image Registration
>     - Chapter on Image Adaptors
> 
> 
> 
> Please let us know if you encounter any problems in the implementation
> of your registration process.
> 
> 
>     Thanks
> 
> 
>        Luis
> 
> 
> 
> -----------------------
> Muhamad Amine wrote:
> 
>>  Hi Luis,
>>
>>  I basically have a set of low resolution images that are registered 
> (ie all
>>  lined up properly) and a set of the same images however they are high res
>>  and need to be registered to the low res to properly orient them.
>>
>>  They are in png format and are both color.
>>
>>  Is there a way to run a registration algorithm such as the
>>  MultiResolutionRegistration, get the translation parameters it spits out,
>>  and then transform the original images by those values?
>>
>>
>>  Thanks for your help.
>>
>>  Muhamad
>>
>>  -----Original Message-----
>>  From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
>>  Sent: Friday, December 03, 2004 4:31 PM
>>  To: Muhamad Amine
>>  Cc: Insight-users at itk.org
>>  Subject: Re: [Insight-users] Registration on RGB images
>>
>>
>>  Hi Muhamad,
>>
>>  Are your input images (Fixed and Moving) also RGB images ?
>>
>>  If so, you will have to define a Metric for comparing both
>>  images. Most ITK metrics work on Scalar images.
>>
>>  In order to get scalar images out of your input RGB images you
>>  could extract the red channel, or convert them to Luminance.
>>
>>  Filters are available in ITK for both conversions.
>>
>>  e.g. for Luminance:
>> 
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1RGBToLuminanceImageFilte 
> <http://abutek.com/exchweb/bin/redir.asp?URL=http://www.itk.org/Insight/Doxygen/html/classitk_1_1RGBToLuminanceImageFilte>
>>  r.html
>>
>>  for Channel extraction you will find details in the ImageAdaptors
>>  chapter in the ITK Software Guide
>>
>>       http://www.itk.org/ItkSoftwareGuide.pdf 
> <http://abutek.com/exchweb/bin/redir.asp?URL=http://www.itk.org/ItkSoftwareGuide.pdf>
>>
>>
>>
>>  Once you finish the registration, you can use the
>>  VectorResampleImageFilter
>>
>> 
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorResampleImageFilte 
> <http://abutek.com/exchweb/bin/redir.asp?URL=http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorResampleImageFilte>
>>  r.html
>>
>>  in order to resample in the input RGB image and generate
>>  an RGB image as output.
>>
>>
>>
>>  Please give us more details regarding the application that you
>>  are dealing with.
>>
>>
>>     Thanks
>>
>>
>>
>>         Luis
>>
>>
>>
>>  ----------------------
>>  Muhamad Amine wrote:
>>
>>
>> >Hi,
>> >
>> >What's the easiest way to run a registration example and have it output
>> >an RGB image rather than a BW image. I'm interested in running the
>> >MultiResImageRegistration1 and have it produce a color image. I tried
>> >changing the PixelType to itk::RGBPixel< unsigned char > and I'm running
>> >into compiling errors.
>> >
>> >If there is a simple example someone can point me to that would be fine.
>> >
>> >thanks
>> >
>> >~ma
>> >
>> >
>> >------------------------------------------------------------------------
>> >
>> >_______________________________________________
>> >Insight-users mailing list
>> >Insight-users at itk.org
>> >http://www.itk.org/mailman/listinfo/insight-users 
> <http://abutek.com/exchweb/bin/redir.asp?URL=http://www.itk.org/mailman/listinfo/insight-users>
>>
>>
>>
>>
>>
>>
> 
> 
>  
> 






More information about the Insight-users mailing list