film(1)

πŸŽ€ film(1) β€” the CMTK glow-up for your janky interleaved scans πŸŽ€

okay bestie, welcome to film, a manual page from the Computational Morphology Toolkit (that's CMTK, section 1 of the manual, and yes you're in the right place πŸ’–). Pull up a chair, grab a strawberry πŸ“, and let's fix some interleaved motion together. This is giving "main character energy for your MRI data."


✨ NAME ✨

film β€” Fix interleaved motion using inverse interpolation

like. that's it. that's the whole job. and it EATS. πŸ’…


🌸 SYNOPSIS 🌸

film InputImage OutputImage

two args, no drama. you got this.


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: film takes an interleaved input image and splits it into the pass images, then co-registers them with each other, and then reconstructs a motion-corrected image. that's the pipeline, that's the tea β˜•βœ¨


πŸ‘‘ OPTIONS πŸ‘‘

πŸ’œ Global Toolkit Options (these are shared by all CMTK tools)

  • --help β€” writes the list of basic command line options to standard output. little snack, very helpful 🫢
  • --help-all β€” writes the complete list of basic and advanced command line options to standard output. the full lore drop.
  • --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. manpage-ception, iconic.
  • --xml β€” writes the command line syntax specification in XML markup (for Slicer integration). Slicer besties, this one's for you.
  • --version β€” writes the toolkit version to standard output.
  • --echo β€” writes the current command line to standard output. so you can see what you just did, no cap.
  • --verbose-level <integer> β€” set the verbosity level, exactly to <integer>.
  • --verbose, -v β€” increment verbosity level by 1 (deprecated; supported for backward compatibility). it still works, but it's lowkey a legacy moment, ngl.
  • --threads <integer> β€” set the maximum number of parallel threads (for POSIX threads and OpenMP). parallelize, periodt.

πŸ“ Input Options

  • --padding-value <double> β€” set the padding value for the input image. pixels that have this value will be ignored. [Default: disabled] β€” so by default nothing gets ignored, but you can ghost certain pixels if you want.

🌈 Interleaving Options

  • --interleave-axis β€” define the interleave axis: this is the through-slice direction of the acquisition. Supported values are "guess-from-input", "axial", "sagittal", "coronal", "interleave-x", "interleave-y", "interleave-z", where the default is "guess-from-input" β€” or just use one of these shortcuts instead:
    • --guess-from-input β€” Guess from input image [This is the default]
    • --axial, -a β€” Interleaved axial images
    • --sagittal, -s β€” Interleaved sagittal images
    • --coronal, -c β€” Interleaved coronal images
    • --interleave-x, -x β€” Interleaved along x axis
    • --interleave-y, -y β€” Interleaved along y axis
    • --interleave-z, -z β€” Interleaved along z axis
  • --passes <integer>, -p <integer> β€” number of interleaved passes. [Default: 2] β€” yeah, two, the classic.
  • --pass-weight <string>, -W <string> β€” set the contribution weight for a pass, written in the form 'pass:weight'. like a little pass-to-weight situationship.

πŸ’€ Motion Correction / Registration Options

  • --reference-image <image-path>, -R <image-path> β€” use a separate high-resolution reference image for registration. [Default: NONE] β€” big fancy reference energy ✨
  • --registration-metric β€” the registration metric used for motion estimation by image-to-image registration. Supported values are "nmi", "mi", "cr", "msd", "cc", where the default is "msd" β€” or pick one of these:
    • --nmi β€” Use Normalized Mutual Information for pass-to-reference registration
    • --mi β€” Use standard Mutual Information for pass-to-reference registration
    • --cr β€” Use Correlation Ratio for pass-to-reference registration
    • --msd β€” Use Mean Squared Differences for pass-to-reference registration [This is the default]
    • --cc β€” Use Cross-Correlation for pass-to-reference registration
  • --import-xforms-path <path> β€” path of the file to import transformations between passes from. [Default: NONE]
  • --export-xforms-path <path> β€” path of the file to export transformations between passes to. [Default: NONE]

🧚 Initial Volume Injection Options

  • --injection-kernel-sigma <double>, -S <double> β€” standard deviation of the Gaussian kernel for volume injection, in multiples of pixel size in each direction. [Default: 0.5]
  • --injection-kernel-radius <double>, -r <double> β€” truncation radius factor of the injection kernel. the kernel gets truncated at sigma*radius, where sigma is the kernel standard deviation. [Default: 2]

⭐ Inverse Interpolation Options

  • --inverse-interpolation-kernel β€” the kernel used for the inverse interpolation reconstruction. Supported values are "cubic", "linear", "hamming-sinc", "cosine-sinc", where the default is "cubic" β€” or just use one of these:
    • --cubic, -C β€” Tricubic interpolation [This is the default]
    • --linear, -L β€” Trilinear interpolation (faster but less accurate)
    • --hamming-sinc, -H β€” Hamming-windowed sinc interpolation
    • --cosine-sinc, -O β€” Cosine-windowed sinc interpolation (most accurate but slowest) β€” the final boss, the queen πŸ‘‘
  • --fourth-order-error, -f β€” use fourth-order (rather than second-order) error for optimization.
  • --num-iterations <integer>, -n <integer> β€” maximum number of inverse interpolation iterations. [Default: 20]

🫢 Reconstruction Regularization Options

  • --l-norm-weight <double> β€” set the constraint weight for Tikhonov-type L-Norm regularization (0 disables the constraint). [Default: 0]
  • --no-truncation, -T β€” turn off regional intensity truncatrion.

πŸ’– Output Options

  • --write-injected-image <image-path> β€” write the initial volume injection image to path. [Default: NONE]
  • --write-images-as-float, -F β€” write output images as floating point [default: same as input] β€” matching the input is the default vibe.

😭 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

go read it bestie, it's the whole license, not a summary 🫢

πŸ’… BUGS πŸ’…

Report bugs at http://nitrc.org/projects/cmtk/ β€” they WANT to hear it, fr fr.


🌟 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. glow-up funded, we love to see it 🌈✨


and that's the whole page, bestie β€” brought to you by CMTK 3.3.1p2, dated Jun 24 2026, section film(1). slay, go fix that motion, and remember: inverse interpolation is not a personality trait, but it could be πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from