Jump to: navigation, search
Home < TeemSummary


Teem is a collection of libraries for representing, processing, and inspecting scientific raster data, as well as command-line tools that are built on top of the libraries. VTK and ITK have overlapping and much broader functionality; the utility of Teem is that its low-level functions can be directly and easily called with minimal overhead for getting data in and out, and its command-line tools allow useful work to get done without writing any code.

Role in NAMIC

Teem is now included as part of Slicer, for the NRRD file format, as well as diffusion tensor processing. The "NrrdIO" stand-alone library for NRRD file support is included in ITK.

Typical Usage

There are three ways that Teem is used in NAMIC:

  1. The NRRD file format is used for DWI datasets , and can be read/written with Teem, as well as with Slicer or ITK.
  2. Command-line utilities included with Teem have proven effective for data pre-processing and inspection, for example with DWI data processing.
    • "unu" is for low-level raster data processing (slicing, projecting, axis permuting, resampling, colormapping, simple arithmetic, etc.).
    • "tend" is for diffusion tensor processing (eddy current correction, tensor estimation, anisotropy metrics, eigensolutions).
  3. The Nrrd and Ten libraries (underlying "unu" and "tend", respectively) allow all the same operations to be done via simple and stable APIs. For example, tenEigensolve_d() computes eigenvalues/eigenvectors of diffusion tensors. Also, the Gage library supports convolution-based point-sampling of 3D fields (scalar, vector, tensor), for measuring values, gradients, hessians, curvature, tensor eigenvectors, and more.


Teem is written entirely in C.


Since it's written in C, Teem is extremely portable. For example, the NrrdIO library extracted from Teem builds on all the platforms included in the [ITK dashboard].

Software Dependencies

Teem uses CMake to build. Teem requires no external libraries other than the system's C math library, although it can optionally take advantage of the Gzip, Bzip2, PNG, and pthread libraries.

Documentation, Tutorials and Examples

The [Teem homepage] includes links to some documentation which is continually under construction, including a [collection of Nrrd/unu usage examples]. More NAMIC-specific documentation is currently being developed.

File Formats Supported

The Nrrd library can read and write PPM, PNG, and NRRD files (with raw, gzip, bzip2, or ascii data encoding), as well as basic support for VTK structured point files. Also, provided the file includes a raw data segment, NRRD headers can be wrapped around GE Signa, DICOM, Meta, and various other formats.

Revision Control

Teem is currently managed via CVS at Sourceforge. Whether to stick with Sourceforge will be determined by how smoothly their [SVN transition goes] in the next few months.

Teem Version 1.9.0 is included with Slicer. This version, as well as previous versions, can be downloaded from Sourceforge.

A nearly up-to-date checkout can be obtained via:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/teem login
(hit return)
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/teem co teem

Unfortunately, the non-authenticated checkout lags by about 10 hours. If you have developer access (contact Gordon for this), you can

cvs -d:ext:USERNAME@cvs.sourceforge.net:/cvsroot/teem co teem

Also, the source can also be viewed via [ViewCVS].

Size of Community

There about 40 subscribers to the teem-users mailing list, and there have been about 2500 downloads. Teem's wider usage, however, includes its part in SCIRun and Slicer, wherein end-users generally don't know when Teem functions are being called.


Teem uses a modified LGPL (Library/Lesser General Public License). This follows the example of FLTK in adding exceptions to the LGPL so that static linking is made practical, and is such is compatible with NA-MIC licensing guidelines.