morphoclass.transforms.augmentors.random_rotation module¶
Implementation of the RandomRotation transform.
-
class
morphoclass.transforms.augmentors.random_rotation.RandomRotation(only_y_rotation=False)¶ Bases:
objectRandomly rotate the apical in its 3D embedding space.
The full rotations are parametrized by three Euler angles alpha, beta, and gamma in the following way:
v -> R_y(gamma).R_x(beta).R_y(alpha).v
With this parametrization the range of the angles is the following:
alpha: [0, 2 * pi] beta: [0, pi] gamma: [0, 2 * pi]
It is possible to restrict the rotations to the y-rotations only by setting beta = gamma = 0. This is useful if the apicals are oriented along the y-axis.
- Parameters
only_y_rotation (bool, optional) – If true only rotate along the y-axis.