[ITK-users] Fwd: Metric Evaluation

suneeza hanif suneezahanif02 at gmail.com
Wed Jan 6 11:59:57 EST 2016


Hello Matt,

Thank you for your reply.

I am doing like this:

transform->SetParameters(
registration->GetOutput()->Get()->GetParameters());
TranslationTransformType::ParametersType
initialParameters(transform->GetNumberOfParameters() );
initialParameters[0] = 0;
initialParameters[1] = FixedCenterX;
initialParameters[2] = FixedCenterY;
initialParameters[3] = 0;
initialParameters[5] = 0;
transform->SetFixedParameters(initialParameters);
        metric->SetTransform(transform);
metric->SetFixedImage( fixedImageReader->GetOutput() );
metric->SetMovingImage(movingImageReader->GetOutput() );
        metric->Initialize();
        metric->GetValue();

But still I get different value for metric.

Best Regards,
Suneeza


On Wed, Jan 6, 2016 at 4:24 AM, Matt McCormick <matt.mccormick at kitware.com
<javascript:_e(%7B%7D,'cvml','matt.mccormick at kitware.com');>> wrote:

> Hi Suneeza,
>
> When transferring the parameters to your metric computation, are you
> also re-using the FixedParameters (center of rotation) in addition to
> the optimized Parameters (rotation angle and translation)?
>
> HTH,
> Matt
>
> On Fri, Jan 1, 2016 at 5:17 PM, suneeza hanif <suneezahanif02 at gmail.com
> <javascript:_e(%7B%7D,'cvml','suneezahanif02 at gmail.com');>> wrote:
> > Hello Everyone,
> >
> > I need help regarding metric calculation. When I run registration
> algorithm
> > and use final results(e.g. rotation angle and translation) to calculate
> > metric once again at the end of process I get different value as
> compared to
> > the value of metric evaluated in last iteration. I am using same metric
> for
> > registration and later.
> >
> > I also did this after one iteration but i still i get different values.
> >
> > Does anyone know how to solve this problem?
> >
> > Thanks in advance.
> >
> > Best Regards,
> > Suneeza
> >
> > _____________________________________
> > 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/insight-users/attachments/20160106/5da3d158/attachment.html>


More information about the Insight-users mailing list