[ITK] [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.
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
    
    
More information about the Community
mailing list