Installation of Slicer on a Linux workstation

Written by Ofri Sadowsky, 2003-02-02



1. Introduction

Slicer is a “freely available, open-source software for visualization, registration, segmentation, and quantification of medical data.” Slicer is available from http://www.slicer.org. There were various revisions to the Slicer code base, the most significant thereof was the introduction of Slicer-2, which is built using VTK-4, while previous versions of Slicer used VTK-3. Slicer-2 is on the web at http://slicer.ai.mit.edu/slicer2/Doc/index.html.

This document describes the installation process on the Linux workstation 'tragus' (Red Hat Linux release 8.0 (Psyche)). There may be available RPM for Slicer, but more often than not, there are revision conflicts between the “official release” of Slicer, and one of the software packages on which it depends. Therefore, it is advisable to acquire the recent nightly build of Slicer through cvs. Our installation process follows the instructions on the Slicer web pages, but these may be inaccurate or incomplete, and so we extend the explanation beyond them.

2. Download and Installation

2.1 Manual configuration to run Slicer

Changes to ${SLICER_HOME}/launch.tcl

  1. Next to the beginning of the file, there is a switch for the value of $tcl_platform(os). Under the “Linux” value, write your OS_DIRNAME instead of “redhat7.3”.

  2. Create a directory ${SLICER_HOME}/Lib/${OS_DIRNAME}
    Create subdirectories vtk and tclXX under it, where XX stands for your locally installed version of Tcl/Tk.
    Create symbolic links under the vtk subdirectory:

    Create symbolic links under the tclXX subdirectory:

  3. In launch.tcl, make sure that the “VTK source and binary dirs and tcl dirs” are set correctly. In particular, pay attention to the correct version of tcl.

  4. In launch.tcl, where there is a switch or other decision for the value “redhat7.3”, replace it with or add to it your OS_DIRNAME.

  5. Set the values of the variables TCL_LIBRARY_ and TK_LIBRARY to include the correct version of your Tcl/Tk

Note that some of these changes may already be reflected in your environment settings above, and some may be different. Since launch.tcl is the script that starts Slicer, I find it better at least to make it self-consistent.

Building the external modules

You'll have to edit the script ${SLICER_HOME}/Scripts/cmaker.tcl and set the variables according to your system's configuration. In particular, make sure that the BUILD variable is the same as your OS_DIRNAME.

To build the Modules, cd to SLICER_HOME, and type:
> tclsh ./Scripts/cmaker.tcl

Note that the build instructions for the Modules are different from the ones above. The instructions above were given by Steve Pieper, and specifically match the launch.tcl script. You may be able to build one or more of the Modules as standalone units, using cmake, and possibly some source editing as described above. But this does not comply with the launch script, unless you instruct cmake to build the targets in a ${OS_DIRNAME}/bin subdirectory. Yet I believe cmaker.tcl does a better job for you.