iaf.morph.strel_3d

Three-dimensional structuring elements.

iaf.morph.strel_3d.cube(side: int, dtype: dtype = <class 'numpy.uint8'>) ndarray[source]

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 – 3D structuring element.

Return type:

ndarray (bool)

iaf.morph.strel_3d.ellipsoid(radius: int | list[int], dtype: ~numpy.dtype = <class 'numpy.uint8'>) ndarray[source]

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 – 3D structuring element.

Return type:

ndarray (bool)

iaf.morph.strel_3d.parallelepiped(side: int | list[int], dtype: ~numpy.dtype = <class 'numpy.uint8'>) ndarray[source]

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 – 3D structuring element.

Return type:

ndarray (bool)

iaf.morph.strel_3d.sphere(radius: int | list[int], dtype: ~numpy.dtype = <class 'numpy.uint8'>) ndarray[source]

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 – 3D structuring element.

Return type:

ndarray (bool)