Unu Commands

From NRIMS External Wiki
Jump to: navigation, search

Part of the Teem project the commandline tool unu (or Utah Nrrd Utilities, documentation ) is an easy way to query or manipulate .nrrd files created with OpenMIMS. In order to use unu you need to download the source and compile following these instructions. (Note: you can skip the "svn co..." step unless you want the repository version which is not necessary.) The examples below use the sample .im files available here that have been saved as .nrrd in OpenMIMS.

Contents

unu

Running unu with no options gives a list of all available commands. Running any command (eg unu make, the third command listed) displays all options that command understands. Below are some example usages of some unu commands that can be useful when working with MIMS images. However, there are many unu commands not covered here.

unu head

The command unu head file.nrrd prints the content of the header of file.nrrd. See nrrd File Format for details specific to OpenMIMS generated nrrd files. Below is the output of unu head SampleData1.nrrd


NRRD0004
# Created by OpenMIMS at Tue May 15 12:41:43 EDT 2012
type: uint16
encoding: raw
endian: big
dimension: 4
sizes: 512 512 1 4
kinds: space space space list
spacings: 1.0 1.0 1.0 NaN
centers: node node node node
units: "pixel" "pixel" "pixel" "pixel"
Mims_mass_numbers:=12.04 13.04 26.05 27.03 
Mims_mass_symbols:=12C 13C 12C14N 12C15N 
Mims_position:=6100,-6491
Mims_date:=02.07.04
Mims_hour:=15:23
Mims_user_name:= 
Mims_sample_name:= 
Mims_z_position:=0
Mims_dwell_time:=55.000
Mims_count_time:=14417.92
Mims_duration:=14417.000
Mims_raster:=41402
Mims_pixel_width:=80.86328
Mims_pixel_height:=80.86328
Mims_deadtime_correction_applied:=false
Mims_QSA_correction_applied:=false
Mims_notes:=


unu crop

unu crop allows you to crop a .nrrd file along any axis.

unu swap

unu swap changes the ordering of any 2 axes in a .nrrd file.

unu join

unu join connects multiple nrrd files along a given axis.

unu make

unu make creates a nrrd file or header from scratch.

unu save

unu save writes a nrrd with specific format, encoding or endianness.