dbdicom.extensions.vreg.apply_rigid_transformation#

dbdicom.extensions.vreg.apply_rigid_transformation(series_moving: Series, parameters: ndarray, target: Series | None = None, description: str | None = None) Series[source]#

Apply rigid transformation of an image volume.

Parameters:
  • series_moving (dbdicom.Series) – Series containing the volune to be moved.

  • parameters (np.ndarray) – 6-element numpy array with values of the translation (first 3 elements) and rotation vector (last 3 elements) that map the moving volume on to the static volume. The vectors are defined in an absolute reference frame in units of mm.

  • target (dbdicom.Series, optional) – If provided, the result is mapped onto the geometry of this series. If none is provided, the result has the same geometry of the moving series. Defaults to None.

  • description (str, optional) – Series description of the resulting series. Defaults to None.

Raises:
  • ValueError – If the moving series contains multiple slice groups with different orentations.

  • ValueError – If the array to be moved is empty.

Returns:

Sibling dbdicom series in the same study, containing the transformed volume.

Return type:

dbdicom.Series