[Insight-users] Error with MutualInformationHistogramImageToImageMetric

Rosario Sance rsance at die.upm.es
Tue Jun 12 06:21:45 EDT 2007


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
___________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070612/d811aed7/attachment.htm


More information about the Insight-users mailing list