<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div>You’re right in that the FIxedInitialTransform is available but it could’ve simply</div><div>been an oversight on my part. I know I tried to keep the class as general as</div><div>possible while knowing that actually exercising the virtual domain image as </div><div>anything other than the fixed image would take more work. I can’t remember</div><div>exactly. The problem is that I’ve made so many significant changes to that </div><div>class (e.g., point sets, multiple metrics, accommodating changes to the specialized</div><div>ImageRegistrationMethods), that I can’t quite remember how it has evolved </div><div>to its current state.</div><div><br class=""></div><div>At first glance, your fix looks fine to me. It passes all the tests and so I’m </div><div>guessing we should merge and I’ll see if ANTs has any associated hiccups</div><div>which I’m sure we can easily fix.</div><div><br class=""></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 28, 2016, at 9:01 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <<a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Interesting. But the InitialFixedTransform is made available. I am not sure how that could be used with out the virtual domain.
<div class=""><br class="">
</div>
<div class="">After looking at it a bit more it doesn’t look too hard. Here is my attempt at it:</div>
<div class=""><a href="http://review.source.kitware.com/#/c/21675/1" class="">http://review.source.kitware.com/#/c/21675/1</a></div>
<div class=""><br class="">
</div>
<div class="">Please let know know if this is close to a usable solution.</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Brad</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Oct 28, 2016, at 11:48 AM, Nicholas Tustison <<a href="mailto:ntustison@gmail.com" class="">ntustison@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Brad,
<div class=""><br class="">
</div>
<div class="">Thanks for looking into this. Although specific components of the registration</div>
<div class="">framework were designed to work with a generic virtual domain image (such </div>
<div class="">as the similarity metrics), that’s not the case for the framework in it’s entirety. </div>
<div class="">When we wrote the image registration methods, we hard-coded various </div>
<div class="">choices such as the use of the fixed image as the virtual domain image. More</div>
<div class="">work would be required to generalize this.</div>
<div class=""><br class="">
</div>
<div class="">Nick</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Oct 28, 2016, at 7:46 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <<a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi!
<div class=""><br class="">
</div>
<div class="">I am trying to add the VirtualDomain as an option to the SimpleITK ImageRegistrationMethod. I have does so here [1].</div>
<div class=""><br class="">
</div>
<div class="">This method for setting the virtual domain follows the SimpleImageRegistrationTest / Example by setting the VirtualDomain on the Metric[2].</div>
<div class=""><br class="">
</div>
<div class="">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:</div>
<div class="">
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">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.</span></div>
</div>
<div class=""><br class="">
</div>
<div class="">This is an indication the transforms are not being applied as I expect. My expectation of how the transforms should be applied here [3].</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Suggestions on how to correct this issue, or a patch are welcomed!</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Brad</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="http://review.source.kitware.com/#/c/21540/2" class="">http://review.source.kitware.com/#/c/21540/2</a></div>
<div class="">[2] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx#L162" class="">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx#L162</a></div>
<div class="">[3] <a href="http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/61_Registration_Introduction_Continued.html#Version-1.1" class="">http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/61_Registration_Introduction_Continued.html#Version-1.1</a></div>
<div class="">[4] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx#L409-L415" class="">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx#L409-L415</a></div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div></blockquote></div><br class=""></body></html>