vreg.Volume3D.split#

Volume3D.split(n=None, axis=-1, gap=0)[source]#

Split a volume into slices (2D volumes)

Parameters:
  • n (int, optional) – number of slices in the result. If this is not provided, n is the shape of the volume in the axis along which it is split. Defaults to None.

  • axis (int, optional) – Axis along which to split the volume. Defaults to -1 (z-axis).

  • gap (float, optional) – Add a gap (in mm) between the resulting slices. Defaults to 0.

Returns:

a list of volumes with a single slice each.

Return type:

list of Volume3D