Extract angular displacement from "Rotate to Volume Plane"

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.

Image axis directions in RAS coordinate system is available in the first 3 columns of the ijkToRasDirections matrix returned by vtkMRMLVolumeNode.GetIJKToRASDirectionMatrix:

volumeNode = getNode('MRHead')
ijkToRasDirections = vtk.vtkMatrix4x4()
volumeNode.GetIJKToRASDirectionMatrix(ijkToRasDirections)
print(ijkToRasDirections)
1 Like

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