[Insight-users] Optimizer reproducibility
Marius Staring
marius at isi.uu.nl
Wed Apr 6 10:23:53 EDT 2005
Hi Jan,
do not be frightened!
The MattesMutualInformationMetric you use, uses a sample container to
store a subset of all the image samples. All calculations for the GetValue
and GetDerivative and GetValueAndDerivative are based on these
values in the sample container.
When restarting your application you probably use the same seed every time,
thus getting the same sample set. When not restarting it, you continue with
new samples.
Regards,
Marius Staring
Jan Schreiber wrote:
>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
>
>
>
--
Marius Staring
Image Sciences Institute
University Medical Centre Utrecht
Heidelberglaan 100, 3584 CX Utrecht, The Netherlands
phone: +31 (0)30 250 3186, fax: +31 (0)30 251 3399
marius at isi.uu.nl, http://www.isi.uu.nl/People/Marius
More information about the Insight-users
mailing list