Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nidl.transforms.volume.preprocessing.CropForeground¶
- class nidl.transforms.volume.preprocessing.CropForeground(threshold=0.0, **kwargs)[source]¶
Bases:
VolumeTransformCrop a 3d volume to the bounding box of its foreground (voxels above threshold in any channel).
Reimplementation of MONAI’s
CropForeground[1] (Apache-2.0).- Parameters:
- threshold: float, default=0.0
Voxels strictly above this value are foreground.
- kwargs: dict
Keyword arguments.
References
[1]Cardoso, M. J., et al., “MONAI: An open-source framework for deep learning in healthcare.” arXiv, 2022. https://arxiv.org/abs/2211.02701