Metrics

Extract Quantitative Information

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.

metrics.boxcount(im[, bins, d_min, d_max])

Calculates fractal dimension of an image using the tiled box counting method [1]_

metrics.chord_counts(im)

Find the length of each chord in the supplied image

metrics.chord_length_distribution(im[, …])

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

metrics.lineal_path_distribution(im[, bins, …])

Determines the probability that a point lies within a certain distance of the opposite phase along a specified direction

metrics.mesh_surface_area([mesh, verts, faces])

Calculate the surface area of a meshed region

metrics.mesh_volume(region)

Compute the volume of a single region by meshing it

metrics.pc_curve_from_ibip(seq, sizes[, im, …])

Produces a Pc-Snwp curve from the output of ibip

metrics.pc_curve_from_mio(sizes[, im, …])

Produces a Pc-Snwp curve from the output of porosimetry

metrics.phase_fraction(im[, normed])

Calculate the fraction of each phase in an image

metrics.pore_size_distribution(im[, bins, …])

Calculate a pore-size distribution based on the image produced by the porosimetry or local_thickness functions.

metrics.porosity(im)

Calculates the porosity of an image assuming 1’s are void space and 0’s are solid phase.

metrics.porosity_profile(im[, axis])

Computes the porosity profile along the specified axis

metrics.prop_to_image(regionprops, shape, prop)

Create an image with each region colored according the specified prop, as obtained by regionprops_3d.

metrics.props_to_DataFrame(regionprops)

Create a pandas DataFrame containing all the scalar metrics for each region, such as volume, sphericity, and so on, calculated by regionprops_3D.

metrics.radial_density_distribution(dt[, …])

Computes radial density function by analyzing the histogram of voxel values in the distance transform.

metrics.region_interface_areas(regions, areas)

Calculate the interfacial area between all pairs of adjecent regions

metrics.region_surface_areas(regions[, …])

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

metrics.regionprops_3D(im)

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

metrics.representative_elementary_volume(im)

Calculates the porosity of an image as a function subdomain size.

metrics.two_point_correlation(im)

Calculate the two-point correlation function using Fourier transforms