[ITK-users] [ITK] CorrelationImageToImageMetricv4 returns 0 from GetValue()
Dženan Zukić
dzenanz at gmail.com
Tue Aug 23 09:53:45 EDT 2016
Hi Andrew,
you are doing so many things in a nonstandard way, starting with passing
around pointers to buffers and metadata as plain parameters, instead of
just once converting to itk::Image and then using itk::Image::Pointer to
pass the images around. Your approach is more prone to errors.
Can you provide the inputs and the main function which invokes this class
to have a runnable example? I will try to find the problem.
Regards,
Dženan
On Mon, Aug 22, 2016 at 3:25 PM, Andrew Harris <aharr8 at uwo.ca> wrote:
> Hello all,
> I am having a devil of a time setting up the CorrelationImageToImageMetricv4
> and getting a result that makes sense. I have written an observer that
> outputs to a text file the iteration number, correlation value, and current
> position. I have generated a virtual phantom image of a white cube on a
> black background, and when I put the same image through for fixed and
> moving images, I get [0,0,0,0,0,0], meaning that no rotation or translation
> is required for the images to be aligned. This is the correct versor and
> vector transform, and if I apply a translation the correct distance values
> are returned to have the images align, however the metric value returned is
> also 0 and a perfect registration like this should yield a metric of -1
> according to the documentation. Additionally, it doesn’t seem to be
> analyzing rotation properly, as when I introduce a rotation around any axis
> the metric returns a translation on the other two axes but the rotation
> versor remains at zero.
>
> I’m attaching my code as well, it’s possible I’ve not set some parameters
> up properly:
>
>
> --
>
> AH
>
>
> ------------------------------------------------------------
> -----------------------------------
>
> *This email and any attachments thereto may contain private,
> confidential, and privileged materials for the sole use of the intended
> recipient. Any reviewing, copying, or distribution of this email (or any
> attachments thereto) by other than the intended recipient is strictly
> prohibited. If you are not the intended recipient, please contact the
> sender immediately and permanently destroy this email and any attachments
> thereto.*
>
> _____________________________________
> 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/20160823/64204821/attachment.html>
More information about the Insight-users
mailing list