surfa.transform.compose_affine#

surfa.transform.compose_affine(translation=None, rotation=None, scale=None, shear=None, ndim=3, degrees=True, **kwargs)#

Compose an affine matrix from a set of N-D translation, rotation, scale, and shear transform components.

Parameters
  • translation (float array) – N translation parameters.

  • rotation (float array) – 1 (2D) or 3 (3D) rotation angles.

  • scale (float array) – N scale parameters.

  • shear (float array) – 1 (2D) or 3 (3D) shear parameters.

  • ndim (int) – Dimensionality of transform.

  • degrees (bool) – Define rotation in degrees instead of radians.

  • **kwargs – Keyword arguments that are passed to Affine constructor.

Returns

Composed affine transform.

Return type

Affine