# Parsing CenterLine File (.vtk)

**URL:** <https://discourse.slicer.org/t/parsing-centerline-file-vtk/3384>\
**Category:** Support\
**Created:** [July 5, 2018, 12:57pm UTC](https://discourse.slicer.org/t/parsing-centerline-file-vtk/3384 "2018-07-05T12:57:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trnhx001](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@trnhx001](https://discourse.slicer.org/u/trnhx001)\
**Post date:** [July 5, 2018, 12:57pm UTC](https://discourse.slicer.org/t/parsing-centerline-file-vtk/3384/1 "2018-07-05T12:57:26Z")

</div>

Hi everyone,

I am sorry to ask if this is a simple question. I am trying to parse the centerline file using python for data analysis, but I am confused about the coordinates in 3D Slicer.

Is the data in world coordinates(xyz) or voxel coordinates? Are segmentaions and volume files also stored in world coordinates?

Is there anyway to output the data in world coordinates or voxel coordinates using python packages?

Thanks for all of your helps.

---

<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 5, 2018, 1:26pm UTC](https://discourse.slicer.org/t/parsing-centerline-file-vtk/3384/2 "2018-07-05T13:26:36Z")

</div>

The simplest is to get the model point coordinates as numpy array as shown here: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python\_scripting#Accessing\_Model\_data\_as\_numpy\_array](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#Accessing_Model_data_as_numpy_array)

The points are in the node’s coordinate system. The node may be transformed in the world coordinate system if you apply a transform but not harden it yet.

---

<div class="post-metadata">

**Author:** ![trnhx001](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@trnhx001](https://discourse.slicer.org/u/trnhx001)\
**Post date:** [July 5, 2018, 2:32pm UTC](https://discourse.slicer.org/t/parsing-centerline-file-vtk/3384/3 "2018-07-05T14:32:28Z")

</div>

Thank you.

Just to verify, is the node’s coordinates you mentioned is RAS coordinates.

I also see this: d=inv(M) \*[R A S 1]’ from the link [https://www.slicer.org/wiki/Coordinate\_systems](https://www.slicer.org/wiki/Coordinate_systems).

Can you clarify how to get M?
