napari.utils.transforms#

Classes

Affine

n-dimensional affine transformation class.

CompositeAffine

n-dimensional affine transformation composed from more basic components.

ScaleTranslate

n-dimensional scale and translation (shift) class.

Transform

Base transform class.

TransformChain

Functions

napari.utils.transforms.shear_matrix_from_angle(angle, ndim=3, axes=(-1, 0))[source]#

Create a shear matrix from an angle.

Parameters:
  • angle (float) – Angle in degrees.

  • ndim (int) – Dimensionality of the shear matrix

  • axes (2-tuple of int) – Location of the angle in the shear matrix. Default is the lower left value.

Returns:

matrix – Shear matrix with ones along the main diagonal

Return type:

np.ndarray