get_footprints#

crispy.pruning.structures.get_footprints(ndim, width=5, dtype=<class 'numpy.uint8'>)[source]#

Generate a footprint array representing connectivity in 2D or 3D space.

Parameters:
  • ndim (int) – The number of dimensions (2 or 3).

  • width (int, optional) – The size of the footprint array along each dimension. Defaults to 5.

  • dtype (data-type, optional) – The desired data type of the footprint array. Defaults to np.uint8.

Returns:

footprint – A binary array of ones representing the connectivity footprint.

Return type:

ndarray