[ITK-users] MutualInformationImageToImageMetric without transformation

jan jan.bergmeier at imes.uni-hannover.de
Fri Aug 29 09:10:41 EDT 2014


Thanks Matt,

this example was exactly what I was searching in the first place.

My new minimal version is now this:

    typedef itk::MutualInformationImageToImageMetric< UChar2DImageType,
UChar2DImageType > MetricType;
    typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double >
InterpolatorType;
    typedef itk::IdentityTransform< double, 2 > TransformType;

    MetricType::Pointer metric = MetricType::New();
    TransformType::Pointer transform = TransformType::New();
    InterpolatorType::Pointer interpolator = InterpolatorType::New();

    metric->SetFixedImage( fixedImage );
    metric->SetMovingImage( movingImage );
    metric->SetFixedImageRegion( fixedImage->GetLargestPossibleRegion() );
    metric->SetTransform( transform );
    metric->SetInterpolator( interpolator );
    metric->SetNumberOfSpatialSamples( 1000 );

    metric->Initialize();
    double mutualInformation = metric->GetValue( transform->GetParameters()
);

Regards,
Jan



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586146.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list