Filters

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])

Identifies all voxels that are not connected to the edge of the image.

filters.find_dt_artifacts(dt)

Label points in a distance transform that are closer to image boundary than solid

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

Finds local maxima in the distance transform

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

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

filters.flood_func(im, labels, func)

Flood each isolated region in an image with a constant value calculated by the given function.

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.nl_means_layered(im[, cores, axis, …])

Apply the non-local means filter to each 2D layer of a stack in parallel.

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

Performs a porosimetry simulution on an image.

filters.prune_branches(skel[, …])

Remove all dangling ends or tails of a skeleton

filters.reduce_peaks(peaks)

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.

filters.region_size(im)

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 locations

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

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