skimage2.draw.ellipsoid#

skimage2.draw.ellipsoid(a, b, c, spacing=(1.0, 1.0, 1.0), levelset=False)[source]#

Generate ellipsoid for given semi-axis lengths.

The respective semi-axis lengths are given along three dimensions in Cartesian coordinates. Each dimension may use a different grid spacing.

Parameters:
afloat

Length of semi-axis along x-axis.

bfloat

Length of semi-axis along y-axis.

cfloat

Length of semi-axis along z-axis.

spacing3-tuple of floats

Grid spacing in three spatial dimensions.

levelsetbool

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.

Returns:
ellipsoid(M, N, P) array

Ellipsoid centered in a correctly sized array for given spacing. Boolean dtype unless levelset=True, in which case a float array is returned with the level set above 0.0 representing the ellipsoid.