UNU-IMAP(1)

πŸ“¦ version 1.11.0, in fedora 43, fedora 44

πŸ’– UNU-IMAP β€” the unu-imap girlies' guide πŸ’–

okay so bestie, gather round, because unu-imap is literally the unu rmap glow-up and it is so good. it's a User Command, it lives in the unu universe, and it maps an nrrd through an irregular univariate map β€” which is just the fancy way of saying a β€œcolormap” 🎨. no cap.


✨ SYNOPSIS ✨

unu rmap -m,--map <map> [-l,--length <aclLen>] [-r,--rescale]
[-min,--minimum <value>] [-max,--maximum <value>] [-blind8 <bool>]
[-t,--type <type>] [-i,--input <nin>] [-o,--output <nout>]

like. she's a little long but she's worth it 🫢


🌸 DESCRIPTION 🌸

so what she does: she maps an nrrd through an irregular univariate map, aka a β€œcolormap”. periodt.

and what makes a map irregular, you ask? πŸ¦‹ it's irregular when the control points are not evenly spaced along the domain β€” which means their position has to be explicitly represented in the map. there's no shortcut, the map just has to say where everything is. iconic honesty honestly.

as nrrds, these maps are necessarily 2D. yes, necessarily. along axis 0, the first value is the location of the control point, and the remaining values give the range of the map for that control point. so like, first slot = "where am i", rest of the slots = "here's what i'm worth there". πŸ’…

the output value(s) you get are the result of linearly interpolating between value(s) from the map. smooth. gorge. chef's kiss.

  • Uses nrrdApply1DIrregMap

^(not me casually dropping the function name, iykyk) 😌


πŸŽ€ OPTIONS πŸŽ€

okay this is the part where i hold your hand, bestie. every flag, every default, nothing skipped, because i love you πŸ’œ

  • -m <map> , --map <map> β€” the irregular map you're mapping the input nrrd through. this is the one. the main character. πŸ‘‘
  • -l <aclLen> , --length <aclLen> β€” length of the accelerator array, used to try to speed-up the task of finding between which pair of control points a given value lies. ngl it's not terribly useful for small maps (think about 10 points or less). use 0 to turn the accelerator off. type is (unsigned int); default: "0" ✨
  • -r , --rescale β€” rescale the input values from the input range to the map domain. that's it, that's the whole vibe. πŸ”₯
  • -min <value> , --minimum <value> β€” low end of the input range. defaults to the lowest value found in the input nrrd. heads up though: explicitly setting this is useful only with rescaling (-r). type is (double) πŸ“
  • -max <value> , --maximum <value> β€” high end of the input range. defaults to the highest value found in the input nrrd. same deal: explicitly setting this is useful only with rescaling (-r). type is (double) 🌸
  • -blind8 <bool> β€” whether to know the range of 8-bit data blindly (because uchar is always [0,255], and signed char is [-128,127]). and yup, explicitly setting this is useful only with rescaling (-r). type is (bool); default: "true" πŸ’€
  • -t <type> , --type <type> β€” specify the type ("int", "float", etc.) of the output nrrd. by default, meaning if you don't use this option, the output type is the map's type. πŸ’…
  • -i <nin> , --input <nin> β€” input nrrd πŸ¦‹
  • -o <nout> , --output <nout> β€” output nrrd. type is (string); default: "-" 🌈
okay one gentle lil PSA bestie: -min, -max, and -blind8 are all sitting there being useful only with rescaling (-r). so if you're not passing -r, don't be surprised when they're just vibing in the corner doing nothing. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're the friends of the family:


and that's the whole page, bestie!! πŸ§šπŸ’– written by the unu girlies, from August 2021, and yes this is UNU-IMAP(1) β€” go map something cute. slay. 🌟

πŸ“¦ where this page comes from