[Insight-users] NormalizedMutualInformationMetric

Giorgos Pichis gpichis at gmail.com
Sun May 11 11:41:35 EDT 2008


Hi,
I made some changes to the code,
and it seems as it is having better results,
but they are still far from the optimum.

I am using the BrainProtonDensitySlice.png  and
BrainProtonDensitySliceR10X13Y17S12.png from
the examples data to test the algorithm.

As far as the metric parameters are concerned , I did the following changes:
//////////////////////
  const unsigned int numberOfParameters =
transform->GetNumberOfParameters();

  typedef MetricType::ScalesType ScalesType;
  ScalesType scales( numberOfParameters );
double t_scale;
double center_scale;
  //scales.Fill( 1.0 );
    std::cout<<" enter center_scale : ";
  std::cin>>center_scale;
  std::cout<<" enter t_scale : ";
  std::cin>>t_scale;
  std::cout<<" enter scales[0] : "; //scaling
  std::cin>>scales[0];

  std::cout<<" enter scales[1] : "; //angle
  std::cin>>scales[1];

  //const double t_scale=0.1; //translation scale
  //scales[0] =  10.0;
  //scales[1] =  1.0;
  scales[2] =  center_scale;
  scales[3] =  center_scale;
  scales[4] =  t_scale;
  scales[5] =  t_scale;


  metric->SetDerivativeStepLengthScales(scales);
  metric->SetDerivativeStepLength(1.0);

/////////
... and had some relatively (to the previous ones) good results, using:
center_scale :10000,
t_scale: 0.1
scale[0] :0.1  //for scaling
scale[1] :1  //for the angle

Also the optimizer setting where changes to:


  typedef OptimizerType::ScalesType       OptimizerScalesType;
  OptimizerScalesType optimizerScales( transform->GetNumberOfParameters() );
  const double translationScale = 1.0 / 100.0;
  const double centerScale =1.0/100.0;

  optimizerScales[0] = 10.0;
  optimizerScales[1] =  1.0;
  optimizerScales[2] =  centerScale;
  optimizerScales[3] =  centerScale;
  optimizerScales[4] =  translationScale;
  optimizerScales[5] =  translationScale;

  optimizer->SetScales( optimizerScales );

  double steplength = 1.0;

  if( argc > 9 )
    {
    steplength = atof( argv[9] );
    }
  optimizer->SetMaximumStepLength( steplength );
  optimizer->SetMinimumStepLength( 0.00001 );
  optimizer->SetNumberOfIterations( 500 );
 optimizer->MaximizeOn(); //change
.... using step lenght=0.5
The algorithm exited, at iteration number 70,
with
Scale 1.00275
Angle (radians) -0.160493
Angle (degrees) -9.19556
Center X = 90.318
Center Y = 108.849
Translation X=15.2579
Translation Y= 15.4322
Metric Value= 1.07114

Can I get some help , on what further changes should I do,
in order to get better results?
I had almost optimum results working with Mattes MI,
Scale 0.832628
Angle (radians) -0.174455
Angle (degrees) -9.99554
Center X = 87.1628
Center Y = 107.813
Translation X=7.37987
Translation Y= 8.52768
Metric Value= -1.42415,
but I want to get familiar and work with NMI.
What changes to the scales parameters, should I do?

Thanks in advance,
Giorgos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080511/6e4d14ff/attachment.htm>


More information about the Insight-users mailing list