Orientation Marker incorrect?

Hi All!

I have a dataset of MR angiography patients. Through sitk, I checked with GetDirections() the direction of every volume.

It turns out they all have direction (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0), except one who has instead (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0).

So I investigated this outlier sub with Slicer and I noticed a potential bug in the Orientation (image below).

I have 2 questions:

  1. any idea of why only one sub has different Directions? Why could this be?

  2. is it really a bug or am I missing something? The human in the coronal and sagittal planes doesn’t seem correctly oriented

In case you want to try it out, you can find the nifti file at this GDrive [link]
(https://drive.google.com/file/d/1VRDupP7VFHN1cLwFjzuU7t7ZnqSvL9PI/view?usp=sharing)

Thanks a lot in advance!

IMHO, Slicer is not guilty. Other programs show the same - wrong - orientation. Something went wrong with the file somwhere.

2 Likes

Yes, image direction is specified incorrectly in this file.

(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0 ) would mean a left-handed coordinate system, which is not used in medical image computing, so most likely this is just a bug somewhere in the processing pipeline.

You can fix the file easily by inverting the third image axis direction:

import numpy as np
volumeNode = getNodesByClass("vtkMRMLVolumeNode")[0]
volumeNode.ApplyTransformMatrix(vtkMatrixFromArray(np.diag([1,1,-1,1])))
2 Likes