dbdicom.dro.ellipsoid#
- dbdicom.dro.ellipsoid(a, b, c, spacing=(1.0, 1.0, 1.0), levelset=False) Series [source]#
Generates ellipsoid with semimajor axes aligned with grid dimensions on grid with specified
spacing
.- Parameters:
a (float) – Length of semimajor axis aligned with x-axis.
b (float) – Length of semimajor axis aligned with y-axis.
c (float) – Length of semimajor axis aligned with z-axis.
spacing (tuple of floats, length 3) – Spacing in (x, y, z) spatial dimensions. Defaults to (1,1,1)
levelset (bool) – If True, returns the level set for this ellipsoid (signed level set about zero, with positive denoting interior) as np.float64. False returns a binarized version of said level set. Defaults to False.
- Returns:
A series with appropriate array and header data.
- Return type:
dbdicom.Series
Note
The interface and the array generation is taken directly from skimage but the core function is copied into dbdicom utilities to avoid bringing in skimage as an essential dependency.