# How to apply an existing BSpline transformation to points, TransformPoint not working for me?

**URL:** <https://discourse.itk.org/t/how-to-apply-an-existing-bspline-transformation-to-points-transformpoint-not-working-for-me/7199>\
**Category:** Beginner Questions\
**Tags:** simpleitk\
**Created:** [August 30, 2024, 4:55pm UTC](https://discourse.itk.org/t/how-to-apply-an-existing-bspline-transformation-to-points-transformpoint-not-working-for-me/7199 "2024-08-30T16:55:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![G\_Y](https://discourse.itk.org/user_avatar/discourse.itk.org/g_y/32/3996_2.png) [@G\_Y](https://discourse.itk.org/u/G_Y)\
**Post date:** [August 30, 2024, 8:50pm UTC](https://discourse.itk.org/t/how-to-apply-an-existing-bspline-transformation-to-points-transformpoint-not-working-for-me/7199/3 "2024-08-30T20:50:23Z")

</div>

I do not want to construct another one, I want to apply the existing transform to a set of 3D points. The original BSpline transform was done by registering a fixed image - moving image pair, and the moving image has been deformed to match the fixed image, this is all good. The transform parameters are all saved into disk for future use. Now if there are some special points or geometry drawn on the moving image, say a manual segmentation of an object, how do I apply the transformation to this segmentation (not an image)? I thought I should create the transform (maybe this is what you mean by “construct”) by loading the already saved transform parameters, then call `TransformPoint()` to transform my points one-by-one, thus the above code. The code ran but doesn’t really do anything. Do I create the transform the right way, or do I miss something?

I think my question is related to [SimpleITK: Using TransformPoint() to Transform Mask Vertices](https://discourse.itk.org/t/simpleitk-using-transformpoint-to-transform-mask-vertices/4244), where in their case the `TransformPoint()` did output new positions for the points, although initially inverted. In my case the points returned by `TransformPoint()` is simply the same as the input points.

---

_[View the full topic](https://discourse.itk.org/t/how-to-apply-an-existing-bspline-transformation-to-points-transformpoint-not-working-for-me/7199)._
