[ITK] [ITK-users] CorrelationImageToImageMetricv4 returns 0 from GetValue()
Andrew Harris
aharr8 at uwo.ca
Thu Aug 25 07:53:47 EDT 2016
It's taking me longer than I thought it would to put a main function
together, so I thought I would get you some image data to look at. This is
a virtual phantom I generated, a white cube on a black background. The
second image is the same cube but rotated by 5 degrees in the X direction.
The .nfo files contain information about the image size and spacing. Let
me know if you find anything out, I'll keep working on getting you a simple
main function in case you need it.
Thanks again.
PhantomBox.nfo
<https://drive.google.com/file/d/0B_DYTA-i186ZVm1xUndWd0xPeE0/view?usp=drive_web>
PhantomBox.raw
<https://drive.google.com/file/d/0B_DYTA-i186ZSUFOVmk0cko0R3M/view?usp=drive_web>
PhantomBoxRotX2.nfo
<https://drive.google.com/file/d/0B_DYTA-i186ZZnBrNU9XbTVVY00/view?usp=drive_web>
PhantomBoxRotX2.raw
<https://drive.google.com/file/d/0B_DYTA-i186ZQmNhQkx2MzVFQXc/view?usp=drive_web>
--
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.*
On Tue, Aug 23, 2016 at 9:53 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
> 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/community/attachments/20160825/69368f08/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