[Insight-users] Optimizer reproducibility

Blezek, Daniel J (Research) blezek at crd.ge.com
Wed Apr 6 10:21:02 EDT 2005


Jan,  The Mattes MI metric uses the random number generator, which may not be identically initialized.  If you make a call to:

vnl_sample_reseed(12345);

before running the registration you will be fine and get the behavior you desire.  If you run across platforms/compilers, the random number generator is more or less random and generates different sequences, even from the same seed.

-dan

-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of Jan Schreiber
Sent: Wednesday, April 06, 2005 10:10 AM
To: insight-users at itk.org
Subject: [Insight-users] Optimizer reproducibility


Hi, 

for the registration of 2d x-ray images, I am using a combination of

  itk::CenteredAffineTransform< double, 2 > TransformType;
  itk::RegularStepGradientDescentOptimizer       OptimizerType;
  itk::LinearInterpolateImageFunction< MovingImageType, double >
InterpolatorType;
  itk::MultiResolutionImageRegistrationMethod< FixedImageType,
MovingImageType > RegistrationType;
  itk::RecursiveMultiResolutionPyramidImageFilter< FixedImageType,
FixedImageType > FixedImagePyramidType;
  itk::RecursiveMultiResolutionPyramidImageFilter< MovingImageType,
MovingImageType > MovingImagePyramidType;
  itk::MattesMutualInformationImageToImageMetric< FixedImageType,
MovingImageType > MetricType;
  itk::ImageMaskSpatialObject<2> MaskType;

Strangely, I get different results when performing the registration
several times. 

More in detail:
* When starting the application and executing the registration process,
restarting the application and doing the registration again, produces
the same results. *fine*

* When starting the registration, executing the registration and
executing it again without a restart, I get different results.
*frightening*

-> Having not initialized everything?
I wrote a little test program, that instantiates and loads the images,
instantiates my registration class and executes the registration -
several times. Every time, the images and registration are instantiated
with ::New() and the images are freshly loaded - I get different
results. *frustrating*

Can anyone explain that?
Is it a subject of optimizer initialization? - Can I influence it?
The metric value of the first registration is not the smallest - so it
seams to be a local minimum only...

I would be very glad for any hints to get a reproducible registration
with a more reliable minimum found by the optimizer. 

Thanks in advance, 
Jan

P.S.: the Doxygen Documentation
http://www.itk.org/Doxygen16/html/classitk_1_1MattesMutualInformationImageToImageMetric.html
tells in the detailed description, that "The method GetValue() computes
of the mutual information..." but the ItkSoftwareGuide-2-0-0 says that
the MattesMutualInformationImageToImageMetric "computes the negative
mutual information"... 

_______________________________________________
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