Progamatically get slice view bounding box in RAS

Get the RAS coordinates of the bottom left corner:

xytoras = sliceNode.GetXYToRAS()
xytoras.MultiplyPoint((0, 0 , 0, 1))

Get the coordinate of the top right corner:

dims = sliceNode.GetDimensions()
xytoras.MultiplyPoint((dims[0], dims[1] , 0, 1))
1 Like