[Insight-users] Mattes Information Metric

Cory Quammen cquammen at cs.unc.edu
Thu Oct 28 22:38:18 EDT 2010


Ken,

When you call GetValue(), the argument you give it is passed to the
transform, and the metric is computed over the transformed moving
image. If you don't want a transformation on your un-moving image,
simply set the transform for the metric to an IdentityTransform. Then
simply pass GetValue() a variable of type
IdentityTransform::ParametersType. You shouldn't need to initialize
the ParametersType variable (it should be a zero-length vector).

The code should look something like

typedef MattesMutualInformationImageToImageMetric< TFixedImageType,
TMovingImageType > MetricType;

MetricType::Pointer metric = MetricType::New();

typedef IdentityTransform<..., ...> IdentityTransformType;
IdentityTransformType::Pointer transform = IdentityTransformType::New();
metric->SetTransform(transform);

MetricType::ParametersType params;
double value = metric->GetValue(params);

For what it's worth, there is (I think) an effort underway to separate
the transforms from the metrics in ITK v4, which should let you call a
parameter-less GetValue() method and avoid this complication
altogether.

Hope that helps,
Cory

On Thu, Oct 28, 2010 at 5:56 PM, Ken Urish <ken.urish at gmail.com> wrote:
> Simple question but Im getting lost in the code
>
> Given two images I want to calculate the Mattes Mutual Information
> Metric outside of the registration framework. This is easy during
> registration as you just need "optimizer->GetValue()". However, I dont
> want any transforms or optimizers involved and simply want to call the
> metric value directly from:
> itkMattesMutualInformationImageToImageMetric given two images. The
> GetValue in MattessMutualInformationMetric macro needs a ParameterType
> and Im stuck looking through the code what this is?
>
> Thanks
> --Ken--
> _____________________________________
> 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.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>



-- 
Cory Quammen
Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen


More information about the Insight-users mailing list