Sponsor:

Your company here — click to reach over 10,000 unique daily visitors

unu - Man Page

Utah Nrrd Utilities command-line interface

Synopsis

unu COMMAND [OPTION]...

Description

unu(1) is a command-line interface to much of the functionality in “nrrd”, a C library for raster data processing. Nrrd is one library in the “Teem” collection of libraries. More information about Teem is at http://teem.sf.net. A checkout of Teem source is available via:

svn co https://svn.code.sf.net/p/teem/code/teem/trunk teem

Long-term maintenance of this software depends on funding, and funding depends on being able to document who is using it for what. If unu(1) or Nrrd has helped in your research, including for simple one-off experiments or mundane data hacking, the developers of Teem 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. This is the primary forum for feedback, questions, and feature requests.

A summary list of unu commands is generated by running simply “unu”. Running a unu(1) command without additional arguments (e.g. “unu slice”) generates its description and usage information. This includes information (marked with “* Uses ...”) about the underling Nrrd library calls (e.g. 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 (“|”), minimizing the need to save out intermediate files. 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”.

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)

Referenced By

gprobe(1), ilk(1), miter(1), mrender(1), nrrdSanity(1), overrgb(1), puller(1), tend(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), vprobe(1).

April 2021