porespy.filters.local_thickness_bf#

porespy.filters.local_thickness_bf(im, dt=None, mask=None, smooth=True)#

Insert a maximally inscribed sphere at every pixel labelled by sphere radius

Parameters:
  • im (ndarray) – Boolean image of the porous material

  • dt (ndarray, optional) – The distance transform of the image

  • mask (ndarray, optional) – A boolean mask indicating which sites to insert spheres at. If not provided then all True values in im are used.

  • smooth (bool, optional) – Indicates if protrusions should be removed from the faces of the spheres or not. Default is True.

Returns:

lt – The local thickness of the image with each voxel labelled according to the radius of the largest sphere which overlaps it

Return type:

ndarray

Notes

This function uses brute force, meaning that is inserts spheres at every single pixel or voxel in the void phase without making any attempt to reduce the number of insertion sites. This provides a reference implementation for comparing accuracy of other methods.