Thanks for getting back to me.
the rotation that does not. One curious note is that while I set the
center of rotation explicitly, it shows up as a zero vector in the output.
point, but then of course the known translation case fails.
Any further thoughts would be appreciated.
-----------------------------------------------------------------------------------------------
recipient. Any reviewing, copying, or distribution of this email (or any
prohibited. If you are not the intended recipient, please contact the
Post by Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]The code snippet looks correct. I would advise that you print the
transformations to see that you are getting what you expect. The relevant
*T*(*x*)=*A*(*x*â*c*)+*t*+*c*
*A* â matrix
*c* â center
*t *â translation
*t**+c âA**c* â offset
*A*^{-1} â matrix
*c* â center
-*A*^{-1}* t *â translation
*c* - *A*^{-1}* t - **A*^{-1}* c* - offset
hope this helps
Ziv
p.s. When working with ITK always remember that you are dealing with
physical space, distances are in mm/kmâŠ, volumes in mm^3âŠ. Donât be tempted
to measure things in pixels/voxels.
*Date: *Thursday, June 29, 2017 at 1:21 PM
*Subject: *Re: [ITK-users] [ITK] applying a transform to an ITK Point
object results in it moving the opposite direction from the image
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
newTransform->SetCenter(oldTransform->GetCenter());
oldTransform->GetInverse(newTransform);
Any idea why translation would work but rotation causes a problem?
--
AH
Andrew Harris, Honours BSc (Medical Physics)
PhD (CAMPEP) & MClSc Candidate
------------------------------------------------------------
-----------------------------------
*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 Wed, Jun 28, 2017 at 4:50 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] <
Hello Andrew,
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.
You may be interested in this SimpleITK notebook (http://
insightsoftwareconsortium.github.io/SimpleITK-Notebooks/
Python_html/67_Registration_Semiautomatic_Homework.html) which has a
linked cursor GUI (gui. RegistrationPointDataAquisition). The source code
for the UI is here: https://github.com/InsightSoftwareConsortium/
SimpleITK-Notebooks/blob/master/Python/gui.py .
hope this helps
Ziv
*Date: *Wednesday, June 28, 2017 at 3:14 PM
*Subject: *[ITK-users] [ITK] applying a transform to an ITK Point object
results in it moving the opposite direction from the image
Hi there,
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.
--
AH
Andrew Harris, Honours BSc (Medical Physics)
PhD (CAMPEP) & MClSc Candidate
------------------------------------------------------------
-----------------------------------
*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.*