vreg.Volume3D.rotate_to#
- Volume3D.rotate_to(target, rotation, center=None, coords='fixed')[source]#
Apply a rotation and reslice the result to the geometry of a target volume.
- Parameters:
target (vreg.Volume3D) – target volume
rotation (array-like) – 3-element rotation vector in radians. Defaults to None (no rotation).
center (str or array-like) – center of rotation. If this has value ‘com’ the rotation is performed around the center of mass. Alternatively this can be a 3-element vector. Defaults to None (center = origin).
coords (str or array, optional) – Reference frame for the coordinates of the rotation and center vector, as a 4x4 affine array. String options are shorthand notations: ‘fixed’ (patient reference frame), and ‘volume’ (volume reference frame). Defaults to ‘fixed’.
- Returns:
transformed volume.
- Return type: