porespy.filters.local_thickness_conv#
- porespy.filters.local_thickness_conv(im: numpy.typing.NDArray, dt: numpy.typing.NDArray = None, sizes: int = None, smooth: bool = True, return_indices: bool = False)#
Calculates the radius of the largest sphere that overlaps each voxel while fitting entirely within the void space.
- Parameters:
im (ndarray) – A binary image with the phase of interest set to True
dt (ndarray) – The distance transform of the void space. If not provided it will be computed but providing it saves time. Note that rounding and/or converting the values to integers and using sizes=None can save time by limiting the number of sizes that are used.
sizes (array_like or scalar) – The positive integer radii to evaluate. An integer N selects up to N evenly spaced integer radii between 1 and
floor(dt.max()). If None, every integer radius in that range is used.smooth (bool, optional) – Indicates if protrusions should be removed from the faces of the spheres or not. Default is True.
return_indices (bool, optional) – If True, return
(sizes, indices)instead of a float image, wheresizes[indices]reconstructs the usual result. Default is False.
- Returns:
image – A copy of im with the pore size values in each voxel
- Return type:
ndarray or tuple[ndarray, ndarray]
Notes
The way local thickness is found in PoreSpy differs from the traditional method (i.e. used in ImageJ https://imagej.net/Local_Thickness).
Examples
Click here to view online example.