gmm(1)

πŸ’– gmm β€” Gaussian Mixture Model Segmentation πŸ’–

okay so bestie, this is gmm(1) from The Computational Morphometry Toolkit (that's CMTK to the girlies who know πŸ’…) and it's literally the girlboss of brain-image segmentation. Let's get into it ✨


🌸 NAME 🌸

gmm β€” Gaussian mixture model segmentation. that's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

gmm InputImage OutputImage PriorImages

three little args and she's ready to slay πŸ’–


✨ DESCRIPTION ✨

So what she actually does: you hand her an image and she segments it into c classes using the EM algorithm for Gaussian mixtures, with optional priors if you're feeling fancy. that's the whole thing. no notes. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

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

these ones are the communal property of every CMTK tool, so you'll see them everywhere. iconic behavior honestly.

  • --help β€” writes the list of basic command line options to standard output. the starter pack 🫢
  • --help-all β€” writes the complete list of basic and advanced command line options to standard output. the deluxe edition, the director's cut, the full lore ✨
  • --wiki β€” writes the list of command line options to standard output in MediaWiki markup. for when you're feeling wiki-pilled πŸ“
  • --man β€” writes man page source in 'nroff' markup to standard output. manpage-ception fr fr πŸ’€
  • --xml β€” writes command line syntax specification in XML markup (this one's for Slicer integration, iykyk) 🧩
  • --version β€” writes the toolkit version to standard output. flex the number bestie πŸ’…
  • --echo β€” writes the current command line to standard output. so you can see exactly what you just did πŸ™ˆ
  • --verbose-level <integer> β€” sets the verbosity level. turn that dial, girl 🎚️
  • --verbose, -v β€” increments the verbosity level by 1. ⚠️ deprecated, but supported for backward compatibility β€” she's an old queen and we respect her, but maybe don't build your whole life on her πŸ’œ
  • --threads <integer> β€” sets the maximum number of parallel threads (for POSIX threads and OpenMP). make her run in parallel, she loves that πŸƒβ€β™€οΈπŸ’¨

πŸ“ General Classification Parameters

the actually-important girlies for this specific tool:

  • --mask <string>, -m <string> β€” path to the foreground mask image. if you don't provide one, the input image gets used as its own mask β€” but that does NOT work properly if the input image itself has pixels with zero or negative values. so like... heads up bestie 😭 [Default: NONE]
  • --classes <integer>, -c <integer> β€” number of classes. how many buckets are we sorting into, queen? [Default: 3]
  • --iterations <integer>, -n <integer> β€” number of EM iterations. how many times she loops that EM glow-up routine. [Default: 10]

🧚 Handling of Priors

for when you come bearing prior knowledge (a gift, honestly):

  • --priors-init-only β€” use priors for initialization only. one-and-done, she doesn't keep consulting them πŸŽ€
  • --prior-epsilon <double>, -e <double> β€” a small value added to all class priors to eliminate zero priors. tiny little epsilon, doing the lord's work so nothing ends up at zero πŸ™ [Default: 0]

πŸ’… Output Parameters

  • --probability-maps, -p β€” write probability maps. the file names for these maps get generated from the output image path by inserting '_prob#' before the file format suffix, where '#' is the index of the respective class, numbered starting at 1 (zero is background). so yes, class numbering starts at 1 here, background owns the zero, don't @ me 🌈

πŸ’œ AUTHORS πŸ’œ

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko. a whole squad, a whole ensemble cast, and they ate πŸ‘‘


πŸ“œ LICENSE πŸ“œ

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

GPL things, go read it, it's giving freedom πŸ•ŠοΈ


πŸ’€ BUGS πŸ’€

Report bugs at:

http://nitrc.org/projects/cmtk/

not me asking you to file a bug report but like... please do, she wants to be fixed πŸ™ˆ


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

shoutout to the funders, real ones fr fr πŸ’–


aaand that's the whole page bestie! this is CMTK 3.3.1p2, dated Jun 24 2026 β€” she's current, she's cute, she segments. go forth and cluster βœ¨πŸ¦‹πŸŽ€πŸ’…

πŸ“¦ where this page comes from