RotationPerturbation
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class RotationPerturbation(angle_degrees: float = 0.5, axis: str = 'z', interpolator: str = 'bspline', random_sign: bool = False, warp_masks: bool = True)[source]
Bases:
objectRotate image content by a small fixed angle about the image centre.
- Parameters:
angle_degrees – Rotation angle in degrees; the paper uses
0.5. Deterministic by design – pass the sign you want.axis – Axis to rotate around (
"x","y"or"z";"z"is the axial in-plane axis, the paper’s choice).interpolator – Interpolator for the intensity images (
"bspline"is the paper’s choice); masks use nearest neighbour only whenwarp_masksis True.random_sign – When
True, the sign ofangle_degreesis drawn as±1per call (some MIRP configs randomize the sense of the 0.5° in-plane rotation). The paper’s default is a fixed+0.5degrees, so this staysFalse.warp_masks – When True, apply the same rotation to every ROI. Prior 2024 extraction keeps the original mask (False).