# transform points between image pre/post registration

**URL:** <https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130>\
**Category:** Beginner Questions\
**Tags:** itk, simpleitk, registration, python\
**Created:** [June 24, 2022, 3:46pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130 "2022-06-24T15:46:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enrico\_Sarneri](https://discourse.itk.org/user_avatar/discourse.itk.org/enrico_sarneri/32/2691_2.png) [@Enrico\_Sarneri](https://discourse.itk.org/u/Enrico_Sarneri)\
**Post date:** [June 24, 2022, 3:46pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130/1 "2022-06-24T15:46:28Z")

</div>

Hello! Sorry for asking again :’)  
I basically have these two red points that identify the centres of the spheres (1st image).  
What I do then is to apply a registration (Euler2D) of the image on a reference one, getting the new image. What I want to do then is to place again the red points of the image before the registration on the new image. What I did was simply apply the transform.TransformPoint passing the coordinates of the two red points. After that in theory I should get the points of before placed in the same place at the centre of the two spheres but in the new registered image. The problem is that I get a different result (2nd image). What is the problem?

 ![Immagine 2022-06-24 173854](https://discourse.itk.org/uploads/default/original/2X/0/0355a2889321f990cba02019912468b9c7cf68e5.png)

 ![Immagine 2022-06-24 174437](https://discourse.itk.org/uploads/default/original/2X/6/64477601bdf2777d0d2ee37a5cc7e3aef6cb08b8.png)

---

<div class="post-metadata">

**Author:** ![mauigna06](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mauigna06](https://discourse.itk.org/u/mauigna06)\
**Post date:** [June 26, 2022, 3:44pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130/2 "2022-06-26T15:44:55Z")

</div>

Be sure you are using homogeneous coordinates as input for your matrix, that means your point vector should have the form p = (px, py, 1)  
If you believe your framework already takes care of this then try applying the inverted of the transform you got (just blindly guessing)

Hope it helps

---

<div class="post-metadata">

**Author:** ![Enrico\_Sarneri](https://discourse.itk.org/user_avatar/discourse.itk.org/enrico_sarneri/32/2691_2.png) [@Enrico\_Sarneri](https://discourse.itk.org/u/Enrico_Sarneri)\
**Post date:** [June 26, 2022, 5:44pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130/3 "2022-06-26T17:44:24Z")

</div>

The point I put it in 2D, so it just has the coordinates (x, y) since also the registration is 2D 🤔

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [June 27, 2022, 2:43pm UTC](https://discourse.itk.org/t/transform-points-between-image-pre-post-registration/5130/4 "2022-06-27T14:43:58Z")

</div>

Try the inverse transform direction.
