[ITK] [ITK-dev] Problem with ImageRegistrationMethodv4 and setting the VirtualDomain

Nicholas Tustison ntustison at gmail.com
Fri Oct 28 11:48:43 EDT 2016


Hi Brad,

Thanks for looking into this.  Although specific components of the registration
framework were designed to work with a generic virtual domain image (such 
as the similarity metrics), that’s not the case for the framework in it’s entirety. 
When we wrote the image registration methods, we hard-coded various 
choices such as the use of the fixed image as the virtual domain image.  More
work would be required to generalize this.

Nick


> On Oct 28, 2016, at 7:46 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <blowekamp at mail.nih.gov> wrote:
> 
> Hi!
> 
> I am trying to add the VirtualDomain as an option to the SimpleITK ImageRegistrationMethod. I have does so here [1].
> 
> This method for setting the virtual domain follows the SimpleImageRegistrationTest / Example by setting the VirtualDomain on the Metric[2].
> 
> The test created in SimpleITK registers two gaussian blobs with a translation transform. The fixed image has it’s origin set to (5,100), and the FixedInitalTransform is set to a translation transform with the same 5,100 offset. This should map the 0-origined virtual domain to the same index on the fixed image, to essentially be an identity translation between then virtual domain and the fixed image when the origin and transform is take into consideration. This test fails with the following error:
> 
> MeanSquaresImageToImageMetricv4 (0x66f8930): No valid points were found during metric evaluation. For image metrics, verify that the images overlap appropriately. For instance, you can align the image centers by translation. For point-set metrics, verify that the fixed points, once transformed into the virtual domain space, actually lie within the virtual domain.
> 
> This is an indication the transforms are not being applied as I expect. My expectation of how the transforms should be applied here [3].
> 
> Digging into the code, I see that the ImageRegistrationMethod always sets the VirtualDomain here [4], to the FixedImage. This clobbers the value set directly to the Metric as in the example/test[2]. Hacking the code to use the GetCurrentLevelVirtualDomainImage() does get my one case to work.
> 
> Suggestions on how to correct this issue, or a patch are welcomed!
> 
> Thanks,
> Brad
> 
> 
> [1] http://review.source.kitware.com/#/c/21540/2 <http://review.source.kitware.com/#/c/21540/2>
> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx#L162 <https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx#L162>
> [3] http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/61_Registration_Introduction_Continued.html#Version-1.1 <http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/61_Registration_Introduction_Continued.html#Version-1.1>
> [4] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx#L409-L415 <https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx#L409-L415>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20161028/a514f3ee/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://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-developers


More information about the Community mailing list