Slicer/.nrrd Coordinate Systems

Hello everyone,

I am IT student and new to the medical field. I am currently working on Image Processing/Classification Tasks and working with Slicer. I still think I have some understanding issues regarding the Coordinate System used and was hoping you guys could maybe help me.

I currently have data in .nrrd files I work with. From the Header Information I can extract:

‘space’: ‘left-posterior-superior’ → So I can assume my Data is in LPS

‘space directions’:

[ 5.98936111e-01, 6.15821439e-05, -5.15675320e-03]
[-1.20481869e-08, 5.98915625e-01, 7.15087395e-03]
[ 4.13286886e-02, -5.73043156e-02, 4.79947636e+00]

‘space origin’:

[-115.52378082, -56.22384262, -92.38769531]

So I assume my data is using this system? As Slicer uses RAS it transforms this data from LPS to RAS when viewing it in Slicer?

I would like to rescale all my images to 1 in x, y direction to make them more comparable.
To do that I just have to apply a corresponding transformation matrix to my data if my understanding is correct?

Overall I am still confused as to what corresponds to what data in which coordinate system.

If you haven’t already you should study this page:

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

Slicer works internally in RAS but many output formats are LPS implicitly while others are implicitly RAS. Many formats have a flag in the header that says LPS or RAS which we try to respect or you can select the reference when importing files.

1 Like

Datasets created by earlier Slicer versions may have used either LPS or RAS coordinate system in files. In recent Slicer releases by default all node types (volumes, models, markups, etc.) are saved in LPS coordinate system.

That Website was indeed very helpful, thank you!

So if I have understood it correctly with the Information from the Header I can transform my Data from IJK to LPS/RAS by applying the matrix.

I have ADC Maps and T2 Seq and a transformation for registration.

So in my Code I would then have to transform both Images to LPS and then apply the transformation from my registration and then I can transform them back to IJK coordinates so I can proceed with my Image Processing.
Is that understanding correct?