vreg.Volume3D.crop#

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

Crop to a box

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

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

Returns:

the bounding box

Return type:

Volume3D