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: 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.
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.
Can you clarify how to get M?