Parsing CenterLine File (.vtk)

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.

The simplest is to get the model point coordinates as numpy array as shown here:

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.

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

Can you clarify how to get M?