# Extract angular displacement from "Rotate to Volume Plane"

**URL:** <https://discourse.slicer.org/t/extract-angular-displacement-from-rotate-to-volume-plane/7435>\
**Category:** Support\
**Tags:** reformat\
**Created:** [July 5, 2019, 3:13pm UTC](https://discourse.slicer.org/t/extract-angular-displacement-from-rotate-to-volume-plane/7435 "2019-07-05T15:13:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://discourse.slicer.org/u/Manuel)\
**Post date:** [July 5, 2019, 3:13pm UTC](https://discourse.slicer.org/t/extract-angular-displacement-from-rotate-to-volume-plane/7435/1 "2019-07-05T15:13:06Z")

</div>

Operating system: Windows 10  
Slicer version: 4.8.0

Hello everybody,

is there any possibility to extract the angular displacement (axial , sagittal, coronal or x, y, z) between the default aligned slicer viewers of the slice and the realigned slicer viewers after using the “Rotate to Volume Plane” function.  
I want to compare this angles with my calculated angles gathered from the “ImageOrientationPatient” (0020,0037) attribute of the DICOM meta data.

Thanks in advanced.

---

<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:** [July 5, 2019, 3:32pm UTC](https://discourse.slicer.org/t/extract-angular-displacement-from-rotate-to-volume-plane/7435/2 "2019-07-05T15:32:07Z")

</div>

Image axis directions in RAS coordinate system is available in the first 3 columns of the `ijkToRasDirections` matrix returned by [vtkMRMLVolumeNode.GetIJKToRASDirectionMatrix](https://apidocs.slicer.org/master/classvtkMRMLVolumeNode.html#a6e54e58a3cc1064140a91745b6134c3f):

```python
volumeNode = getNode('MRHead')
ijkToRasDirections = vtk.vtkMatrix4x4()
volumeNode.GetIJKToRASDirectionMatrix(ijkToRasDirections)
print(ijkToRasDirections)

```

---

<div class="post-metadata">

**Author:** ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://discourse.slicer.org/u/Manuel)\
**Post date:** [July 5, 2019, 5:37pm UTC](https://discourse.slicer.org/t/extract-angular-displacement-from-rotate-to-volume-plane/7435/3 "2019-07-05T17:37:11Z")

</div>

Thats perfect! Thank you so much and thank you for the quick response.
