[Insight-users] Problems with SetFixedImageMask, MattesMI, BSpline Transfo. and RegularStepGradientDescentOptimizer

Luis Ibanez luis.ibanez at kitware.com
Sun Jun 20 10:13:47 EDT 2010


Hi Serena,


Instead of :

 spatialObjectMask->SetImage( maskReader->GetOutput() );

metric->SetFixedImageMask( spatialObjectMask);


You should do:

        maskReader->Update();

 spatialObjectMask->SetImage( maskReader->GetOutput() );

metric->SetFixedImageMask( spatialObjectMask);



     Regards,


            Luis


-----------------------------------------------------------
On Wed, Jun 9, 2010 at 11:39 AM, sere f <serenaf33 at gmail.com> wrote:

> Hi All,
> I am registering CT and MRI of the brain with Bspline Transformation,
> Mattes-MI, RegularStepGradientDescentOptimizer.
> The registration works fine.
>
> But when I set:
>
>  spatialObjectMask->SetImage( maskReader->GetOutput() );
>
> metric->SetFixedImageMask( spatialObjectMask);
>
> The Registration ends with 0 iteration and I get this message:
>
> Optimizer stop condition = RegularStepGradientDescentOptimizer: Gradient
> magnitude tolerance met after 0 iterations. Gradient magnitude (0) is less
> than gradient magnitude tolerance (0.001).
>
> My mask is a binary image (0,255). Is it wrong?
> How can I register using a mask for Fixed Image?
> any idea?
>
> Thank you very much.
>
> Serena.
>
> _____________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100620/b805b930/attachment.htm>


More information about the Insight-users mailing list