porespy.filters.snow_partitioning#
- porespy.filters.snow_partitioning(im, dt=None, r_max=4, sigma=0.4, peaks=None)#
Partition the void space into pore regions using a marker-based watershed algorithm
- Parameters:
im (array_like) – A boolean image of the domain, with
Trueindicating the pore space andFalseelsewhere.dt (array_like, optional) – The distance transform of the pore space. This is done automatically if not provided, but if the distance transform has already been computed then supplying it can save some time.
r_max (int) – The radius of the spherical structuring element to use in the Maximum filter stage that is used to find peaks. The default is 4.
sigma (float) – The standard deviation of the Gaussian filter used in step 1. The default is 0.4. If 0 is given then the filter is not applied, which is useful if a distance transform is supplied as the
imargument that has already been processed.peaks (ndarray, optional) – Optionally, it is possible to supply an array containing peaks, which are used as markers in the watershed segmentation. If a boolean array is received (
Trueindicating peaks), thenscipy.ndimage.labelwith cubic connectivity is used to label them. If an integer array is received then it is assumed the peaks have already been labelled. This allows for comparison of peak finding algorithms for instance. If this argument is provided, thenr_maxandsigmaare ignored since these are specfically used in the peak finding process.
- Returns:
results – A custom object with the following data as attributes:
Item
Description
imThe binary image of the void space
dtThe distance transform of the image
peaksThe peaks of the distance transform after applying the steps of the SNOW algorithm
regionsThe void space partitioned into pores using a marker based watershed with the peaks found by the SNOW algorithm
- Return type:
Results object
Notes
The SNOW network extraction algorithm (Sub-Network of an Over-segmented Watershed) was designed to handle to perculiarities of high porosity materials, but it applies well to other materials as well.
References
[1] Gostick, J. “A versatile and efficient network extraction algorithm using marker-based watershed segmenation”. Physical Review E. (2017)
Examples
Click here to view online example.