# Applying of low resolution transformation on a high resolution dataset

**URL:** <https://discourse.slicer.org/t/applying-of-low-resolution-transformation-on-a-high-resolution-dataset/24805>\
**Category:** Support\
**Created:** [August 17, 2022, 11:10am UTC](https://discourse.slicer.org/t/applying-of-low-resolution-transformation-on-a-high-resolution-dataset/24805 "2022-08-17T11:10:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephanie](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@Stephanie](https://discourse.slicer.org/u/Stephanie)\
**Post date:** [August 17, 2022, 11:10am UTC](https://discourse.slicer.org/t/applying-of-low-resolution-transformation-on-a-high-resolution-dataset/24805/1 "2022-08-17T11:10:24Z")

</div>

Good afternoon to everyone,

We use a skeleton vasculature dataset. This is a graph composed of nodes which have properties of position and radius, and edges that specify the connectivity of the former.

We apply 2 transformations on this dataset: an affine transformation (25 µm in resolution dataset) and a non-linear transformation (25 µm in resolution dataset) in order to be aligned to a reference dataset (Allen Institute for Brain Science , annotation atlas CCFV3). The resolution of our dataset (source) is 1µm and the atlas’ resolution (target) is 25 µm. The resolution of the source dataset and the transformations’ dataset is therefore different.

We use the TransformPoint method to apply the transformations on each 3D point coordinate of the source dataset.

I was wondering if the TransformPoint function performs any kind of interpolation on the transformation to obtain a 1um resolution transformation field to apply to the source dataset?  
If not, is there a function that I could use to do this?

Thanks for your help!

Stephanie

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 17, 2022, 11:32am UTC](https://discourse.slicer.org/t/applying-of-low-resolution-transformation-on-a-high-resolution-dataset/24805/2 "2022-08-17T11:32:00Z")

</div>

Yes, transforms are smoothly interpolated (using linear, or cubic, bspline, thin-plate spline, etc. methods - depending on the transform type) in the entire 3D space.

If you use `vtkMRMLTransformNode::GetTransformBetweenNodes()` method then you’ll get a VTK transform that contains all the transform components (affine and non-linear) properly concatenated. You can then use `TransformPoint` to iterate through each point, but it is about 100x faster if you put your vessel model into a vtkPolyData and apply the transform using a vtkTransformPolyDataFilter.

It will make everything even simpler if you put your vessel model into a vtkPolyData and set that into a model node because then you can visualize your vasculature and apply the transform with two clicks (or 2-3 lines of Python code).

---

<div class="post-metadata">

**Author:** ![Stephanie](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@Stephanie](https://discourse.slicer.org/u/Stephanie)\
**Post date:** [August 17, 2022, 1:50pm UTC](https://discourse.slicer.org/t/applying-of-low-resolution-transformation-on-a-high-resolution-dataset/24805/3 "2022-08-17T13:50:35Z")

</div>

Thank you very much for your quick response. I have all I need!
