# Orientation Marker incorrect?

**URL:** <https://discourse.slicer.org/t/orientation-marker-incorrect/14399>\
**Category:** Support\
**Created:** [November 3, 2020, 8:59am UTC](https://discourse.slicer.org/t/orientation-marker-incorrect/14399 "2020-11-03T08:59:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tommaso\_Di\_Noto](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tommaso_di_noto/32/6802_2.png) [@Tommaso\_Di\_Noto](https://discourse.slicer.org/u/Tommaso_Di_Noto)\
**Post date:** [November 3, 2020, 8:59am UTC](https://discourse.slicer.org/t/orientation-marker-incorrect/14399/1 "2020-11-03T08:59:30Z")

</div>

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](https://drive.google.com/file/d/1VRDupP7VFHN1cLwFjzuU7t7ZnqSvL9PI/view?usp=sharing))

Thanks a lot in advance!

 ![bug_slicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/6/f6d0b9b18891dff7456a18cb1f91bdb98b5d318a.jpeg)

---

<div class="post-metadata">

**Author:** ![issakomi](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@issakomi](https://discourse.slicer.org/u/issakomi)\
**Post date:** [November 3, 2020, 6:44pm UTC](https://discourse.slicer.org/t/orientation-marker-incorrect/14399/2 "2020-11-03T18:44:34Z")

</div>

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

 ![20201103-193630](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/4/e4e931a07b57ad2be448e8b9936898b53ce60940.jpeg)

 ![snap](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/e/7ebf16e7f3dbfa4c7ca6acc2b43ea5b8b8e14716.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 3, 2020, 8:17pm UTC](https://discourse.slicer.org/t/orientation-marker-incorrect/14399/3 "2020-11-03T20:17:23Z")

</div>

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:

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

```
