[ITK] [ITK-users] initialize same metric object multiple times

Francois Budin francois.budin at kitware.com
Fri May 12 09:12:51 EDT 2017


Hello Fabio,

The "Initialize()" function in MattesMutualInformationImageToImageMetricv4
computes the lower and upper bound value that are used to compute the
histogram. If you change your fixed image, you should indeed call it again
as the bounding values may have changed.

Hope this helps,
Francois

On Fri, May 12, 2017 at 8:26 AM, D'Isidoro Fabio <fisidoro at ethz.ch> wrote:

> Hallo,
>
>
>
> is it possible to initialize the same metric object multiple times (i.e.
> 50 times), with different fixed images and/or different masks?
>
>
>
> For example:
>
>
>
> metric  = MattesMutualInformationImageToImageMetricv4[ImageType,
> ImageType].New()
>
> metric.SetTransform(identityTransform)
>
> metric.SetFixedImage( FixedImage1 )
>
> metric.SetFixedImageMask(spatialObjectMask1 )
>
> metric.SetMovingImage(MovingImage)
>
> metric.Initialize()
>
> metric.GetValue()
>
>>
>>
> metric.SetFixedImage( FixedImage2 )
>
> metric.SetFixedImageMask(spatialObjectMask2 )
>
> metric.Initialize()
>
> metric.GetValue()
>
>>
>>
> metric.SetFixedImage( FixedImage3 )
>
> metric.SetFixedImageMask(spatialObjectMask3 )
>
> metric.Initialize()
>
> metric.GetValue()
>
>
>
>
>
> I read on the manual that “initialize() is for one-time initialization”,
> but I m not sure what that means.
>
>
>
> Thank you,
>
> Fabio.
>
>
>
> _____________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170512/22bf4ddb/attachment.html>
-------------- next part --------------
_____________________________________
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