vreg.Volume3D.bounding_box#

Volume3D.bounding_box(mask=None, margin=0.0)[source]#

Return the bounding box

Parameters:
  • mask (Volume3D, optional) – If mask is None, the bounding box is drawn around the non-zero values of the Volume3D. If mask is provided, it is drawn around the non-zero values of mask instead. Defaults to None.

  • margin (float, optional) – How big a margin (in mm) around the object. Defaults to 0.

Returns:

the bounding box

Return type:

Volume3D