[ITK-users] [ITK] CorrelationImageToImageMetricv4 returns 0 from GetValue()
Andrew Harris
aharr8 at uwo.ca
Mon Aug 22 15:25:56 EDT 2016
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.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160822/3810b9d8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Correlator3D.cpp
Type: text/x-c++src
Size: 16036 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160822/3810b9d8/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Correlator3D.h
Type: text/x-chdr
Size: 4336 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160822/3810b9d8/attachment.h>
More information about the Insight-users
mailing list