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 range0..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 values0..255, set this parameter to255. π‘ [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 theSTDOUTstream 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
- ubuntu stonking: cmtk 3.3.1p2+dfsg-4build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms