vreg.Volume3D.rotate#
- Volume3D.rotate(rotation, center=None, values=False, reshape=False, coords='fixed')[source]#
Rotate the volume.
- Parameters:
rotation (array-like) – 3-element rotation vector in radians.
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).
values (bool, optional) – If set to True, the values are transformed. Otherwise the affine is transformed. Defaults to False.
reshape (bool, optional) – When values=True, reshape=False will retain the shape and location of the volume. With reshape=True, the volume will be reshaped to fit the transformed values. This keyword is ignored when values=False. Defaults to False.
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: