porespy icon indicating copy to clipboard operation
porespy copied to clipboard

Using `conn` consistently throughout

Open jgostick opened this issue 10 months ago • 2 comments

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 avatar Mar 27 '24 18:03 jgostick

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

  • region_size
  • trim_disconnected_blobs
  • trim_nonpercolating_paths

jgostick avatar Mar 28 '24 03:03 jgostick

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

  • trim_floating_solid
  • find_disconnected_voxels
  • fill_blind_pores

jgostick avatar Mar 28 '24 03:03 jgostick