multiaug.augmenters.image3d package¶
Submodules¶
multiaug.augmenters.image3d.rotate module¶
-
class
multiaug.augmenters.image3d.rotate.
Rotate3d
(angle: Union[int, float, list], axes: Tuple[bool, bool, bool] = [True, True, True], interpolation: str = 'nearest')¶ Bases:
multiaug.augmenters.meta.Augmenter
Apply random rotation to 3D images.
Parameters: - angle (int or float or list) –
The maximum angle by which to rotate the image.
- If ‘int’ or ‘float’ then use the angle specified for all axes.
- If ‘list’ then must be of format [angle_x, angle_y, angle_z].
- axes (list) –
Flags for the x, y, z axes that determine which axes the image can be rotated about.
- If ‘True’ then axis can be rotated about
- If ‘False’ then axis cannot be rotated about
- interpolation (str) –
Interpolation method to use.
- If ‘nearest’ then use nearest interpolation.
-
apply
(images: numpy.ndarray, row_ids: list) → numpy.ndarray¶ Apply transformations to an entire batch.
Parameters: - images (np.ndarray) – Image batch of shape N x H x W x D.
- row_ids (list) – Indices of rows to rotate.
Returns: Batch of rotated images.
Return type: np.ndarray
-
apply_to_sample
(image: numpy.ndarray) → numpy.ndarray¶ Apply transformation to a single image. Randomly samples one or more active axes and applies a random rotation about that axes.
Parameters: image (np.ndarray) – Image to transform. Returns: Rotated image. Return type: np.ndarray
- angle (int or float or list) –