UNU(1)
β¨ unu(1) β the Utah Nrrd Utilities command-line interface β¨
okay bestie, buckle up, because this is unu, from the UNU(1) manual, section 1, User Commands π
πΈ NAME πΈ
unu β Utah Nrrd Utilities command-line interface
π SYNOPSIS π
unu COMMAND [OPTION]...
π¦ DESCRIPTION π¦
unu(1) is a command-line interface to so much of the functionality in βnrrdβ, a C library for raster data processing. Nrrd is one library in the βTeemβ collection of libraries. More info about Teem lives at http://teem.sf.net. Wanna check out the Teem source? You can grab it like this:
svn co https://svn.code.sf.net/p/teem/code/teem/trunk teem
real talk for a sec: long-term maintenance of this software depends on funding, and funding depends on being able to document who is using it for what. So if unu(1) or Nrrd has helped in your research β and yes, that includes simple one-off experiments or mundane data hacking β the Teem developers would love to know. There are multiple ways of communicating this. In your publications, consider adding a line such as this in the Acknowledgments:
Data processing performed with the unu tool, part of the Teem
toolkit available at http://teem.sf.net.
Alternatively, please email glk@uchicago.edu and briefly describe how Teem software has helped in your work. Please also consider joining the teem-users mailing list. That's the primary forum for feedback, questions, and feature requests. π«Ά
A summary list of unu commands is generated by running simply βunuβ. And running a unu(1) command without additional arguments (like βunu sliceβ) generates its description and usage information. That includes info (marked with β* Uses ...β) about the underlying Nrrd library calls β for example nrrdSlice() β that implement the basic functionality in that unu(1) command. β¨
The utility of unu(1) is mainly as a pre-processing tool for getting data into a type, encoding, format, or dimensions best suited for some visualization or rendering task. Also, slices and projections are effective ways to visually inspect the contents of a dataset. Especially useful commands include make, resample, crop, slice, project, histo, dhisto, quantize, and save. π
unu(1) can process CT and MRI volume datasets, grayscale and color images, time-varying volumes of vector fields (5-D arrays), and more. Currently supported formats are plain text files (2-D float arrays), NRRD, VTK structured points, and PNG and PNM images. unu make -bs -1 can read from most DICOM files. unu save can generate EPS files. Supported encodings are raw, ascii, hex, gzip, and bzip2.
Much of the functionality of unu(1) derives from chaining multiple invocations together with pipes (β|β), which minimizes the need to save out intermediate files. Obsessed, honestly. For example, if (data.raw.gz) is a gzip'ed 256 x 256 x 80 volume of raw floats written from a PC, then the following will save to (zsum.png) a histogram equalized summation projection along the slowest axis:
unu make -i data.raw.gz -t float -s 256 256 80 -e gzip -en little \
| unu project -a 2 -m sum \
| unu heq -b 2000 -s 1 \
| unu quantize -b 8 -o zsum.png
Formats available: nrrd pnm png vtk text eps
Nrrd data encodings available: raw ascii hex gz bz2
π COMMANDS π
Each of the following has a corresponding man page: for example, unu-about(1) for βunu aboutβ. iykyk π
π« unu about
Information about this program and its use
π« unu env
List relevant environment variables and their values
π« unu i2w
Convert from 1-D index to world position
π« unu w2i
Convert from 1-D world to index position
π« unu make
Create a nrrd (or nrrd header) from scratch
π« unu head
Print header of one or more nrrd files
π« unu data
Print data segment of a nrrd file
π« unu convert
Convert to another type (as if by cast, w/ optional clamp)
π« unu resample
Filtering and {up,down}sampling with a separable kernel
π« unu fft
Fast Fourier Transform of selected axes
π« unu cmedian
Cheap histogram-based median/mode filtering
π« unu dist
Euclidean distance transform
π« unu minmax
Print out min and max values in one or more nrrds
π« unu cksum
Compute 32-bit CRC of nrrd data (same as via cksum(1))
π« unu diff
Sees if two nrrds are different in any way
π« unu quantize
Quantize values to 8, 16, or 32 bits
π« unu unquantize
Recover floating point values from quantized data
π« unu project
Collapse scanlines to scalars along some axis
π« unu slice
Slice along one or more axes at given positions
π« unu sselect
Select subset of slices along an axis
π« unu dice
Save all slices along one axis into separate files
π« unu splice
Replace a slice with a different nrrd
π« unu join
Connect slices and/or slabs into a bigger nrrd
π« unu crop
Crop along each axis to make a smaller nrrd
π« unu acrop
Automatically crop axes based on given measure
π« unu inset
Replace a sub-region with a different nrrd
π« unu pad
Pad along each axis to make a bigger nrrd
π« unu reshape
Superficially change dimension and/or axes sizes
π« unu permute
Permute ordering of axes
π« unu swap
Interchange ordering of two axes
π« unu shuffle
Permute slices along one axis
π« unu flip
Reverse order of slices along one axis
π« unu unorient
Make image orientation be axis-aligned
π« unu axinfo
Modify attributes of one or more axes
π« unu axinsert
Add a βstubβ (length 1) axis to a nrrd
π« unu axsplit
Split one axis into two axes
π« unu axdelete
Remove one or more singleton axes from a nrrd
π« unu axmerge
Merge two adjacent axes into one
π« unu tile
Tile slices of one axis into two other axes
π« unu untile
Undo unu-tile(1): merge slow parts of two axis splits
π« unu histo
Create 1-D histogram of values in a nrrd
π« unu dhisto
Create image of 1-D value histogram
π« unu jhisto
Create joint histogram of two or more nrrds
π« unu histax
Replace each scanline along an axis with its histogram
π« unu heq
Perform histogram equalization
π« unu gamma
Brighten or darken values with a gamma
π« unu 1op
Unary operation on a nrrd
π« unu 2op
Binary operation on two nrrds, or on a nrrd and a constant
π« unu 3op
Ternary operation on three nrrds or constants
π« unu affine
Affine (lerp) mapping on 5 nrrds or constants
π« unu lut
Map nrrd through one univariate lookup table
π« unu mlut
Map nrrd through whole nrrd of univariate lookup tables
π« unu subst
Map nrrd through a univariate substitution table
π« unu rmap
Map nrrd through one regular univariate map (βcolormapβ)
π« unu mrmap
Map nrrd through a whole nrrd of regular univariate maps
π« unu imap
Map nrrd through irregular univariate map (βcolormapβ)
π« unu lut2
Map nrrd through a bivariate lookup table
π« unu ccfind
Find connected components (CCs)
π« unu ccadj
Form adjecency matrix of connected components
π« unu ccmerge
Merge CCs with their neighbors, under various constraints
π« unu ccsettle
Remap CC values down to lowest contiguous values
π« unu save
Write nrrd with specific format, encoding, or endianness
π ENVIRONMENT π
See unu-env(1).
β SEE ALSO β
gprobe(1)ilk(1)mrender(1)miter(1)nrrdSanity(1)overrgb(1)puller(1)tend(1)vprobe(1)unu-1op(1)unu-2op(1)unu-3op(1)unu-about(1)unu-acrop(1)unu-affine(1)unu-axdelete(1)unu-axinfo(1)unu-axinsert(1)unu-axmerge(1)unu-axsplit(1)unu-ccadj(1)unu-ccfind(1)unu-ccmerge(1)unu-ccsettle(1)unu-cksum(1)unu-cmedian(1)unu-convert(1)unu-crop(1)unu-data(1)unu-dhisto(1)unu-dice(1)unu-diff(1)unu-dist(1)unu-env(1)unu-fft(1)unu-flip(1)unu-gamma(1)unu-head(1)unu-heq(1)unu-histax(1)unu-histo(1)unu-i2w(1)unu-imap(1)unu-inset(1)unu-jhisto(1)unu-join(1)unu-lut(1)unu-lut2(1)unu-make(1)unu-minmax(1)unu-mlut(1)unu-mrmap(1)unu-pad(1)unu-permute(1)unu-project(1)unu-quantize(1)unu-resample(1)unu-reshape(1)unu-rmap(1)unu-save(1)unu-shuffle(1)unu-slice(1)unu-splice(1)unu-sselect(1)unu-subst(1)unu-swap(1)unu-tile(1)unu-unorient(1)unu-unquantize(1)unu-untile(1)unu-w2i(1)
and that's the whole page bestie, we ate and left no crumbs π
β¨ this edition of the UNU(1) page is dated April 2021 β go forth and process some rasters, you've got this π¦π
π¦ where this page comes from
- fedora 43: teem 1.11.0-83.fc43 Β· LGPL-2.1-or-later WITH LicenseRef-Fedora-Temporary-Simple-Library-exception
- fedora 43: teem 1.11.0-86.fc43 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- fedora 44: teem 1.11.0-87.fc44 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms