Highlight Features of Interest

This module contains a variety of functions for altering images based on the structural characteristics, such as pore sizes. A definition of a filter is a function that returns an image the shape as the original image, but with altered values.

filters.apply_chords(im[, spacing, axis, …])

Adds chords to the void space in the specified direction.

filters.apply_chords_3D(im[, spacing, …])

Adds chords to the void space in all three principle directions.

filters.apply_padded(im, pad_width, func[, …])

Applies padding to an image before sending to func, then extracts the result corresponding to the original image shape.

filters.chunked_func(func[, overlap, divs, …])

Performs the specfied operation “chunk-wise” in parallel using dask.

filters.distance_transform_lin(im[, axis, mode])

Replaces each void voxel with the linear distance to the nearest solid voxel along the specified axis.

filters.fftmorphology(im, strel[, mode])

Perform morphological operations on binary images using fft approach for improved performance

filters.fill_blind_pores(im[, conn])

Fills all pores that are not connected to the edges of the image.

filters.find_disconnected_voxels(im[, conn])

This identifies all pore (or solid) voxels that are not connected to the edge of the image.


lavel points in a distance transform that are closer to image bounadry than solid.

filters.find_peaks(dt[, r_max, strel, divs])

Finds local maxima in the distance transform

filters.flood(im[, regions, mode])

Floods/fills each region in an image with a single value based on the specific values in that region.

filters.hold_peaks(im[, axis])

Replaces each voxel with the highest value along the given axis.

filters.local_thickness(im[, sizes, mode, divs])

For each voxel, this function calculates the radius of the largest sphere that both engulfs the voxel and fits entirely within the foreground.

filters.nphase_border(im[, include_diagonals])

Identifies the voxels in regions that border N other regions.

filters.porosimetry(im[, sizes, inlets, …])

Performs a porosimetry simulution on an image.

filters.prune_branches(skel[, …])

Removes all dangling ends or tails of a skeleton.


Any peaks that are broad or elongated are replaced with a single voxel that is located at the center of mass of the original voxels.


Replace each voxel with the size of the region to which it belongs

filters.size_to_seq(size[, im, bins])

Converts an image of invasion size values into sequence values

filters.size_to_satn(size[, im, bins])

Converts an image of invasion size values into saturations

filters.seq_to_satn(seq[, im])

Converts an image of invasion sequence values to saturation values.

filters.snow_partitioning(im[, dt, r_max, sigma])

Partition the void space into pore regions using a marker-based watershed algorithm, with specially filtered peaks as markers.

filters.snow_partitioning_n(im[, r_max, sigma])

This function partitions an imaging oontain an arbitrary number of phases into regions using a marker-based watershed segmentation.

filters.snow_partitioning_parallel(im[, …])

Performs SNOW algorithm in parallel (or serial) to reduce time (or memory usage) by geomertirc domain decomposition of large images.

filters.trim_disconnected_blobs(im, inlets)

Removes foreground voxels not connected to specified inlets.

filters.trim_extrema(im, h[, mode])

Trims local extrema in greyscale values by a specified amount.

filters.trim_floating_solid(im[, conn])

Removes all solid that that is not attached to the edges of the image.

filters.trim_nearby_peaks(peaks, dt[, f])

Finds pairs of peaks that are nearer to each other than to the solid phase, and removes the peak that is closer to the solid.

filters.trim_nonpercolating_paths(im, …)

Remove all nonpercolating paths between specified edges or faces

filters.trim_saddle_points(peaks, dt[, …])

Removes peaks that were mistakenly identified because they lied on a saddle or ridge in the distance transform that was not actually a true local peak.

filters.trim_small_clusters(im[, size])

Remove isolated voxels or clusters of a given size or smaller