Re: [ITK-users] [ITK] applying a transform to an ITK Point object results in it moving the opposite direction from the image
Andrew Harris <[email protected]>
| Newsgroups | gmane.comp.lib.itk.user |
|---|---|
| Message-ID | <CAJ0LxQLy7tkLUdVfaPHdO=O2cM7NU8SOodiPfY58OLkV_1i8Bw@mail.gmail.com> |
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: 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] < [email protected]> wrote: > 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 > > > > > > > > > > *From: *Andrew Harris <[email protected]> > *Date: *Wednesday, June 28, 2017 at 3:14 PM > *To: *Insight-users <[email protected]> > *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.* > _____________________________________ 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