warp(1)

✨ warp(1) β€” the B-spline nonrigid registration bestie ✨

Okay so like, welcome to warp, part of The Computational Morphometry Toolkit (CMTK, for the girlies in the know πŸ’…). It does B-spline nonrigid registration and honestly? It ate.


🌸 NAME 🌸

warp β€” B-spline nonrigid registration. That's it, that's the vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

warp ReferenceImage FloatingImage InitialXform

Three little args, one big glow-up for your images ✨


πŸ’– DESCRIPTION πŸ’–

So basically, this program performs nonrigid image registration using multi-resolution optimization of voxel-based image similarity measures and a multi-resolution B-spline transformation model.

Translation for the besties: it wiggles your image around in a bendy, squishy, spline-y way until it lines up with another image, and it does it at multiple zoom levels like a queen who checks her makeup from far away and up close. πŸͺžπŸ‘‘


πŸ‘‘ OPTIONS πŸ‘‘

🌈 Global Toolkit Options (these are shared by all CMTK tools)

These ones are the communal closet β€” every CMTK tool gets to borrow them, no cap.

  • --help β€” Writes the list of basic command line options to standard output. The "just tell me the basics" button.
  • --help-all β€” Writes the complete list of basic and advanced command line options to standard output. The "give me everything, I can handle it" button πŸ”₯
  • --wiki β€” Writes the list of command line options to standard output in MediaWiki markup. For when your docs live on a wiki, periodt.
  • --man β€” Writes man page source in nroff markup to standard output. Meta, iconic, no notes.
  • --xml β€” Writes the command line syntax specification in XML markup (for Slicer integration). Slicer girlies, this one's for you 🫢
  • --version β€” Writes the toolkit version to standard output. Vibe check the release.
  • --echo β€” Writes the current command line to standard output. It's giving receipts.
  • --verbose-level <integer> β€” Sets the verbosity level. Turn the yapping up or down.
  • --verbose, -v β€” Increments the verbosity level by 1. Heads up bestie: this is deprecated, it's only supported for backward compatibility. πŸ’€
  • --threads <integer> β€” Sets the maximum number of parallel threads (for POSIX threads and OpenMP). More threads, more speed, more main character energy.

🧚 Transformation import/export

  • --initial <transformation-path> β€” Initialize transformation from given path [Default: NONE]
  • --write-itk-xform <transformation-path> β€” Output path for the final transformation in ITK format [Default: NONE]
  • --write-reformatted <image-path> β€” Write the reformatted floating image. [Default: NONE]

🌸 Transformation parameters

  • --grid-spacing <double>, -g <double> β€” Control point grid spacing [Default: 15]
  • --exact-spacing β€” Use exact control point spacing; do not modify spacing to fit the reference image bounding box. No fitting, no compromising. πŸ’…
  • --refine <integer> β€” Number of refinements (control point grid resolution levels) [Default: 0]
  • --delay-refine β€” Delay control point grid refinement; first switch to the next higher image resolution.
  • --ignore-edge <integer> β€” Ignore n control point layers along each image face [Default: 0]
  • --restrict <string> β€” Restrict deformation to coordinate dimension(s) [one or more of 'x','y','z'] [Default: NONE]
  • --no-adaptive-fix β€” Disable adaptive fixing of control points; optimize all deformation parameters.
  • --adaptive-fix-thresh <float> β€” Threshold factor for entropy criterion to fix local control points [Default: 0.5]
  • --accurate β€” Accurate computation mode: may give slightly better results after substantially longer computation. [This is the default]
  • --fast β€” Fast computation mode: may give slightly worse results than accurate mode, but saves substantial CPU time. πŸƒβ€β™€οΈπŸ’¨
  • --switch, -S β€” Switch reference and floating image. Swap era. πŸ”„

πŸŽ€ Regularization parameters

  • --jacobian-weight <float> β€” Weight for Jacobian-based local volume preservation constraint [Default: 0]
  • --energy-weight <float> β€” Weight for grid bending energy constraint [Default: 0]
  • --rigidity-weight <float> β€” Weight for local rigidity constraint [Default: 0]
  • --ic-weight <float> β€” Weight for inverse consistency constraint [Default: 0]
  • --relax <float> β€” Weight relaxation factor for alternating under-constrained iterations [Default: -1]
  • --relax-to-unfold β€” Before each resolution level, regularize negative-Jacobian areas of the deformation to unfold them. Unfolding the chaos, one layer at a time 🫢

⭐ Optimization parameters

  • --exploration <double>, -e <double> β€” Search space exploration (initial step size) [Default: -1]
  • --accuracy <double>, -a <double> β€” Search accuracy (initial step size) [Default: -1]
  • --stepfactor <double>, -f <double> β€” Factor for search step size reduction. Must be > 0.0 and < 1.0 [default: 0.5] [Default: 0.5]
  • --delta-f-threshold <double> β€” Optional threshold to terminate optimization (level) if the relative change of target function drops below this value. [Default: 0]
  • --no-maxnorm β€” Use the Euclid norm for gradient normalication in optimization, rather than the maximum norm. (Yes, "normalication" β€” we're quoting the original, don't come for us 😭)

πŸ’œ Image resolution parameters

  • --sampling <double>, -s <double> β€” Image sampling (finest resampled image resolution) [Default: -1]
  • --coarsest <double> β€” Upper limit for image sampling in multiresolution hierarchy [Default: -1]
  • --omit-original-data β€” Do not use original data in full resolution for the final registration stage.

🌈 Image data

  • --registration-metric β€” 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:
    • --nmi β€” Normalized Mutual Information metric [This is the default]
    • --mi β€” Standard Mutual Information metric
    • --cr β€” Correlation Ratio metric
    • --msd β€” Mean Squared Difference metric
    • --ncc β€” Normalized Cross Correlation metric
  • --match-histograms β€” Match floating image histogram to reference image histogram. Twin energy ✨
  • --force-outside-value <double> β€” Force values outside the field of view to this value rather than drop incomplete pixel pairs [Default: disabled]

πŸ“ Reference Image Preprocessing

  • --class-ref <string> β€” Data class: grey (default) or label [Default: NONE]
  • --pad-ref <double> β€” Padding value [Default: disabled]
  • --thresh-min-ref <double> β€” Minimum value truncation threshold [Default: disabled]
  • --thresh-max-ref <double> β€” Maximum value truncation threshold [Default: disabled]
  • --prune-histogram-ref <integer> β€” Number of bins for histogram-based pruning [Default: disabled]
  • --histogram-equalization-ref β€” Apply histogram equalization
  • --sobel-filter-ref β€” Apply Sobel edge detection filter. Edge. Literally. πŸ”ͺ
  • --crop-index-ref <string> β€” Cropping region in pixel index coordinates [parsed as %d,%d,%d,%d,%d,%d for i0,j0,k0,i1,j1,k1] [Default: NONE]
  • --crop-world-ref <string> β€” Cropping region in world coordinates [parsed as %f,%f,%f,%f,%f,%f for x0,y0,z0,x1,y1,z1] [Default: NONE]

πŸ¦‹ Floating Image Preprocessing

  • --class-flt <string> β€” Data class: grey (default) or label [Default: NONE]
  • --pad-flt <double> β€” Padding value [Default: disabled]
  • --thresh-min-flt <double> β€” Minimum value truncation threshold [Default: disabled]
  • --thresh-max-flt <double> β€” Maximum value truncation threshold [Default: disabled]
  • --prune-histogram-flt <integer> β€” Number of bins for histogram-based pruning [Default: disabled]
  • --histogram-equalization-flt β€” Apply histogram equalization
  • --sobel-filter-flt β€” Apply Sobel edge detection filter
  • --crop-index-flt <string> β€” Cropping region in pixel index coordinates [parsed as %d,%d,%d,%d,%d,%d for i0,j0,k0,i1,j1,k1] [Default: NONE]
  • --crop-world-flt <string> β€” Cropping region in world coordinates [parsed as %f,%f,%f,%f,%f,%f for x0,y0,z0,x1,y1,z1] [Default: NONE]

🌟 Output parameters

  • --outlist <string>, -o <string> β€” Output path for final transformation [Default: NONE]
  • --protocol <string>, -p <string> β€” Optimization protocol output file name [Default: NONE]
  • --time <string>, -t <string> β€” Computation time statistics output file name [Default: NONE]
  • --output-intermediate β€” Write transformation for each level [default: only write final transformation]

🧚 Image/Transformation Database

  • --db <string> β€” Path to image/transformation database that should be updated with the new registration and/or reformatted image. [Default: NONE]

πŸ’« AUTHORS πŸ’«

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko. Legends, all of them πŸ‘‘πŸ‘‘


πŸ“œ LICENSE πŸ“œ

http://www.fsf.org/licensing/licenses/gpl.html


πŸ’€ BUGS πŸ’€

Report bugs at http://nitrc.org/projects/cmtk/. Not me manifesting a bug-free run πŸ™ˆ but if it happens, tell the devs, not the group chat.


🫢 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.


And that's the whole page, bestie πŸ’– This one's from CMTK 3.3.1p2, dated Jun 24 2026 β€” so like, shoutout to the version and the date, they're both serving. Go register something nonrigidly. Slay. βœ¨πŸ’…πŸ¦‹

πŸ“¦ where this page comes from