mymesh.register.similarity#

mymesh.register.similarity(x, center=None, rotation_order=[0, 1, 2], rotation_mode='cartesian', image=False)[source]#

Similarity transform in 3D.

The similairy transform consists of a rigid transformation combined with uniform scalings

Parameters:
  • x (list) – 4 item list, containing the x and y translations and rotation about z, and uniform scaling [t0, t1, t2, alpha, beta, gamma, s], where angles are specified in radians.

  • center (list or np.ndarary, optional) – Reference point for the rotation

  • rotation_order (array_like, optional) – Order to perform rotations about the x (0), y (1), and z (2) axes, by default [0,1,2]

  • image (bool, optional) – Create a transformation matrix for an image, assuming the (0,1,2) dimensions correspond to (z,y,x), by default False.

Returns:

A – Affine transformation matrix (shape=(3,3))

Return type:

np.ndarray