Written by Ofri Sadowsky, 2003-01-22
ITK is National Library of Medicine (NLM) “Insight Segmentation and Registration Toolkit.” ITK information is available on http://www.itk.org.
This document describes the installation process for the ITK package on the Linux workstation 'tragus' (Red Hat Linux release 8.0 (Psyche)). As of the creation of the document, ITK did not include an RPM (RedHat Package Manager). The installation was done manually, and involved using cmake to compile the ITK source files and build the libraries.
Download the ITK distribution from http://www.itk.org/HTML/Download.htm. You may have to fill a registration form before access is granted to the downloads page. This installation used the cvs version of ITK, after having several compatibility problems with related versions of VTK. The web page instructs for cvs access. The source files were checked-out in /usr/local/erc-share/downloaded-src/itk-cvs and into the subdirectory Insight, which we shall call hereafter ITK_HOME.
Installing ITK uses CMake. If you don't have CMake on your system, please refer to the installation instructions in CMake.Linux.html. Example programs and applications in the ${ITK_HOME}/Applications directory may require additional packages installed, of which, for us, VTK and Tcl/Tk were the important ones. To learn about installation of VTK, see VTK.Linux.html. I have not used any of the other packages that ITK may use, such as FLTK and CABLE. Please refer to the ITK web-site for instructions regarding these, if you need them.
Follow a cmake/ccmake installation procedure (see VTK.Linux.html for an example). Here we list the important cmake option settings.
|
Option |
Value |
|---|---|
|
CMAKE_CXX_COMPILER |
Your C++ compiler. For my case, it was g++. 1 |
|
CMAKE_CXX_LINK_SHARED |
Typically the same as CMAKE_CXX_COMPILER. |
|
CMAKE_C_COMPILER |
Your C compiler. For my case, it was gcc. |
|
CMAKE_C_LINK_SHARED |
Typically the same as CMAKE_C_COMPILER. |
|
CMAKE_INSTALL_PREFIX |
Location where VTK binaries, etc., will be installed. For my case it was /usr/local/erc-share. |
|
CMAKE_MAKE_PROGRAM |
Your make utility. For my case it was /usr/bin/gmake. |
|
FLTK_xx_LIBRARY |
Where xx stands for 'BASE', 'FORMS', 'GL', 'IMAGES', and possibly other libraries in future versions of FLTK. Here you specify the complete path and filename of the library file according to your local installation of FLTK. For example, for FLTK_BASE_LIBRARY I used /usr/local/erc-share/lib/libfltk.a. |
|
ITK_WRAP_TCL |
OFF – this requires external packages, such as CABLE. |
|
ITK_USE_SYSTEM_STDLIB |
ON |
|
SEGMENTER_WRAP_TCL |
ON – builds the SegemtationEditor demo in the Applications directory. |
|
USE_BUILT_VTK |
ON if your installation of VTK was done as build rather than as copying binaries (our normal procedure is build). |
|
USE_FLTK |
Set to ON if FLTK is installed in your system and you want to build the FLTK-based Examples and Applications. One Application that uses FLTK is the ThinPlateSplines, which you may want to explore. |
|
USE_FLTK_VERSION_xx |
Set to ON according to the version of FLTK installed in your system. |
|
USE_VTK |
ON if you want to build the VTK-based examples and applications of ITK. |
|
VTKITK_WRAP_TCL |
ON |
|
VTK_BINARY_PATH |
${VTK_HOME} – location of UseVTK.cmake in the VTK source directory. |
|
VTK_INSTALL_PATH |
NOTFOUND – unless your VTK was installed as binaries. |
|
VTK_WRAP_HINTS |
${VTK_HOME}/Wrapping – location of VTK hints file (see VTK.Linux.html). |
1 All options regarding the compiler disappear after a couple of cmake iterations.