Module iaf.morph.strel_3d
Three-dimensional structuring elements.
Functions
def cube(side: int, dtype: numpy.dtype = numpy.uint8) ‑> numpy.ndarray
-
Calculates a 3D structure element in the shape of a cube.
Parameters
side
:int
- Single positive integer.
dtype
:dtype
- Type of the structure element; optional, default is
np.uint8
.
Returns
str_el
:ndarray (bool)
- 3D structuring element.
def ellipsoid(radius: Union[int, list[int]], dtype: numpy.dtype = numpy.uint8) ‑> numpy.ndarray
-
Calculates a 3D structure element in the shape of an ellipsoid (3D ellipse).
Parameters
radius
:Union[int, list[int]]
- Either a single positive integer, or a list of three positive integers
[x, y, z]
. dtype
:dtype
- Type of the structure element; optional, default is
np.uint8
.
Returns
str_el
:ndarray (bool)
- 3D structuring element.
def parallelepiped(side: Union[int, list[int]], dtype: numpy.dtype = numpy.uint8) ‑> numpy.ndarray
-
Calculates a 3D structure element in the shape of a parallelepiped (3D rectangle).
Parameters
side
:Union[int, list[int]]
- Either a single positive integer, or a list of three positive integers
[x, y, z]
. dtype
:dtype
- Type of the structure element; optional, default is
np.uint8
.
Returns
str_el
:ndarray (bool)
- 3D structuring element.
def sphere(radius: Union[int, list[int]], dtype: numpy.dtype = numpy.uint8) ‑> numpy.ndarray
-
Calculates a 3D structure element in the shape of a sphere.
Parameters
radius
:int
- Single positive integer.
dtype
:dtype
- Type of the structure element; optional, default is
np.uint8
.
Returns
str_el
:ndarray (bool)
- 3D structuring element.