- trim_nonpercolating_paths(im, inlets, outlets, strel=None)#
Remove all nonpercolating paths between specified locations
im (ndarray) – The image of the porous material with
`Truevalues indicating the phase of interest
inlets (ndarray) – A boolean mask indicating locations of inlets, such as produced by
outlets (ndarray) – A boolean mask indicating locations of outlets, such as produced by
strel (ndarray) – The structuring element to use when determining if regions are connected. This is passed to
image – A copy of
imwith all the nonpercolating paths removed
- Return type:
This function is essential when performing transport simulations on an image since regions that do not span between the desired inlet and outlet do not contribute to the transport.
Click here to view online example.