Get Teem at SourceForge.net. Fast, secure and Free Open Source software downloads
to teem

Build

teem



CMake

The best way to build Teem is with CMake, including the curses (terminal) interface ccmake. Pre-compiled binaries of CMake are available. CMake allows Teem to be built for any platform, including Windows, with relative ease, and provides the best control over shared libraries, external dependencies, and so forth.

To build Teem with ccmake:

The information below refers to a home-grown system of GNUMakefiles which is no longer supported.























Windows users (except Cygwin): Go here

The basic steps

To build teem you will need GNU make. I am in fact using many GNU-make-specific features, and all my makefiles are actually named GNUmakefile instead of Makefile to minimize the chances of someone trying to use a non-GNU make.
  1. Download the teem distribution
  2. Untar it.
    Throughout this and all other teem documentation, the directory just created will be referred to as "teem", even though it will actually be called "teem-1.XblahN" or something similar.
  3. Go into this directory.
  4. Depending on what architecture you're on, set the TEEM_ARCH environment variable (however you do that in your favorite shell) to one of the following:
  5. (Optional) If you want the teem headers, libraries, and command-line tools to be installed in a particular location, you need to set the TEEM_DEST environment variable to the directory in which the include, lib, and bin directories will be the final locations the teem files.
  6. cd src; make
    This will build and "install" all the teem libraries, as well as all the command-line tools. Specifically, assuming TEEM_DEST was not set: If TEEM_DEST was set, these directories will be created if needed: On a multi-processor machine, building teem-1.5beta0 or later, feel free to use "make -j10" or similar to speed this up.
  7. cd ../$TEEM_ARCH/bin (or cd $TEEM_DEST/bin)
  8. ./nrrdSanity
    This little program calls a nrrd function called nrrdSanity() which basically makes sure that everything hard-coded (or set at compile-time) into nrrd is correct for the machine you're on. For instance, the various assumptions about type sizes and representational ranges are checked, as is endianness, and the availability of IEEE 754 floating point numbers. If you get anything besides:
    ./nrrdSanity: nrrd sanity check passed.
    
    then your teem build will not work correctly. Either one of the default settings in the architecture-specific makefile teem/src/make/<arch>.mk is wrong, or your machine isn't up to snuff. In either case, email me (gk@cs.utah.edu) with the error message from nrrdSanity.

Making a better teem: zlib, bzip2, png, and pthread

If you want hoover to be multi-threaded, or if you want nrrd to support zlib/gzip or bzip2 compression, or allow nrrd to read and write PNG images, you need to set additional environment variables, as well as have compiled version of the associated libraries. The following three variables need simply to be set (as with "setenv TEEM_ZLIB" for csh-style shells, or "export TEEM_ZLIB" for sh-style shells), as opposed to set to a specific string (as with "setenv TEEM_ZLIB true" or "export TEEM_ZLIB=true"):

TEEM_PTHREAD Allows hoover to run multiple threads, so that hoover-based volume renderers are multi-threaded.
TEEM_ZLIB Allows nrrd to read and write raw data compressed with zlib compression, for instance with the "-e gzip" encoding flag in unu save. The compressed data is compatible with the gzip and gunzip command-line tools.
TEEM_BZIP2 Allows nrrd to read and write raw data compressed with bzip2, for instance with the "-e bzip2" encoding flag in unu save. The compressed data is compatible with the bzip2 and bunzip2 command-line tools.
TEEM_PNG Allows nrrd to read and write PNG images, for instance with the "-f png" format flag in unu save. This requires TEEM_ZLIB.

The following versions of the optional libraries are recommended:

Note that on GNU/Linux you may have to get the "development" version of the package ("...-dev") in order to get the headers and libraries, instead of just the associated command-line tools and their documentation.

In case you do not have the workable versions of zlib, bzip2, and png installed in /usr/local/ on your system (or wherever the C compiler looks for headers and libraries by default), you can teach the teem makefiles where to find them by setting yet more environment variables. In the following, "XXX" stands for either "ZLIB", "BZIP2", or "PNG".

TEEM_XXX_IPATH This is the include flag to be passed the compiler, to tell it where to find the header files for optional thing XXX. It should be of the form "-I<path>", such as "-I/home/gk/include".
TEEM_XXX_LPATH This is the link flag to be passed to the linker, to tell it where to find the library for optional thing XXX. It should be of the form "-L<path>", such as "-L/home/gk/lib". The makefiles know the name of the library; you do not need to (nor can you) supply the library link flag itself (e.g. "-lzlib"); this is done by the makefiles for you.

If interested, you can read more about the directory structure of teem. For more specific information about how the GNUmakefiles work, or how to use them to do something besides the standard install described above, see How teem uses GNU make.