<div dir="ltr">Thanks for getting back to me. Using the inverse transform on the point selected in the moving image works to transform the point within a reasonable amount to the homologous feature selected in the fixed image when I use two identical images with a known offset of 100 voxels in each direction.  However, upon testing identical images with a known rotation the selected points again fail to line up.  The transform I have been using is the Rigid3DVersorTransform, and the lines of code I'm using to set the inverse are:<div><br></div><div>newTransform->SetCenter(oldTransform->GetCenter());</div><div>oldTransform->GetInverse(newTransform);</div><div><br></div><div>Any idea why translation would work but rotation causes a problem?</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p>--</p><p>AH<br></p><p><br></p><p>Andrew Harris, Honours BSc (Medical Physics)</p><p>PhD (CAMPEP) & MClSc Candidate</p><p>-----------------------------------------------------------------------------------------------</p><p><i>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.</i></p></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jun 28, 2017 at 4:50 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] <span dir="ltr"><<a href="mailto:zivrafael.yaniv@nih.gov" target="_blank">zivrafael.yaniv@nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_846502931708582383WordSection1">
<p class="MsoNormal">Hello Andrew,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In ITK the result of a registration maps points from the fixed image coordinate system to the moving coordinate system, so T(p_f) = p_m and the TRE is || T(p_f) – p_m||. I suspect you just need to use the inverse transform.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">You may be interested in this SimpleITK notebook (<a href="http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/67_Registration_Semiautomatic_Homework.html)" target="_blank">http://<wbr>insightsoftwareconsortium.<wbr>github.io/SimpleITK-Notebooks/<wbr>Python_html/67_Registration_<wbr>Semiautomatic_Homework.html)</a>
 which has a linked cursor GUI (gui.<span style="font-size:10.0pt;font-family:"Courier New",serif">
</span>RegistrationPointDataAquisitio<wbr>n). The source code for the UI is here: <a href="https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/Python/gui.py" target="_blank">
https://github.com/<wbr>InsightSoftwareConsortium/<wbr>SimpleITK-Notebooks/blob/<wbr>master/Python/gui.py</a> .
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">      hope this helps<u></u><u></u></p>
<p class="MsoNormal">             Ziv<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Andrew Harris <<a href="mailto:aharr8@uwo.ca" target="_blank">aharr8@uwo.ca</a>><br>
<b>Date: </b>Wednesday, June 28, 2017 at 3:14 PM<br>
<b>To: </b>Insight-users <<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><br>
<b>Subject: </b>[ITK-users] [ITK] applying a transform to an ITK Point object results in it moving the opposite direction from the image<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi there, <u></u><u></u></p>
<div>
<p class="MsoNormal">I have been trying for a while to get this working: I want to be able to select corresponding points in a fixed and moving image, and determine how well the moving image is transformed to overlay the fixed image by using target registration
 error.  The problem is, using the same transform I applied to a moving image that translated it to the left, the point selected in the moving image gets translated to the right for example.  <br clear="all">
<u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p>--<u></u><u></u></p>
<p>AH<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>Andrew Harris, Honours BSc (Medical Physics)<u></u><u></u></p>
<p>PhD (CAMPEP) & MClSc Candidate<u></u><u></u></p>
<p>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-----<u></u><u></u></p>
<p><i>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.</i><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>