[Insight-users] error when used multi resolution affine registration

Baoyun Li baoyun_li123 at yahoo.com
Mon Jan 26 10:25:19 EST 2009


 
 
Dear All:
 
I am trying to affine register two MR images by /MultiResImageRegistration2 in the ITK registration example.
 
But I got the below error message:
*****************************************
./MultiResImageRegistration2 target.hdr source1.hdr output.hdr
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
 
0   -0.737066   [1, 0, 0, 0, 1, 0, nan, nan, 1, 1.47236, -2.75363, -0.781408]  0
ExceptionObject caught !
 
itk::ExceptionObject (0xdf71480)
Location: "void itk::MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>::GetValueAndDerivative(const typename itk::ImageToImageMetric<TFixedImage, TMovingImage>::ParametersType&, typename itk::ImageToImageMetric<TFixedImage, TMovingImage>::MeasureType&, typename itk::ImageToImageMetric<TFixedImage, TMovingImage>::DerivativeType&) const [with TFixedImage = itk::Image<float, 3u>, TMovingImage = itk::Image<float, 3u>]" 
File: /home/gtao/tools/ITK/Source/Code/Algorithms/itkMattesMutualInformationImageToImageMetric.txx
Line: 1138
Description: itk::ERROR: MattesMutualInformationImageToImageMetric(0xc6b0930): Joint PDF summed to zero
 
The two images are all set by the middle of images as origin. And they look already affined together. Only need little change.
 
I have changed the following in the MultiResImageRegistration2.cxx to meet my need
 
1: const    unsigned int    Dimension = 3;
2: typedef  short int  PixelType;
3: metric->SetNumberOfSpatialSamples(5223360); 
Since my image are 3D volume. So I set the numberof spatial samples as the fraction of  the number of my fixed image voxels. I tried 0.1 percent, 0.2 percent and 0.8 percent. All get the same error.
 
Can somebody help me to figure our this problem.
 
 
Best regards
 
Baoyun


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090126/78ce0077/attachment.htm>


More information about the Insight-users mailing list