tomosipo.rotate

tomosipo.rotate(*, pos, axis, angles=None, rad=None, deg=None, right_handed=True)[source]

Create a rotation transform

The transform rotates around axis through position pos by some angles.

The parameters pos and axis are interpreted as homogeneous coordinates. You may pass in both homogeneous or non-homogeneous coordinates. Also, you may pass in multiple rows for multiple timesteps. The following shapes are allowed:

  • (n_rows, 3) [non-homogeneous] or (n_rows, 4) [homogeneous]

  • (3,) [non-homogeneous] or (4,) [homogeneous]

Parameters:
  • posnp.array or scalar The position of the axis of rotation.

  • axis – The direction vector of the axis of rotation.

  • anglesfloat or np.array The angle by which must be rotated in radians.

  • radDEPRECATED

  • degDEPRECATED

  • right_handed – By default, the rotation performs a right-handed rotation (in the anti-clockwise direction). A left-handed rotation is performed when right_handed=False.

Returns:

Return type:

Transform