vol2csv(1)

πŸŽ€ vol2csv(1) β€” bestie, we're counting regions and yeeting the numbers into a CSV πŸŽ€

okay so this is the manual page for vol2csv, one of the little legends that ships with CMTK (the Computational Morphology Toolkit). it's a command-line tool, it lives in section 1 of the manual, and it does exactly one job and does it gorgeously. let's get into it πŸ’…


✨ NAME ✨

vol2csv β€” compute regional volumes and write them to a CSV file. that's it. that's the whole personality. 🫢


🌸 SYNOPSIS 🌸

vol2csv RegionsImage DensityImages

two arguments, no drama. give it stuff, get a spreadsheet. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: vol2csv computes the volumes of regions inside a label image. you hand it a file full of region labels and it goes to work, no cap.

it can also optionally take one or more density maps β€” think different tissue types, each one living its own little life β€” and then it computes and prints the per-region content for each of those too. so like, one row per region, one column per density map situation. the way that works is genuinely so satisfying.

and wait, there's more πŸ’– the tool can also accept an optional 'pixel volume' map, which exists to account for local pixel volume variations β€” for example, when spatial distortion is out here making your pixels not all the same size. it's giving "we're being precise about geometry" and we love that for us.


πŸ‘‘ OPTIONS πŸ‘‘

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

these ones are not special to vol2csv β€” literally every CMTK tool has them. it's a shared wardrobe. 🌈

  • --help β€” writes the list of basic command line options to standard output. the lil' 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.
  • --wiki β€” writes the list of command line options to standard output in MediaWiki markup. for when you're being a wiki girlie.
  • --man β€” writes man page source in 'nroff' markup to standard output. yes, the tool can generate docs about itself. self-care, honestly.
  • --version β€” writes the toolkit version to standard output.
  • --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. crank it, bestie.
  • --verbose, -v β€” increments the verbosity level by 1. ⚠️ note: this one is deprecated; it's only supported for backward compatibility. it still works, it's just old news.
  • --threads <integer> β€” sets the maximum number of parallel threads (for POSIX threads and OpenMP). go parallel or go home. πŸ”₯

πŸ“ Input Options

where the data comes in, where the magic starts ✨

  • --normalize-densities <double> β€” optional normalization factor for the density images. typically the values in density images should sit in the range 0..1, but honestly these images are often scaled to totally different ranges so they can be stored as integers. so, for example, if your densities are stored as values 0..255, set this parameter to 255. πŸ’‘ [Default: 1]
  • --labels-file <string> β€” if you provide this, this text file contains the names for all the labels in the regions image. those names then get used to label the rows of the CSV output. so your spreadsheet says "hippocampus" instead of "17". a glow-up fr fr. [Default: NONE]

🧚 Correction Options

for when the pixels are lying to you and you need to fix it πŸ’€

  • --pixel-scale-factor <double> β€” if provided, this global scale factor gets applied to all pixel volumes, to compensate for deviations between world and image scale. [Default: 1]
  • --pixel-scale-image <image-path> β€” if provided, this volume contains scale factors for the volume of each pixel. typically this is the Jacobian determinant map of a spatial unwarping deformation β€” yes bestie, the Jacobian, we stay academic 😭 [Default: NONE]

🌈 Output Options

how the results leave the building πŸŽ€

  • --density-labels <string> β€” this option is how you provide labels for the density maps, and those get used as the column labels in the output. ⚠️ important: labels must be separated by commas and must not contain any unescaped spaces. [Default: NONE]
  • --output <string>, -o <string> β€” if provided, program output is written to this file. if it's not provided, output is written to the STDOUT stream instead. either way it's going somewhere iconic. [Default: NONE]

πŸ’– 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 friend group. we stan a collaborative effort πŸ‘‘


πŸ“œ LICENSE πŸ“œ

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

(it's the GPL, go read it, respect the license, it's the rules 🫢)


πŸ› BUGS πŸ›

report bugs at http://nitrc.org/projects/cmtk/

found a bug? don't suffer in silence, don't vague-post about it β€” go tell the maintainers. that's the group chat, that's the move. πŸ’…


🌟 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. and from April 2009 through September 2011, CMTK development and maintenance was supported by the NIBIB under Grant EB008381.

funding bodies, we are so grateful. thank u for making this possible πŸ™πŸ’–


okay that's the whole page, bestie. this was the vol2csv(1) manual, page-managed under CMTK 3.3.1p2, dated Jun 24 2026. go forth, count your regions, write your CSV, and be the main character of your own neuroimaging pipeline. periodt. πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from