porespy.networks.juncs_to_pore_centers#
- porespy.networks.juncs_to_pore_centers(juncs, dt)#
Finds pore centers from an image of junctions. To do this, clusters of junction points are reduced to a single voxel, whereby the new voxel, corresponds to the one that has the largest distance transform value from within the original cluster. This method, ensures that the ‘pore centre’ lies on the original set of voxels.
- Parameters:
juncs (ndarray) – An ndarray the same shape as dt with clusters of junction voxels uniquely labelled (1…Np). If a boolean array is provided then a cluster labeling is performed with full cubic connectivity.
dt (ndarray) – The distance transform of the original image.
- Returns:
pc – The resulting pore centres labelled
- Return type:
ndarray