[Insight-users] Error with MutualInformationHistogramImageToImageMetric

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 12 21:19:07 EDT 2007


Hi Rosario,

Thanks for the detailed description of your problem.

The combination of registration components that you
are using looks fine.

You are also guessing correctly that the problem is
probably related to the initialization.


A couple of questions:


1) How many iterations of the optimizer do you see
    with the Observer before the Exception is thrown ?


2) I see that in the translation scales you are not
    taking into account the spacing and number of
    pixels of your images. It is usually wise to do
    so because in that way you can be sure that the
    translation scaling really correspond to the
    physical extent of your images.

    What are the number of pixels of your images,
    and what are their pixel spacings ?


3) What mode of the CenteredTransformInitializer are
    you using:  Geometry ? or Moments ?


4) The value 0.2 as initial maximum step is a bit
    large. Note that since the parameter scaling
    for the Versor (unit quaternion) components of
    the transform is 1.0, that means that your first
    jump in the parametric space is going to be of
    11 degrees in rotation. You may want to start
    with a smaller amount, maybe something like just
    1 degree or rotation, which should be a step of
    0.02.



Please let us know,


   Thanks


     Luis




=====================
Rosario Sance wrote:
> 
> Hi all,
> 
> My question is regarding to a particular implementation of a 
> Registration algorithm I have just tried without success.
> Firstly I checked the example " ImageRegistration8.cxx", in which the 
> use of the " itkVersorRigid3DTransform" is illustrated, and it worked.
> Then I did the same with the example " 
> ImageRegistrationHistogramPlotter.cxx", which deals with the " 
> MutualInformationHistogramImageToImageMetric", and also worked properly 
> with my images. (Since they are 3D volumes I did the required changes 
> and I had no problems at all).
> 
> However, when I tried to create a new algorithm with the elements:
> 
> TRANSFORM: itkVersorRigid3DTransform (with the 
> itkCenteredTransformInitializer)
> OPTIMIZER: itkVersorRigid3DTransformOptimizer
> METRIC: MutualInformationHistogramImageToImageMetric
> INTERPOLATOR: itkLinearInterpolateImageFunction
> 
> The code was properly built but I achieved a permanent error in execution:
> 
> /ExceptionObject caught !
> 
> itk::ExceptionObject (013CF7FC)
> Location: "void __thiscall itk::HistogramImageToImageMetric<class 
> itk::Image<float,3>,class itk::Image<float,3> >::ComputeHistogram(const 
> class itk::Array<double> &,class 
> itk::Statistics::Histogram<double,2,class 
> itk::Statistics::DenseFrequencyContainer> &) const"
> File: 
> c:\itk\insighttoolkit-3.2.0\code\algorithms\itkHistogramImageToImageMetric.txx
> Line: 303
> Description: itk::ERROR: 
> MutualInformationHistogramImageToImageMetric(018A50D8): All the points 
> mapped to outside of the moving image
> 
> /I guessed that the problem came from the initialization of the Optimizer:
> 
>   /typedef/ / OptimizerType::ScalesType       OptimizerScalesType;
>   OptimizerScalesType optimizerScales( transform->GetNumberOfParameters() );
>   const double translationScale = 1.0 / 1000.0;
> 
>   optimizerScales[0] = 1.0;
>   optimizerScales[1] = 1.0;
>   optimizerScales[2] = 1.0;
>   optimizerScales[3] = translationScale;
>   optimizerScales[4] = translationScale;
>   optimizerScales[5] = translationScale;
> 
>   optimizer->SetScales( optimizerScales );
> 
>   optimizer->SetMaximumStepLength( 0.2000  );
>   optimizer->SetMinimumStepLength( 0.0001 );
> 
>   optimizer->SetNumberOfIterations( 200 );
> 
> 
> /but I was playing with it and I couldn't avoid the fail... The same 
> with the initialization of the transform:
> 
> / / /typedef itk::CenteredTransformInitializer< TransformType,
>                                              FixedImageType,
>                                              MovingImageType
>                                                  >  
> TransformInitializerType;
> 
>   TransformInitializerType::Pointer initializer =
>                                           TransformInitializerType::New();
> (/...)
> 
> I have tried it with different images (different sizes and resolution). 
> All of them are MRI dynamic studies of the abdominal region (3D volumes 
> on time). I'd really like to know what's happening with my piece of 
> code. *Is there any specific limitation for mixing those elements in a 
> new algorithm?
> 
> *Thank you very much in advance.
> Rosario
> 
> ___________________________________________________
> 
> Rosario Sance Garzón
> Grupo de Tecnologías de Imagen Biomédica
> Dpto. Ingeniería Electrónica
> E.T.S.I. Telecomunicación - UPM
> Ciudad Universitaria
> 28040 - Madrid
> 
> Teléfono: 91 549 57 00 (Ext. 4220) 
> Fax:        91 336 73 23
> Web:       http://www.die.upm.es/im
> ___________________________________________________
> 
> /Rosario Sance Garzón
> Biomedical Image Techologies
> Electronic Engineering Department
> E.T.S.I. Telecomunicación - UPM
> Ciudad Universitaria
> E-28040 - Madrid (SPAIN)
> 
> //Telephone: +34 91 549 57 00 (Ext. 4220) 
> Fax:        +34 91 336 73 23
> Web:       http://www.die.upm.es/im
> / ___________________________________________________
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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