# Coordinate transformations? 

**URL:** https://discourse.slicer.org/t/coordinate-transformations/30682
**Category:** VMTK
**Created:** [July 19, 2023, 3:52pm UTC](https://discourse.slicer.org/t/coordinate-transformations/30682 "2023-07-19T15:52:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Charlie\_Hayward](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charlie_hayward/32/66528_2.png) [@Charlie\_Hayward](https://discourse.slicer.org/u/Charlie_Hayward)
#### Post date: [July 19, 2023, 3:52pm UTC](https://discourse.slicer.org/t/coordinate-transformations/30682/1 "2023-07-19T15:52:29Z")

</div>

Hello, I am attempting to fully automate the vmtkcenterline function by specifying seed points like this: vmtkcenterlines -seedselector pointlist -sourcepoints 0 0 0 -targetpoints 1 1 1 2 2 2. To find the source and target points I have a function that utilizes gradient data and the mask as nifti files, it then finds the end points. I have checked its functionality by looking at the output points on the mask file using itk snap. Unfortunately, I have found that after segmentation and level sets, and smoothing my .vtp file has a different coordinate system. For reference the endpoints from the .nii file are: (131.15801614763552, 80.82237600922723, 17)  
(47.65384615384615, 137.34615384615384, 644)  
(97.26470588235294, 75.5672268907563, 678)  
and the .vtp file are (roughly):  
(159, 55, -113)  
(129, 75, 105)  
(147, 54, 117)  
How are the coordinates transformed using the vmtk pipeline? Any info on how to convert my scripts .nii endpoints to the .vtp endpoints would be greatly appreciated

Thanks

---

<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: [July 21, 2023, 2:11pm UTC](https://discourse.slicer.org/t/coordinate-transformations/30682/2 "2023-07-21T14:11:36Z")

</div>

You can have a look how it got fully automated in 3D Slicer’s Extract Centerline module. See source code [here](https://github.com/vmtk/SlicerExtension-VMTK/blob/master/ExtractCenterline/ExtractCenterline.py#L327).
