This is a module
tools¶
Collection of helper functions for manipulating images¶
This module contains a variety of functions for manipulating images in ways that do NOT return a modified version of the original image.
|
A minimal class for use when returning multiple values from a function |
Rotates an image to agree with the coordinates used in OpenPNM. |
|
|
Given a tuple containing bounding box coordinates, return a tuple of slice objects. |
|
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 |
|
Find regions of the image that are outside of the solid matrix. |
|
Create an array with corners, edges or faces labelled as |
|
Extracts three planar images from the volumetric image, one for each principle axis. |
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 one. |
|
Take an image with arbitrary greyscale values and adjust them to ensure all values fall in a contiguous range starting at 0. |
|
Use the fast marching method to find distance of each voxel from a starting point |
|
Creates a tri-mesh of the provided region using the marching cubes algorithm |
|
Take an image with some distribution of greyscale values and convert it to a uniform (i.e. flat) distribution. |
|
Overlays |
|
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 dimensionality |
|
Creates round structuring element with the given radius and dimensionality |
|
Takes a greyscale image and randomly shuffles the greyscale values, so that all voxels labeled X will be labelled Y, and all voxels labeled Y will be labeled Z, where X, Y, Z and so on are randomly selected from the values in the input image. |
|
Recombines image chunks back into full image |
|
Returns a sanitized string in the form of name.extension |
|
Fetches the docstring for a function and returns it in markdown format. |
|
Returns slices into an image describing the specified number of sub-arrays. |
|
Remove padding from a previously padded image given original pad widths |