Is there a way to extract the rotation transform of slice views rotated using ctrl-alt-left-click-and-drag? It would be super handy to be able to take that and paste it into a transform to apply to a crop volume ROI. It’s easy enough to just rotate the ROI by hand and get it close, but I was wondering if a quick python snippet to extract the rotation angles and make a quick transform would be doable.
May be you are referring to the SlicerToRAS matrix of a slice node.
sliceNode = slicer.app.layoutManager().sliceWidget("Red").mrmlSliceNode()
mx = sliceNode.GetSliceToRAS()
t = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLTransformNode")
t.ApplyTransformMatrix(mx)
Apply the MRML transform node to the ROI node in the Transforms module and tell us if that’s what you meant.