unwarp_...phantom(1)

πŸ’– unwarp_image_phantom(1) πŸ’–

okay bestie, gather round, because this one is a chef's kiss little CMTK tool and you're gonna want it in your life. it lives in the Computational Morphometry Toolkit, so you already know it's giving brain-science realness 🧠✨


🌸 NAME 🌸

unwarp_image_phantom β€” the girlies who make a transformation to unwarp an image based on a phantom description πŸŽ€ (yes, phantom like a structural phantom, not a ghost, don't get it twisted πŸ‘»)


✨ SYNOPSIS ✨

unwarp_image_phantom InputPhantom InputImage OutputXform

three args, in, in, out. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this tool computes either a polynomial transformation or a B-spline free-form deformation, and its whole job is to unwarp an image. the transformation is based on expected and detected landmarks in an image of a structural phantom that got acquired on the same scanner. periodt.

and listen: you don't just make the phantom description out of thin air. use the detect_adni_phantom tool to detect landmarks of the ADNI Phantom in an image and generate a phantom description file that's suitable for use with this tool. that's the pipeline, bestie, that's the lore. 🫢


πŸ‘‘ OPTIONS πŸ‘‘

🌈 Global Toolkit Options 🌈 (these are shared by all CMTK tools, so they're like the group chat everyone's in)

  • --help β€” writes the list of basic command line options to standard output. baby's first flag 🍼
  • --help-all β€” writes the complete list of basic and advanced command line options to standard output. the full tea β˜•
  • --wiki β€” writes the list of command line options to standard output in MediaWiki markup. wiki girlies rise 🧚
  • --man β€” writes man page source in nroff markup to standard output. meta, i know, we love it πŸ’€
  • --version β€” writes toolkit version to standard output.
  • --echo β€” writes the current command line to standard output. it's giving receipts πŸ“
  • --verbose-level <integer> β€” set verbosity level.
  • --verbose, -v β€” increment verbosity level by 1. > ok so heads up: this one is deprecated, it's only supported for backward compatibility. still works, just know πŸ™ˆ
  • --threads <integer> β€” set maximum number of parallel threads (for POSIX threads and OpenMP). multi-threaded slay πŸ”₯

πŸ’œ Fitting Options πŸ’œ

  • --fit-inverse β€” fit the inverse transformation (mapping actual to expected landmark locations). this is useful for computing a Jacobian volume correction map (using reformatx) without having to numerically invert the fitted unwarping transformation. no cap, that saves you so much pain 😭
  • --fit-forward β€” fit the forward transformation (mapping expected to actual landmark locations). this is useful for rectifying the image via reslicing (using reformatx). [This is the default] ⭐

πŸŽ€ Transformation Models πŸŽ€

  • --spline β€” fit B-spline free-form deformation.
  • --poly β€” fit polynomial transformation. [This is the default] ⭐

πŸ“ Polynomial Fitting Options (with --poly) πŸ“

  • --degree <integer> β€” degree of the fitted polynomial transformation. [Default: 4]

🌸 B-Spline Fitting Options (with --spline) 🌸

  • --final-cp-spacing <double> β€” final control point grid spacing of the output B-spline transformation. [Default: 0]
  • --final-cp-dims <string> β€” final control point grid dimensions (i.e., number of control points) of the output B-spline transformation. to be provided as 'dimX,dimY,dimZ'. [Default: NONE]
  • --levels <integer> β€” number of levels in the multi-level B-spline approximation procedure. [Default: 1]
  • --iterations-per-level <integer> β€” maximum number of spline coefficient update iterations per level in the multi-level B-spline approximation procedure. [Default: 100]
  • --rms-threshold <double> β€” threshold for relative improvement of the RMS fitting residual. the fitting iteration terminates if (rmsAfterUpdate-rmsBeforeUpdate)/rmsBeforeUpdate < threshold. [Default: 0]
  • --no-fit-affine β€” disable fitting of an affine transformation to initialize the spline. instead, fit the spline directly. > bestie, real talk: this usually gives worse results and is discouraged. i said what i said πŸ’€

πŸ’… AUTHORS πŸ’…

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko. legends, every single one πŸ‘‘


⭐ LICENSE ⭐

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


πŸ› BUGS πŸ›

found a bug? report it at http://nitrc.org/projects/cmtk/ β€” do your civic duty bestie 🫑


πŸ’– 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. science is a group project fr fr 🌈


and that's the whole page, bestie! this one's wearin' CMTK 3.3.1p2 energy, dated Jun 24 2026, and it ate, no crumbs left. go unwarp something iconic πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from