irtk.transform.rotate

irtk.transform.rotate(axis: List[float] | torch.Tensor, angle: float, use_degree: bool = True) torch.Tensor

Create a rotation matrix.

Parameters:
  • axis (Union[List[float], torch.Tensor]) – The axis of rotation.

  • angle (float) – The angle of rotation.

  • use_degree (bool, optional) – If True, the angle is in degrees. If False, it’s in radians. Defaults to True.

Returns:

A 4x4 rotation matrix.

Return type:

torch.Tensor