DICOM and VTK file orientation Issue

I am trying to load nrrd as AXIAL, CORONAL, SAGITAL view and VTK file outside of the Slicer but the orientation is not matching as in slicer 3d Conventional view if we enable all three AXIAL, Sagital, and CORONAL views. There is some mismatch is there. Let me know how to solve this.

Probably the external code needs to take into account the coordinate systems:

https://www.slicer.org/wiki/Coordinate_systems

A similar question came up in another context - does anyone know if there is a surface mesh format (other than DICOM!) that can specify the coordinate system?

STL, PLY, VTK, VTP could all store the coordinate system (anatomical orientation), but there is no standard or commonly followed practice.
MetaIO (supported by ITK, VTK, etc.) can store surface mesh (MetaSurface object) and anatomical orientation in a standard way, but this file format is rarely used for mesh storage.

2 Likes

Thanks, I will forward this info to Christian Bauer who asked this question to me.

Hi Pieper, Andrey Fedorov, Andras Lasso,

I have gone through this link : https://www.slicer.org/wiki/
Coordinate_systems but I am unable to find out how to make vtk model to
load exactly on the bone structure on Slices(Axial,Sagital,Coronal) from
backend without any adjustments from UI. Only in some cases it is matching
because the bone structure is exactly at origin of the slice . If the bone
structure is some where else like shifted to left or right or top/bottom,
in these cases mismatch is there.

Able to read nrrd and get these details: (Letme know if we can use these
details to load vtk model)
type: int
dimension: 3
space: left-posterior-superior
sizes: 512 512 182
space directions: (0.41406199999999999,0,0) (0,0.41406199999999999,0)
(0,0,0.625)
kinds: domain domain domain
endian: little
encoding: gzip
space origin: (-105.99999999999999,-127.30000305175778,-53.499999999999986)

It looks totally new for me , that’s why I am unable to findout. Can you
please help me to sort out this?

Most common issue is LPS/RAS coordinate system mismatch. So, may try to convert your data from LPS to RAS coordinate system by transforming it using Transforms module by a matrix that has [-1,-1,1,1] in the diagonal:

Hi -

The patient coordinate system (RAS in Slicer’s case) provides a frame of reference for the data. When you have the data in Slicer you can explore this with the Data Probe. Exported VTK models will be in this space with the vertices expressed in mm. The nrrd header also tells how the volume data is positioned, scaled, and oriented in this space.

If the external code is using something like the pixel space of the image as the reference coordinate system, then you would need to apply the inverse of the volume’s transform to the vertices of the model.

HTH,
Steve

A post was split to a new topic: Specifying coordinate system in surface mesh file