porespy.tools#
This module contains a variety of functions for manipulating images in ways that do NOT return a modified version of the original image.
Classes#
Functions#
Rotates an image to agree with the coordinates used in OpenPNM. |
|
|
Take an image with some distribution of greyscale values and convert it to |
|
As per Herons formula |
|
|
|
Given a tuple containing bounding box coordinates, return a tuple of slice |
|
Finds the number of blocks in each direction given the size of the blocks |
|
|
|
|
|
Return area and volume lists for the marching cubes templates. Reads the |
|
|
|
|
|
Adjust slice indices to include additional voxles around the slice. |
|
Returns a cylindrical section of the image of specified radius. |
|
Combine given regions into a single boolean mask |
|
Extracts the middle section of a image |
|
Return outward perpendicular vector distance of face along the z axis |
|
Finds the lower and upper corner surrounding the foreground in the image |
|
Find regions of the image that are outside of the solid matrix. |
|
Finds all viable block sizes between lower and upper limits |
|
|
Get the path to the test fixtures directory. |
|
|
Extracts three planar images from the volumetric image, one for each |
|
|
|
Returns slices into an image describing the specified number of sub-arrays. |
|
Creates a set of grids spanning the request block size range |
|
Generates a list of slice objects which can be used to obtain cubic subdomains |
|
Generates a list of slice objects which can be used to obtain slabs of an image |
|
Fetches a version of |
|
Test if a list of coordinates are inside a given convex hull |
|
Inserts a cylinder of given radius onto an image |
|
Inserts a sphere of a specified radius into a given image |
|
Given an image containing labels, removes all labels except the specified |
|
|
|
|
|
|
|
Take an image with arbitrary greyscale values and adjust them to ensure |
|
|
|
Use the fast marching method to find distance of each voxel from a starting |
|
Generates a marching cubes template list file, if one is not available |
|
Creates a tri-mesh of the provided region using the marching cubes |
|
Overlays |
|
Assumes pad width=1 and mode is constant = 0 |
|
Given a list of dimensions or an image finds shape in a clean format |
|
Converts given steps into a list of sizes |
Inserts disks/spheres into an image at locations indicated by non-zero values |
|
|
Creates spherical ball structuring element for morphological operations |
|
Creates circular disk structuring element for morphological operations |
|
Creates rectilinear structuring element with the given size and |
|
Creates round structuring element with the given radius and dimensionality |
|
Takes a greyscale image and randomly shuffles the greyscale values. |
|
Recombines image blocks back into full image |
|
A helper function to convert Results objects to pandas DataFrames. |
|
Returns a sanitized string in the form of name.extension |
|
Fetches the docstring for a function and returns it in markdown format. |
|
|
|
Homemade version of matlab tic and toc function, tic starts or resets |
|
Homemade version of matlab tic and toc function, tic starts or resets |
|
Remove padding from a previously padded image given original pad widths |