MINCCONCAT(1)

✨ MINCCONCAT(1) ✨

okay bestie, gather round, because this one is the MINC User's Guide classic and it's literally about gluing your minc files together πŸ’–


🌸 NAME 🌸

mincconcat β€” concatenate minc files along a specific dimension


πŸŽ€ SYNOPSIS πŸŽ€

mincconcat [<options>] <infile1>.mnc [<infile2>.mnc ...] <outfile>.mnc

πŸ¦‹ DESCRIPTION πŸ¦‹

So mincconcat takes a whole little squad of minc files and smushes them into one single output file. Iconic. ✨

The concatenation happens along a dimension you specify, and the slices get sorted into ascending order. Now here's the cute part: that concatenation dimension can be either a dimension that already exists in the file β€” in which case the coordinates for sorting come straight out of the input files themselves, no extra work β€” or it can be a brand new dimension, and then you're the one who has to hand over the coordinates with a command-line option. Your call, main character. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

Heads up bestie: options can be written in abbreviated form (as long as they're unique, iykyk) and they can go anywhere on the command line. Placement is not the vibe check here.

🌈 General options

  • -2 β€” makes a MINC 2.0 format output file. glow up ✨
  • -clobber β€” overwrite a file that already exists.
  • -noclobber β€” do not overwrite an existing file. This is the default, so she's cautious by nature. πŸ™ˆ
  • -verbose β€” prints out progress info for every single chunk of data copied. Also the default, because she wants you to know she's working. πŸ’ͺ
  • -quiet β€” no progress info, just silence.
  • -max_chunk_size_in_kb size β€” sets the maximum size of the copy buffer, in kbytes. Default is 4096 kbytes.
  • -filelist filename β€” points to a file containing a list of input file names. If you pass "-", then the file names get read from stdin instead. If you use this option, there should be no input file names on the command line β€” pick a lane. Empty lines in that input file are just ignored, no drama.

πŸ’œ Output type options

  • -filetype β€” does no type conversion at all. Default behaviour, she's chill like that.
  • -byte β€” writes out 8-bit integer voxels.
  • -short β€” writes out 16-bit integer voxels.
  • -int β€” writes out 32-bit integer voxels.
  • -long β€” superseded by -int. (it's giving legacy, we still love her tho 🫢)
  • -float β€” writes out single-precision floating point values.
  • -double β€” writes out double-precision floating point values.
  • -signed β€” writes values as signed integers. Default for short and long. Gets ignored for floating point types.
  • -unsigned β€” writes values as unsigned integers. Default for byte. Also ignored for floating point types.
  • -valid_range min max β€” specifies the valid range of output voxel values in their integer representation. Default is the full range for the type and sign. This option is ignored for floating point values, periodt.

πŸ“ Concatenation options

  • -concat_dimension name β€” specifies the name of the concatenation dimension. If that dimension already exists in the input files, the coordinates get taken from those files. If it doesn't, a new dimension gets created and each input file's coordinate comes from command-line options. Default is to use the slowest varying dimension of the first file.
  • -start start β€” the starting coordinate for the new dimension. Default = 0.0.
  • -step step β€” the separation between voxels for the new dimension. Default = 1.0.
  • -width width β€” the (constant) width of each sample along the new dimension. Default = none.
  • -coordlist c1,c2,... β€” a comma-separated list of coordinates along the new dimension.
  • -widthlist w1,w2,... β€” a comma-separated list of widths along the new dimension.
  • -filestarts s1,s2,... β€” a comma-separated list of offsets to the coordinate origins for each of the files listed on the command line. Super useful for concatenating files along an existing dimension β€” say, gluing multiple functional runs together along a time dimension. 🧠
  • -check_dimensions β€” checks that all input files have matching sampling in world dimensions. Default, she's thorough.
  • -nocheck_dimensions β€” ignores any differences between input files in world dimensions sampling.
  • -ascending β€” sorts coordinates in ascending order. Default.
  • -descending β€” sorts coordinates in descending order.
  • -interleaved β€” sorts slabs by their dimension coordinate, interleaving if necessary. Default.
  • -sequential β€” doesn't sort slabs at all, just concatenates them together.
⚠️ WARNING β€” -sequential will destroy the dimension information along the concatenating dimension, replacing the start and step with zero and one. Not a drill, bestie. 😭

⭐ Generic options for all commands

  • -help β€” prints a summary of the command-line options and exits.
  • -version β€” prints the program's version number and exits.

πŸ’– EXAMPLES πŸ’–

Say you've got two volumes with dimensions zspace, yspace, xspace, and they have interleaved slices along zspace. Easy, just:

mincconcat input1.mnc input2.mnc output.mnc

Now imagine you have a whole bunch of compressed (yspace, xspace) images and you want to concatenate them into an evenly spaced volume. Then you type:

mincconcat input1.mnc.gz input2.mnc.gz input3.mnc.gz \
   input4.mnc.gz output.mnc \
   -concat_dimension zspace -start -23 -step 2

ate, no crumbs. πŸ”₯


🌟 AUTHOR 🌟

Peter Neelin β€” the legend, the blueprint. πŸ‘‘


πŸ“œ COPYRIGHTS πŸ“œ

Copyright Β© 1995 by Peter Neelin


okay that's the whole page bestie, you're officially a mincconcat girlie now πŸŽ€ this was the MINC User's Guide edition, dated $Date: 2005-07-15 17:38:08 $ β€” yes she's vintage, and yes she still slays. mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from