porespy.metrics#

This submodule contains functions for determining key metrics about an image. Typically these are applied to an image after applying a filter, but a few functions can be applied directly to the binary image.

Functions#

bond_number(im, delta_rho, g, sigma, voxel_size[, ...])

Computes the Bond number for an image

boxcount(im[, bins])

Calculates the fractal dimension of an image using the tiled box counting

chord_counts(im)

Find the length of each chord in the supplied image

chord_length_distribution(im[, bins, log, voxel_size, ...])

Determines the distribution of chord lengths in an image containing chords.

find_h(saturation[, position, srange])

Given a saturation profile, compute the height between given bounds

find_porosity_threshold(im[, axis, conn])

Finds the porosity of the image at the percolation threshold

find_porosity_threshold(im[, axis, conn])

Finds the porosity of the image at the percolation threshold

is_percolating(im[, axis, inlets, outlets, conn])

Determines if a percolating path exists across the domain (in the specified

lineal_path_distribution(im[, bins, voxel_size, log])

Determines the probability that a point lies within a certain distance

mesh_surface_area([mesh, verts, faces])

Calculate the surface area of a meshed region

mesh_volume(region[, voxel_size])

Compute the volume of a single region by meshing it

pc_map_to_pc_curve(pc, im[, seq, mode, pc_min, ...])

Converts a pc map into a capillary pressure curve

percolating_porosity(im[, axis, inlets, outlets, conn])

Finds volume fraction of void space which belongs to percolating paths

percolating_porosity(im[, axis, inlets, outlets, conn])

Finds volume fraction of void space which belongs to percolating paths

phase_fraction(im[, normed])

Calculate the fraction of each phase in an image

phase_fraction(im[, normed])

Calculate the fraction of each phase in an image

pore_size_distribution(im[, bins, log, voxel_size])

Calculate a pore-size distribution based on the image produced by the

pore_size_distribution(im[, bins, log, voxel_size])

Calculate a pore-size distribution based on the image produced by the

porosity(im[, mask, fill_closed, fill_surface])

Calculates the porosity of an image assuming 1's are void space and 0's

porosity(im[, mask, fill_closed, fill_surface])

Calculates the porosity of an image assuming 1's are void space and 0's

porosity_by_type(im[, conn])

Computes different types of porosity in an image including total, closed, and

porosity_profile(im[, axis, span, mode])

Computes the porosity profile along the specified axis

porosity_profile(im[, axis, span, mode])

Computes the porosity profile along the specified axis

prop_to_image(regionprops, shape, prop)

Create an image with each region colored according the specified prop,

props_to_DataFrame(regionprops)

Create a pandas DataFrame containing all the scalar metrics for each

radial_density_distribution(dt[, bins, log, voxel_size])

Computes radial density function by analyzing the histogram of voxel

radial_density_distribution(dt[, bins, log, voxel_size])

Computes radial density function by analyzing the histogram of voxel

region_interface_areas(regions, areas[, voxel_size, strel])

Calculate the interfacial area between all pairs of adjecent regions

region_surface_areas(regions[, voxel_size, strel])

Extract the surface area of each region in a labeled image.

region_volumes(regions[, method, voxel_size])

Compute volume of each labelled region in an image

regionprops_3D(im)

Calculates various metrics for each labeled region in a 3D image.

rev_porosity(im[, n, slices])

Calculates the porosity for a many subdomains of diffrent sizes, suitable for

rev_tortuosity(im[, n, axis, slices, dask_on])

Calculates the tortuosity for a range of subdomain sizes suitable for an REV plot

satn_profile(satn[, s, im, axis, span, mode])

Computes a saturation profile from an image of fluid invasion

satn_profile(satn[, s, im, axis, span, mode])

Computes a saturation profile from an image of fluid invasion

two_point_correlation(im[, voxel_size, bins])

Calculate the two-point correlation function using Fourier transforms

two_point_correlation(im[, voxel_size, bins])

Calculate the two-point correlation function using Fourier transforms