metrics#
The metrics
module contains functions that extract pore data from segmented images.
feret_diameter()#
- pore2chip.metrics.feret_diameter(image)#
Get maximum and minimum feret diameters of a single image.
- Parameters:
image (2D array) – Input image
- Returns:
Tuple of arrays of max feret diameters and min feret diameters
- Return type:
Tuple of numpy arrays
feret_diameter_list()#
- pore2chip.metrics.feret_diameter_list(img_list)#
Get maximum and minimum feret diameters of each image.
- Parameters:
img_list (3D array) – Array of input images
- Returns:
Tuple of arrays of max feret diameters and min feret diameters
- Return type:
Tuple of numpy arrays
extract_diameters()#
- pore2chip.metrics.extract_diameters(img_list, voxel_size=1)#
Extract pore diameters and pore throat diameters.
- Parameters:
img_list (3D array) – Array of input images
- Returns:
Tuple of arrays of pore diameters and pore throat diameters
- Return type:
Tuple of numpy arrays
extract_diameters2()#
- pore2chip.metrics.extract_diameters2(img_list, voxel_size=1, sigma_val=0.4)#
Extract pore diameters and pore throat diameters (with direct skimage watershed).
- Parameters:
img_list (3D array) – Array of input images
- Returns:
Tuple of arrays of pore diameters and pore throat diameters
- Return type:
Tuple of numpy arrays
extract_diameters_alt()#
- pore2chip.metrics.extract_diameters_alt(img_list, num_bins=10)#
Extract pore diameters using PoreSpy local thickness filter (no pore throat diameters).
- Parameters:
img_list (3D array) – Array of input images
num_bins (int) – Number of bins PoreSpy uses to calculate pore size distribution
- Returns:
Array of pore diameters
- Return type:
Numpy array
get_probability_density()#
- pore2chip.metrics.get_probability_density(arr)#
Get probability densities of given array of values.
- Parameters:
arr (array) – Array of values
- Returns:
Array of probability densities
- Return type:
Numpy array
get_percent_probability()#
- pore2chip.metrics.get_percent_probability(arr)#
Get percent probability of given array of values
- Parameters:
arr (array) – Array of values
- Returns:
Dictionary of arr and percentage chances
- Return type:
dict
Note
This project is under active development.