## table of contents

CMTK(1) | The Computational Morphometry Toolkit | CMTK(1) |

# NAME¶

cmtk - the Computational Morphometry Toolkit

# SYNOPSIS¶

**cmtk** <command> [options]

# DESCRIPTION¶

This helper script provides a unified access to all command line
tools provided by CMTK. Please specify CMTK's command to run and its
options. See **cmtk-<command>(1)** manpage or output of **cmtk
<command> --help** for <command> specific options

# COMMANDS¶

**asegment**- Register a target image to an atlas, using affine followed by nonrigid B-spline registration, then reformat the atlas label map to the target image.
**asegment_sri24**- Register a target image to a selected channel of the SRI24 human brain atlas, then reformat one of the atlas label maps to the target image. Note: it is assume that the target image is skull-stripped, i.e., contains only the brain.
**average_affine**- This tool computes the average of a sequence of user-provided affine coordinate transformations.
**average_images**- This tool computes pixelwiase average, variance, standard deviation, z-score, or entropy images from a list of user-provided intensity images.
**average_labels**- Average co-registered label images using partial volumes
**avg_adm**- Compute average-shape average-intensity images and deformation maps using an active deformation model.
**concat_affine**- This tool computes the explicit concatenation of multiple affine coordinate transformations, each of which can be optionally inverted.
**convert_warp**- This tool converts nonrigid B-spline free-format deformation coordinate transformations between different representations (e.g., absolute vs. relative vectors). Also creates fractional transformations.
**convertx**- This tool converts between image file formats and pixel data types. It can also apply simple, general-purpose image operations in the process. An arbitrary number of operations can be specified on the command line, which will be applied exactly in the order given.
**dbtool**- This tool modifies and queries the database of images and transformations between them.
**describe**- This tool prints a detailed description of the input files as either image(s) or transformation(s).
**destripe**- This program corrects stripe artifacts in acquired image stacks which can result from between-slice intensity scale differences.
**detect_adni_phantom**- This tool detects the locations of all spherical landmarks in a 3D image of the Magphan EMR051 structural imaging phantom (a.k.a. ADNI Phantom).
**detect_spheres_matched_filter**- This tool detects spherical objects in three-dimensional images.
**dof2mat**- Convert affine transformation from degrees-of-freedom representation to matrix form
**dwi_mask_bad_slices**- This tool reads a set of 3D diffusion-weighted MR images and finds bad slices. A bad slice in a diffusion image is detected as one whose mean intensity is outside a specified interval around the mean of the means of all corresponding slices from the remaining diffusion images.
**epiunwarp**- Correct B0 field inhomogeneity-induced distortion in Echo Planar Images (e.g., diffusion-weighted images) using two images acquired with opposing phase encoding directions.
**fib2image**- Fiber tracking results from the UNC Fiber Tracking tool are read from Standard Input and all fiber points are drawn into a 3D image. The result is written in one of the supported image file formats.
**fibxform**- A file with fiber tracking results from the UNC Fiber Tracking tool is read from Standard Input and one or more (concatenated) coordinate transformations are applied to all fiber point coordinates. The result is written to Standard Output, again in UNC fiber file format.
**film**- This tool splits an interleaved input image into the pass images, co-registers them, and reconstructs a motion-corrected image
**filter**- This tool applies spatial filtering operators, including cnotent-sensitive opersators, based on selective Gaussian kernels.
**fit_affine_dfield**- Fit a linear affine transformation to a nonrigid transformation, either a B-spline free-form deformation or a non-parametric deformation field.
**fit_affine_xform**- Fit a linear affine transformation to a list of concatenated, optionally inverted, transformations.
**fit_affine_xform_landmarks**- Fit a linear affine transformation to a set of matched landmarks.
**fit_spline_dfield**- Fit a parametric nonrigid transformation (B-spline free-form deformation) to a deformation field
**fit_spline_xform**- Fit a parametric nonrigid transformation (B-spline free-form deformation) to a list of concatenated, optionally inverted, transformations.
**geomatch**- This tool reads two or more images and tests whether their grid dimensions, pixel sizes, and image-to-space transformations match. Optionally, all images are reoriented into standard orientation before performing the test. If all images match, the tool returns with exit code 0, otherwise it returns with exit code 2. In case of an error (e.g., one of the images can not be read), the exit code is 1.
**glm**- Statistical modeling of pixel intensities in multiple images using a General Linear Model.
**gmm**- Segment an image into c classes using the EM algorithm for Gaussian mixtures with optional priors.
**gregxform**- THIS TOOL IS DEPRECATED. PLEASE USE streamxform INSTEAD.
**groupwise_affine**- This tool registers a population of input images simultaneously, without a template, using either the 'congealing' algorithm or a groupwise similarity measure based on a continuous approximation of mutual information ('RMI').
**groupwise_init**- Compute initial affine alignment for a group of input images, which can be used as an input for groupwise registration
**groupwise_warp**- This tool nonrigidly registers a population of input images simultaneously, without a template, using either the 'congealing' algorithm or a groupwise similarity measure based on a continuous approximation of mutual information ('RMI').
**hausdorff**- This tool computes the Hausdorff distance between two label images.
**histogram**- Create a histogram of image intensities and write as tab-separated text file to standard output
**imagemath**- Perform operations on images using stack-based postfix notation.
**interleaved_bad_slices**- This tool reads a time series of 3D images and detects outliers.
**iterative_shape_averaging****jidb**- This tool splits an interleaved input image into the pass images, co-registers them, and reconstructs a motion-corrected image
**levelset**- Levelset-type segmentation of foreground/background using minimum regional variance energy
**lmsba**- This tool combines multiple multi-class segmentations from co-registered and reformatted atlases using locally-weighted Shape-Based Averaging.
**lsba**- This tool combines multiple binary segmentations from co-registered and reformatted atlases using locally-weighted Shape-Based Averaging.
**lvote**- This tool combines multiple segmentations fro co-registered and reformatted atlases using locally-weighted voting.
**make_initial_affine**- Compute initial affine transformation by aligning centers of mass or principal axes
**mat2dof**- Convert transformation matrix to degrees of freedom
**mcaffine**- Multi-channel affine image registration using histogram-based or covariance-based joint entropy measures
**mcwarp**- Multi-channel nonrigid B-spline image registration using histogram-based or covariance-based joint entropy measures
**mk_adni_phantom**- Generate image of the ADNI structural imaging calibration phantom (a.k.a. Magphan EMR051).
**mk_analyze_hdr**- Make header file according Analzye 7.5 format based on user-supplied parameters for geometry, data type, orientation, etc.
**mk_nifti_hdr**- Make header file according to NIFTI file format based on user-supplied parameters for geometry, data type, orientation, etc.
**mk_phantom_3d**- Generate 3D digital phantom images using a selection of drawing commands
**mrbias**- This program corrects intensity inhomogeneity artifacts in MR images using a bias field estimated via entropy minimization.
**overlap**- Compute overlap measures between two or more images
**probe**- This tool prints pixel values or symbolic labels at a list of user-provided image coordinates.
**pxsearch**- This tool reads an image file, as well as a list of pixel coordinates from standard input. For each pixel, a local neighbourhood in the image is searched for the maximum value. The location of the maximum is then written to standard output.
**reformatx**- Extended volume reformatter tool to compute reformatted images and Jacobian maps from arbitrary sequences of concatenated transformations
**registration**- This program performs rigid and affine image registration using multi-resolution optimization of voxel-based image similarity measures.
**registrationx**- This program performs rigid and affine image registration using multi-resolution optimization of voxel-based image similarity measures.
**regress**- Linear (and higher-order polynomial) regression of deformation fields and images.
**reorient**- Convert between image orientations, i.e., physically re-order pixel array and adapt stored anatomical orientation information
**sba**- Average segmentations (label fields) using the Euclidean Distance Transform. All input images must be in the same space. EDT is computed in this space also. See http://dx.doi.org/10.1109/TIP.2006.884936 for details of the underlying algorithm.
**sbai**- Average segmentations (label fields) using the Euclidean Distance Transform. This tool performs joint interpolation and averaging by interpolating from the EDT. This requires that the inputs are transformations from the same fixed to (not necessarily) different moving images. EDT computation is done in the space of each moving image. See http://dx.doi.org/10.1109/TIP.2006.884936 for details of the underlying algorithm.
**sequence**- Analyze sequence of numerical values, which is read from standard input
**similarity**- Compute similarity measures such as intensity difference or label overlaps between two images.
**split**- Split volume image into sub-images, i.e., to separate interleaved images into passes
**statistics**- Statistical computations on image pixel intensities, i.e., means and standard deviations
**stream_pixels**- This tool reads one or more images and writes all their pixels to standard output in binary form. Optionally, each image can be reoriented to a specified anatomical orientation and/or converted to a different data type. This is useful for piping image data through a pipeline, e.g., the Camino DTI toolkit.
**streamxform**- An ASCII-format list of point coordinates is read from standard input and a user-provided sequence of coordinate transformations (each optionally inverted) is applied to them. The transformed points are then written to standard output.
**sympl**- Compute the approximate symmetry plane of an image to determine, for example, the mid-sagittal plane in human brain images. Various forms of output are supported, e.g., writing the input image with the symmetry plane drawn into it, or the input image realigned along the symmetry plane.
**symplx**- Compute the approximate symmetry plane of an image to determine, for example, the mid-sagittal plane in human brain images. Various forms of output are supported, e.g., writing the input image with the symmetry plane drawn into it, or the input image realigned along the symmetry plane.
**ttest**- Pixelwise tests of statistical significance. Also compute correlations and z-scores
**unsplit**- Join separate image stacks into a single interleaved image volume
**unwarp_image_phantom**- This tool computes either a polynomial transformation or B-spline free-form deformation to unwarp an image. The transformation is based on expected and detected landmarks in an image of a structural phantom acquired on the same scanner. Use the 'detect_adni_phantom' tool to detect landmarks of the ADNI Phantom in an image and generate a phantom description file suitable for use with this tool.
**vol2csv**- This tool computes the volumes of regions in a label image. It optionally accepts density maps (e.g., for different tissues) and computes and prints the per-region content for each. Also, the tool can accept an optional 'pixel volume' map to account for local pixel volume variations, e.g., due to spatial distortion.
**volume_injection**- Reconstruction a high-resolution volume from multiple co-registered (low-resolution) images using forward volume injection
**volume_reconstruction**- Iterative volume reconstruction from co-registered images using inverse interpolation or joint deblurring
**vtkxform**- An ASCII-format VTK file is read from standard input and a user-provided coordinate transformation (optionally inverted) is applied to the vertex coordinates. A VTK file with transformed points is then written to standard output.
**warp**- This program performs nonrigid image registration using multi-resolution optimization of voxel-based image similarity measures and a multi-resolution B-spline transformation model.
**warp2ps**- Write deformation field as deformed grid in PostScript format for visualization and illustration
**warpx**- This program performs nonrigid image registration using multi-resolution optimization of voxel-based image similarity measures and a multi-resolution B-spline transformation model.
**xform2dfield**- Convert parametric rigid or nonrigid transformation to deformation field, sampled at pixel locations of a given reference image
**xform2itk**- This tool converts coordinate transformations from CMTK format to ITK format and, in the process, also correct for differences in image coordinate conventions
**xform2scalar**- This tool extracts scalar measures from transformations and deformation fields, sampled at grid locations, and writes the results to an image. Examples of supported scalar measures are: x,y,z component of the transformation, magnitude of the transformation, and Jacobian determinants.

# AUTHORS¶

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko

# LICENSE¶

# BUGS¶

Report bugs at http://nitrc.org/projects/cmtk/

# ACKNOWLEDGMENTS¶

CMTK is developed with support from the NIAAA under Grant AA021697, National Consortium on Alcohol and Neurodevelopment in Adolescence (N-CANDA): Data Integration Component. From April 2009 through September 2011, CMTK development and maintenance was supported by the NIBIB under Grant EB008381.

Jun 6 2022 | CMTK 3.3.1p2 |