List of commandline tools¶
MedPy is shipped with a number of python scripts (little programs) that are installed on your system together with MedPy. On this page you can find a short overview over these scripts. All are prefixed with medpy_.
Basic image manipulation¶
Prints basic information about an image to the stdout.
Converts between two image formats. Alternatively can be used to create an empty image by example.
Can be used to create an empty image by example.
Re-samples an image using b-spline interpolation.
Manually set the pixel/voxel spacing of an image.
Compares the meta-data and intensity values of two images.
Creates a binary volume containing a regular grid.
Extracts the min and max intensity values of one or more images.
Swap two image dimensions.
Image volume manipulation¶
Extracts a sub volume from an image.
Splits a volume into a number of sub volumes along a given dimension.
Takes an image and a second image containing a binary mask, then extracts the sub volume of the first image defined by the bounding box of the foreground object in the binary image.
Fit an existing image into a new shape by either extending or cutting all dimensions symmetrically.
Extracts the intersecting parts of two volumes regarding offset and voxel-spacing.
Joins a number of xD images by adding a new dimension, resulting in a (x+1)D image.
Splits a xD image into a number of (x-1)D images.
Stacks a number of sub volumes together along a defined dimension.
Enlarges an image by adding (interpolated) slices.
Reduces an image by simply discarding slices.
Reslices a 3D image formed by stacked up 3D volumes into a real 4D images (as e.g. often necessary for DICOM).
Takes a number of 2D DICOM slice (a DICOM series) and creates a 3D volume from them.
Takes a number of 2D DICOM slice (a DICOM series) and creates a 4D volume from them (split-points are passed as arguments).
Binary image manipulation¶
Re-samples a binary image according to a supplied voxel spacing using shape based interpolation where necessary.
Converts a binary volume into a surface contour.
Joins a number of binary images into a single conjunction using sum, avg, max or min.
Performs a logical OR on two binary images.
Gradient magnitude image filter. Output is float.
Apply binary morphology (dilation, erosion, opening or closing) to a binary image.
Apply the edge preserving anisotropic diffusion filter to an image.
Applies a watershed filter, results in a label map / region image.
GC based on (and shipped with, ask!) Max-flow/min-cut by Boykov-Kolmogorov algorithm, version 3.01 .
Executes a voxel based graph cut. Only supports the boundary term.
Executes a label based graph cut. Only supports the boundary term.
Executes a label based graph cut. Only supports the boundary term. Reduces the input image by considering only the region defined by the bounding box around the background markers.
Executes a label based graph cut. Only supports the boundary term. Reduces the memory requirements by splitting the image into a number of sub-volumes. Note that this will result in a non-optimal cut.
Executes a label based graph cut. With boundary and regional term.
Counts the number of unique intensity values in an image i.e. the amount of labelled regions.
Fits the labelled regions of a label map image to a binary segmentation map.
Takes to label maps and superimpose them to create a new label image with more regions.