UNU-ENV(1)

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

πŸ’– UNU-ENV(1) β€” User Commands πŸ’–

okay bestie, gather round, because this is the page about unu-env, and it's lowkey one of the most useful little gremlins in the whole unu(1) family. it's from the User Commands manual, and it's about to tell you exactly which environment variables are running the show behind the scenes. no cap. ✨


🌸 NAME 🌸

unu-env β€” list relevant environment variables and their values


πŸ¦‹ SYNOPSIS πŸ¦‹

unu env

that's it. that's the whole vibe. no flags, no arguments, just vibes and a big ol' list. πŸ’…


✨ DESCRIPTION ✨

List relevant environment variables and their values. these env vars are literally the way you set global variables that can affect the way Nrrd (and unu(1)) operates. think of them as the settings menu you reach through the back door instead of the front. πŸšͺ✨

  • it uses nrrdGetenvBool, nrrdGetenvEnum, nrrdGetenvInt, and nrrdGetenvUInt β€” so yeah, that's the machinery doing the reading.

Each variable in the listing below starts with the name of the environment variable ("NRRD_..."), what type of value it represents (e.g. "int", "bool"), what the corresponding Nrrd global variable is set to, and a description of the variable. In the unu-env(1) command output, the listing also includes what the environment variable is currently set to. so you're not just seeing the theory, you're seeing the receipts. 🧾

Now, how do you actually set these things? so glad you asked:

  • Bool variables may be set to true simply by setting the environment variable; setting the value to "true" or "false" sets the bool accordingly. (yes, existing at all counts as true. main character energy. πŸ‘‘)
  • Enum variables may be set by setting the environment variable to any string that parses as one of the enum values.
  • Int and unsigned int variables are set via a string parse-able as a numeric value.
also, in addition to the the "NRRD_" environment variables, there is this one, UNRRDU_QUIET_QUIT; see the ENVIRONMENT section below. πŸ‘€

🌈 ENVIRONMENT 🌈

πŸ™ˆ UNRRDU_QUIET_QUIT

Determines whether unu(1) exits quietly (without error and usage info) when it fails because an input nrrd read immediately hit EOF (as happens when many unu(1) invocations are piped together). This is currently detected by seeing if the error message ends with "[nrrd] _nrrdRead: immediately hit EOF".


πŸŽ€ NRRD_STATE_KEYVALUEPAIRS_PROPAGATE (bool)

(nrrdStateKeyValuePairsPropagate == true)

When true, key/value pairs are copied from input nrrd to output nrrd just like other basic info that hasn't just been modified (e.g. type, dimension, block size).


🧚 NRRD_DEFAULT_CENTER (centering enum)

(nrrdDefaultCenter == cell)

The type of sample centering to use when none has been set but one has to be chosen for some operation (e.g. resampling).


πŸ’œ NRRD_DEFAULT_WRITE_ENCODING_TYPE (encoding enum)

(nrrdDefaultWriteEncodingType == raw)

When writing nrrds, what encoding to use. Only unu-save(1) affords explicit control of output encoding.


⭐ NRRD_STATE_KIND_NOOP (bool)

(nrrdStateKindNoop == false)

When true, Nrrd makes not even the slightest effort to be smart about setting the "kind" field of an axis after some operation that modified its samples. like, zero effort. it simply does not care. πŸ’€


πŸ”₯ NRRD_STATE_VERBOSE_IO (int)

(nrrdStateVerboseIO == 1)

The verbosity level of Nrrd input/output operations.


πŸ“ NRRD_DEFAULT_WRITE_BARE_TEXT (bool)

(nrrdDefaultWriteBareText == 1)

When false, text files used for saving nrrds start with comment ("# ...") lines containing nrrd fields.


🌸 NRRD_STATE_MEASURE_TYPE (enum)

(nrrdStateMeasureType == float)

For measurements (unu-project(1)) like sum and product, the type of the output result, when one hasn't been explicitly requested.


πŸ¦‹ NRRD_STATE_MEASURE_MODE_BINS (int)

(nrrdStateMeasureModeBins == 1024)

When measuring mode but without a given histogram, how many bins to use in the temporary internal histogram.


✨ NRRD_STATE_MEASURE_HISTO_TYPE (enum)

(nrrdStateMeasureHistoType == float)

Output type for most measurements of histograms, when one hasn't been explicitly requested


πŸ’– NRRD_STATE_ALWAYS_SET_CONTENT (bool)

(nrrdStateAlwaysSetContent == true)

If true, the output content string is set even when the input content string is not set.


πŸ‘‘ NRRD_STATE_DISABLE_CONTENT (bool)

(nrrdStateDisableContent == false)

If true, output content is never set.


πŸŽ€ NRRD_DEFAULT_WRITE_CHARS_PER_LINE (unsigned int)

(nrrdDefaultWriteCharsPerLine == 75)

When using text encoding, maximum # characters allowed per line.


🌈 NRRD_DEFAULT_WRITE_VALS_PER_LINE (unsigned int)

(nrrdDefaultWriteValsPerLine == 8)

When using text encoding, maximum # values allowed per line


πŸ’… NRRD_STATE_GRAYSCALE_IMAGE_3D (bool)

(nrrdStateGrayscaleImage3D == false)

If true, reading a 2-D grayscale image results in a 3-D image with a single sample (size=1) on the first (fastest) axis.


🫢 SEE ALSO 🫢

unu(1), unu-project(1), unu-save(1)


and that's the whole page, bestie!! πŸŽ‰ this one's from the UNU-ENV(1) page in User Commands, dated April 2021 β€” so yeah, it's giving vintage-but-still-eating. go forth and check your env vars, you absolute icon. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from