porespy.tools.ps_rect#

porespy.tools.ps_rect(w, ndim)#

Creates rectilinear structuring element with the given size and dimensionality

Parameters:
  • w (scalar) – The desired width of the structuring element

  • ndim (int) – The dimensionality of the element, either 2 or 3.

Returns:

strel – A numpy array of the structuring element

Return type:

ndarray

Examples

Click here to view online example.