PMEAL / porespy

A set of tools for characterizing and analying 3D images of porous materials
https://porespy.org
MIT License
301 stars 98 forks source link

Using `conn` consistently throughout #949

Open jgostick opened 6 months ago

jgostick commented 6 months ago

This may need a bit of thought...currently we accept conns in some places to mean an structuring element, and in other places we have conns=4|8 in 2D and conns=6|26 3D. However, usually we just want to know if we should included diagonal connections or not. Having to generate a strel each time is a pain. And the 4|8, 6|26 is not dimension agnostic, so maybe conn='min'|'max' is better?

Also note that nphase_border actually has include_diagonals as an argument, which should be changed to whatever is decided.

jgostick commented 6 months ago

Here is list of functions which currently use strel as a way to basically say whether you want to include diagonal connections:

jgostick commented 6 months ago

And here is a list of functions that use conn=<int> to say the same thing: