numpyradiomics.dro.ellipsoid#
- numpyradiomics.dro.ellipsoid(radii_mm=(30.0, 10.0, 2.5), spacing=(1.0, 1.0, 1.0), padding_mm=5.0)[source]#
Creates a binary mask of a solid ellipsoid.
- Parameters:
- Returns:
Dummy intensity image (value 100 inside). mask (np.ndarray): Binary mask (uint8).
- Return type:
image (np.ndarray)
Example
>>> from numpyradiomics.dro import ellipsoid >>> # Create an isotropic sphere (radius 10mm) with 0.5mm spacing >>> image, mask = ellipsoid(radii_mm=(10, 10, 10), spacing=(0.5, 0.5, 0.5)) >>> print(mask.sum()) # Number of voxels in the sphere 33489