MINCMAKESCALAR(1)

πŸ’– MINCMAKESCALAR πŸ’–

okay bestie, welcome to mincmakescalar, straight outta the MINC User's Guide ✨ this is the little icon that takes your chunky vector files and turns them into sleek lil scalar files. let's get into it 🫢


✨ SYNOPSIS ✨

mincmakescalar [<options>] <in>.mnc <out>.mnc

like, options go in, your input file goes in, your output file goes in. that's the whole vibe πŸ’…


🌸 DESCRIPTION 🌸

so mincmakescalar converts vector minc files into scalar minc files. and what even IS a vector minc file, you ask? it's one that has the dimension vector_dimension as the fastest varying dimension of the image data, and it represents vector data at every single voxel β€” think RGB images, think gradient volumes. a scalar minc file, on the other hand, doesn't have the vector dimension at all, and it's just grayscale or intensity data. simple. clean. iconic. πŸ’…

now, there are a bunch of ways to do this conversion, and they're all valid:

  • the simplest one is just averaging the components of the vector
  • you can also compute the magnitude of the vector at each voxel
  • RGB volumes can go to greyscale via a standard linear combination
  • OR you can hand it your own list of coefficients for a custom linear combination of the vector components, main character energy fr fr πŸ‘‘

a couple of these options are picky and need a specific number of components on the input vectors β€” like, RGB data should have 3 components, and if you're doing a linear combination, the number of coefficients you supply has to match the number of components on your input vectors. no cap.

but here's the thing β€” the program is also chill and will totally accept input scalar data and just copy it straight through with zero modification. it's giving "i don't discriminate, i just copy" 😌


✨ OPTIONS ✨

quick heads up before we dive in: options can be given in abbreviated form (as long as they're unique, obviously) and they can be dropped anywhere on the command line. slay. πŸŽ€

πŸ¦‹ General options πŸ¦‹

  • -2 β€” creates a MINC 2.0 format output file.
  • -clobber β€” overwrite an existing file. no thoughts, just destruction πŸ’€
  • -noclobber β€” don't overwrite an existing file (this is the default, so it's the polite one).
  • -no_clobber β€” a synonym for -noclobber.
  • -verbose β€” prints out progress info for each chunk of data copied (this is the default).
  • -quiet β€” do not print out progress information. shhh 🀫
  • -buffer_size size β€” specifies the maximum size of the internal buffers, in kbytes. default is 10 MB.
  • -filetype β€” creates an output file with the same type as the first input file (default).
  • -byte β€” store output voxels as 8-bit integers.
  • -short β€” store output voxels as 16-bit integers.
  • -int β€” store output voxels as 32-bit integers.
  • -long β€” superseded by -int. (it's giving legacy, bestie, use -int)
  • -float β€” store output voxels as 32-bit floating point numbers.
  • -double β€” store output voxels as 64-bit floating point numbers.
  • -signed β€” creates an output file with data stored in a signed type. this only does anything if one of the -byte, -short or -int options is specified.
  • -unsigned β€” creates an output file with data stored in an unsigned type. this only does anything if one of the -byte, -short or -int options is specified.
  • -valid_range min max β€” creates an output file with integer data stored in the specified restricted range. this only does anything if one of the -byte, -short or -int options is specified.

🧚 Conversion options 🧚

  • -magnitude β€” compute the magnitude of each vector (this is the default).
  • -average β€” compute the average of the components of each vector.
  • -rgbtogrey β€” convert RGB (3-component) files to greyscale using a linear combination with a standard set of weighting coefficients.
  • -rgbtogray β€” a synonym for -rgbtogrey. (yes, both spellings, we contain multitudes πŸ’œ)
  • -linear c1,c2,c3,... β€” compute a linear combination of the components of each vector using the specified coefficients. these weights must be given as a comma or space-separated list of numbers in a single command-line argument. the number of coefficients must match the number of components on the input vectors. no pressure, just math πŸ’…

🌈 Generic options for all commands 🌈

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

✨ EXAMPLES ✨

to convert an RGB file to a grayscale file:

mincmakescalar -rgbtogrey rgb.mnc gray.mnc

to compute the gradient magnitude from a gradient volume:

mincmakescalar -magnitude gradient.mnc magnitude.mnc

to convert an RGB file to a grayscale file using a different set of weighting factors for red, green and blue:

mincmakescalar -linear '0.2,0.5,0.3' rgb.mnc gray.mnc

see how easy? periodt. πŸ‘‘


🌸 AUTHOR 🌸

Peter Neelin 🫢


πŸŽ€ COPYRIGHTS πŸŽ€

Copyright Β© 1997 by Peter Neelin


and that's the whole page, bestie!! this one's dated $Date: 2004-05-20 21:52:08 $ and it lives in the MINCMAKESCALAR(1) section of the manual. go forth and make things scalar βœ¨πŸ’–
πŸ“¦ where this page comes from