[Insight-users] Mutual Information Error

Luis Ibanez luis.ibanez at kitware.com
Sun Jun 5 22:02:01 EDT 2005


Hi Jordan,

The most likely cause is that you are not providing a
good initialization for the Affine Transform.

You probably want to use the CenteredTransformInitializer
as described in the ITK Software Guide

       http://www.itk.org/ItkSoftwareGuide.pdf



Regards,


     Luis



---------------------
Jordan Soet wrote:

> Well, I thought I had fixed my problem, but it looks like I didn't..
> 
> 
> After my last e-mail where I mentioned that I got the error message even 
> if I set the fixed and moving image to the same image I started looking 
> to see if maybe it was something to do with the random number generator, 
> and through looking through the mailing list I realized that I hadn't 
> initialized the seed. So, I added metric->ReinitializeSeed() and it 
> seemed to fix my problem, I could get ImageRegistration11 working on 3D 
> images.
> 
> However, ImageRegistration11 only uses a translation transform, so I 
> changed it to an affine transform and the problem came back. I again got 
> the message "Too many samples map outside moving image buffer: 0 / 
> 10000". I then tried changing it back to 2D while still using an affine 
> transform and it worked fine. I then tried using 
> MultiResImageRegistration2 and changing it to 3D, since it already uses 
> an affine transform, and would remove the possibility that I was making 
> errors with the transform, but again, it worked on 2D images but when I 
> moved to 3D images it gave me the exception. Also, I tried these all 
> using the same image for both inputs, as well.
> 
> In addition, I also tried testing my random number generator by building 
> itkImageRandomIteratorTest, as suggested in another e-mail, but I got 
> the following error:
> 
> Building executable /home/Jordan/Test/itkImageRandomIteratorTest.exe...
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../libcygwin.a(libcmain.o)(.text+0xb 
> 
> 3): undefined reference to `_WinMain at 16'
> collect2: ld returned 1 exit status
> make: *** [/home/Jordan/Test/itkImageRandomIteratorTest.exe] Error 1
> 
> 
> Thanks in advance for any advice,
> Jordan
> 
> 
> 
> 
> 
> Luis Ibanez wrote:
> 
>>
>> Hi Jordan,
>>
>>
>> This message is typically produced when the Transform is such that
>> the Moving image is mapped outside the extent of the Fixed image.
>>
>> The lack of overlap between the Fixed image and the mapped Moving
>> image makes impossible to compute the Metric, and therefore an
>> Exception is thrown.
>>
>>
>> Please post to the list the characteristics of your two images.
>>
>>      - Number of pixels along each dimension
>>      - Pixel spacing
>>      - Origin
>>
>>
>>
>> You can get spacing and origing very easily by just invoking
>>
>>
>>      fixedImageReader->GetOutput()->Print( std::cout );
>>      movingImageReader->GetOutput()->Print( std::cout );
>>
>>    [after having invoked the Update() methods of the readers]
>>
>>
>>
>>
>> It is very likely that the origin of your images is such that
>> initializing the Transform as an Identity is not appropriate.
>>
>>
>>
>> In that case, you may want to use the Transform Initializer, as
>> illustrated in the ITK Software Guide
>>
>>
>>          http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>
>> Chapter 8,
>>
>>
>>
>>    Regards,
>>
>>
>>
>>        Luis
>>
>>
>>
>> --------------------------
>> Jordan Soet wrote:
>>
>>> I'm working the mutual information metric on 3D ultrasound images, 
>>> and as a quick test I tried using ImageRegistration11 on it with the 
>>> dimension changed to 3 (and the parameters for the transform changed 
>>> as well). However, when I try and run it I get the following error:
>>>
>>> $ ./ImageRegistration11.exe I0000005.hdr I0000006.hdr
>>> ExceptionObject caught !
>>>
>>> itk::ExceptionObject (0xa05c370)
>>> Location: "Unknown"
>>> File: 
>>> /home/Jordan/InsightToolkit-2.0.1/Code/Algorithms/itkMattesMutualInformationImageToImageMetric.txx 
>>>
>>> Line: 623
>>> Description: itk::ERROR: 
>>> MattesMutualInformationImageToImageMetric(0xa0528a0): Too many 
>>> samples map outside moving image buffer: 0 / 10000
>>>
>>> I'd guess that it's something to do with the regions, however, the 
>>> images are the same size, and I didn't change anything from the 
>>> example, so I don't know what the matter is... Does anyone know what 
>>> the problem is?
>>>
>>>
>>> Thanks,
>>>
>>> Jordan
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>>
>>
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 





More information about the Insight-users mailing list