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

Luis Ibanez luis.ibanez at kitware.com
Sat Feb 7 12:34:15 EST 2009


Hi Baoyun,

   The "nan's" in the set of parameters are a bad sign  :-/

Given that the MultiResImageRegistration2.cxx example is
a 2D example, and you modified it to be a 3D example, the
main suspect here is that you may have missed to update
part of the code to be 3D.

For example, you may have missed to exted the optimizer
scales in line 340-349.

Could you please post to the list your modified version
of MultiResImageRegistration2.cxx ?


     Thanks


        Luis



--------------------
Baoyun Li wrote:
> <mailto:insight-users at itk.org> 
> 
>  
> 
> 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
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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