.TH warp "1" "Feb 26 2025" "CMTK 3.3.1p2" "The Computational Morphometry Toolkit"
.SH NAME
warp \- B-spline nonrigid registration
.SH SYNOPSIS
\fBwarp\fR ReferenceImage FloatingImage InitialXform 
.SH DESCRIPTION
This program performs nonrigid image registration using multi-resolution optimization of voxel-based image similarity measures and a multi-resolution B-spline transformation model.
.SH OPTIONS
.SS Global Toolkit Options (these are shared by all CMTK tools)
.TP 5
\fB\-\-help\fR
Write list of basic command line options to standard output.
.TP 5
\fB\-\-help-all\fR
Write complete list of basic and advanced command line options to standard output.
.TP 5
\fB\-\-wiki\fR
Write list of command line options to standard output in MediaWiki markup.
.TP 5
\fB\-\-man\fR
Write man page source in 'nroff' markup to standard output.
.TP 5
\fB\-\-xml\fR
Write command line syntax specification in XML markup (for Slicer integration).
.TP 5
\fB\-\-version\fR
Write toolkit version to standard output.
.TP 5
\fB\-\-echo\fR
Write the current command line to standard output.
.TP 5
\fB\-\-verbose-level\fR \fI<integer>\fR
Set verbosity level.
.TP 5
\fB\-\-verbose\fR, \fB\-v\fR
Increment verbosity level by 1 (deprecated; supported for backward compatibility).
.TP 5
\fB\-\-threads\fR \fI<integer>\fR
Set maximum number of parallel threads (for POSIX threads and OpenMP).
.SS Transformation import/export
.TP 5
\fB\-\-initial\fR \fI<transformation-path>\fR
Initialize transformation from given path
.B [Default: NONE]
.TP 5
\fB\-\-write-itk-xform\fR \fI<transformation-path>\fR
Output path for final transformation in ITK format
.B [Default: NONE]
.TP 5
\fB\-\-write-reformatted\fR \fI<image-path>\fR
Write reformatted floating image.
.B [Default: NONE]
.SS Transformation parameters
.TP 5
\fB\-\-grid-spacing\fR \fI<double>\fR, \fB\-g\fR \fI<double>\fR
Control point grid spacing
.B [Default: 15]
.TP 5
\fB\-\-exact-spacing\fR
Use exact control point spacing; do not modify spacing to fit reference image bounding box
.TP 5
\fB\-\-refine\fR \fI<integer>\fR
Number of refinements (control point grid resolution levels)
.B [Default: 0]
.TP 5
\fB\-\-delay-refine\fR
Delay control point grid refinement; first switch to next higher image resolution
.TP 5
\fB\-\-ignore-edge\fR \fI<integer>\fR
Ignore n control point layers along each image face
.B [Default: 0]
.TP 5
\fB\-\-restrict\fR \fI<string>\fR
Restrict deformation to coordinate dimension(s) [one or more of 'x','y','z']
.B [Default: NONE]
.TP 5
\fB\-\-no-adaptive-fix\fR
Disable adaptive fixing of control points; optimize all deformation parameters
.TP 5
\fB\-\-adaptive-fix-thresh\fR \fI<float>\fR
Threshold factor for entropy criterion to fix local control points
.B [Default: 0.5]
.TP 5
\fB\-\-accurate\fR
Accurate computation mode: may give slightly better results after substantially longer computation
\fB[This is the default]\fR
.TP 5
\fB\-\-fast\fR
Fast computation mode: may give slightly worse results than accurate mode, but saves substantial CPU time
.TP 5
\fB\-\-switch\fR, \fB\-S\fR
Switch reference and floating image
.SS Regularization parameters
.TP 5
\fB\-\-jacobian-weight\fR \fI<float>\fR
Weight for Jacobian-based local volume preservation constraint
.B [Default: 0]
.TP 5
\fB\-\-energy-weight\fR \fI<float>\fR
Weight for grid bending energy constraint
.B [Default: 0]
.TP 5
\fB\-\-rigidity-weight\fR \fI<float>\fR
Weight for local rigidity constraint
.B [Default: 0]
.TP 5
\fB\-\-ic-weight\fR \fI<float>\fR
Weight for inverse consistency constraint
.B [Default: 0]
.TP 5
\fB\-\-relax\fR \fI<float>\fR
Weight relaxation factor for alternating under-constrained iterations
.B [Default: -1]
.TP 5
\fB\-\-relax-to-unfold\fR
Before each resolution level, regularize negative-Jacobian areas of the deformation to unfold them.
.SS Optimization parameters
.TP 5
\fB\-\-exploration\fR \fI<double>\fR, \fB\-e\fR \fI<double>\fR
Search space exploration (initial step size)
.B [Default: -1]
.TP 5
\fB\-\-accuracy\fR \fI<double>\fR, \fB\-a\fR \fI<double>\fR
Search accuracy (initial step size)
.B [Default: -1]
.TP 5
\fB\-\-stepfactor\fR \fI<double>\fR, \fB\-f\fR \fI<double>\fR
Factor for search step size reduction. Must be > 0.0 and < 1.0 [default: 0.5]
.B [Default: 0.5]
.TP 5
\fB\-\-delta-f-threshold\fR \fI<double>\fR
Optional threshold to terminate optimization (level) if relative change of target function drops below this value.
.B [Default: 0]
.TP 5
\fB\-\-no-maxnorm\fR
Use Euclid norm for gradient normalication in optimization, rather than maximum norm
.SS Image resolution parameters
.TP 5
\fB\-\-sampling\fR \fI<double>\fR, \fB\-s\fR \fI<double>\fR
Image sampling (finest resampled image resolution)
.B [Default: -1]
.TP 5
\fB\-\-coarsest\fR \fI<double>\fR
Upper limit for image sampling in multiresolution hierarchy
.B [Default: -1]
.TP 5
\fB\-\-omit-original-data\fR
Do not use original data in full resolution for final registration stage.
.SS Image data
.TP 5
\fB\-\-registration-metric\fR
Registration metric for motion estimation by image-to-image registration.
Supported values: "nmi", "mi", "cr", "msd", "ncc", where the default is "nmi", or use one of the following:
.RS 5
.TP 5
\fB\-\-nmi\fR
Normalized Mutual Information metric
\fB[This is the default]\fR
.TP 5
\fB\-\-mi\fR
Standard Mutual Information metric
.TP 5
\fB\-\-cr\fR
Correlation Ratio metric
.TP 5
\fB\-\-msd\fR
Mean Squared Difference metric
.TP 5
\fB\-\-ncc\fR
Normalized Cross Correlation metric
.RE
.TP 5
\fB\-\-match-histograms\fR
Match floating image histogram to reference image histogram.
.TP 5
\fB\-\-force-outside-value\fR \fI<double>\fR
Force values outside field of view to this value rather than drop incomplete pixel pairs
.B [Default: disabled]
.SS Reference Image Preprocessing
.TP 5
\fB\-\-class-ref\fR \fI<string>\fR
Data class: grey (default) or label
.B [Default: NONE]
.TP 5
\fB\-\-pad-ref\fR \fI<double>\fR
Padding value
.B [Default: disabled]
.TP 5
\fB\-\-thresh-min-ref\fR \fI<double>\fR
Minimum value truncation threshold
.B [Default: disabled]
.TP 5
\fB\-\-thresh-max-ref\fR \fI<double>\fR
Maximum value truncation threshold
.B [Default: disabled]
.TP 5
\fB\-\-prune-histogram-ref\fR \fI<integer>\fR
Number of bins for histogram-based pruning
.B [Default: disabled]
.TP 5
\fB\-\-histogram-equalization-ref\fR
Apply histogram equalization
.TP 5
\fB\-\-sobel-filter-ref\fR
Apply Sobel edge detection filter
.TP 5
\fB\-\-crop-index-ref\fR \fI<string>\fR
Cropping region in pixel index coordinates [parsed as %d,%d,%d,%d,%d,%d for i0,j0,k0,i1,j1,k1]
.B [Default: NONE]
.TP 5
\fB\-\-crop-world-ref\fR \fI<string>\fR
Cropping region in world coordinates [parsed as %f,%f,%f,%f,%f,%f for x0,y0,z0,x1,y1,z1]
.B [Default: NONE]
.SS Floating Image Preprocessing
.TP 5
\fB\-\-class-flt\fR \fI<string>\fR
Data class: grey (default) or label
.B [Default: NONE]
.TP 5
\fB\-\-pad-flt\fR \fI<double>\fR
Padding value
.B [Default: disabled]
.TP 5
\fB\-\-thresh-min-flt\fR \fI<double>\fR
Minimum value truncation threshold
.B [Default: disabled]
.TP 5
\fB\-\-thresh-max-flt\fR \fI<double>\fR
Maximum value truncation threshold
.B [Default: disabled]
.TP 5
\fB\-\-prune-histogram-flt\fR \fI<integer>\fR
Number of bins for histogram-based pruning
.B [Default: disabled]
.TP 5
\fB\-\-histogram-equalization-flt\fR
Apply histogram equalization
.TP 5
\fB\-\-sobel-filter-flt\fR
Apply Sobel edge detection filter
.TP 5
\fB\-\-crop-index-flt\fR \fI<string>\fR
Cropping region in pixel index coordinates [parsed as %d,%d,%d,%d,%d,%d for i0,j0,k0,i1,j1,k1]
.B [Default: NONE]
.TP 5
\fB\-\-crop-world-flt\fR \fI<string>\fR
Cropping region in world coordinates [parsed as %f,%f,%f,%f,%f,%f for x0,y0,z0,x1,y1,z1]
.B [Default: NONE]
.SS Output parameters
.TP 5
\fB\-\-outlist\fR \fI<string>\fR, \fB\-o\fR \fI<string>\fR
Output path for final transformation
.B [Default: NONE]
.TP 5
\fB\-\-protocol\fR \fI<string>\fR, \fB\-p\fR \fI<string>\fR
Optimization protocol output file name
.B [Default: NONE]
.TP 5
\fB\-\-time\fR \fI<string>\fR, \fB\-t\fR \fI<string>\fR
Computation time statistics output file name
.B [Default: NONE]
.TP 5
\fB\-\-output-intermediate\fR
Write transformation for each level [default: only write final transformation]
.SS Image/Transformation Database
.TP 5
\fB\-\-db\fR \fI<string>\fR
Path to image/transformation database that should be updated with the new registration and/or reformatted image.
.B [Default: NONE]
.SH AUTHORS
Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko
.SH LICENSE
http://www.fsf.org/licensing/licenses/gpl.html
.SH BUGS
Report bugs at http://nitrc.org/projects/cmtk/
.SH 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.