Slicer3:Manual Build

From Slicer Wiki
Revision as of 01:58, 14 December 2009 by Pieper (talk | contribs) (→‎Configure and build VTK)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Slicer3:Manual Build

Manual checkout/build of Slicer3 and support libraries:

Note: the getbuiltest script described above simply automates and systematizes a sequence of build operations that can be performed manually. You may want to use the manual method if you are testing against different versions of VTK or ITK, or if you have existing build trees that you want to re-use. Note that not all combinations of software versions and build flags are actively tested. The following information may not be up to date as new code is added to the various repositories.


Prerequisite software

You need to get and build the following packages if you aren't using the getbuildtest script. The tags for all of the versions we are currently using can be found in the file Slicer/slicer_variables.tcl, so if you are unsure, check there for the latest word on versions:

set ::CMAKE_TAG "CMake-2-6"
set ::Teem_TAG http://teem.svn.sourceforge.net/svnroot/teem/teem/trunk
set ::KWWidgets_TAG "HEAD"
set ::VTK_TAG "VTK-5-2"
set ::ITK_TAG ITK-3-8
set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release25-maint"
set ::BLAS_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/BLAS
set ::LAPACK_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/lapack-3.1.1
set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/branches/1.1.x"
set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/branches/0.6.x"
set ::SLICERLIBCURL_TAG "HEAD"
  1. CMake
  2. Tcl/Tk (8.4 or later)
  3. incrTcl (3.2.1)
  4. VTK
  5. ITK
  6. KWWidgets
  7. Teem
  8. SlicerLibCurl

Build Steps

Steps:

$ svn co http://svn.slicer.org/Slicer3/trunk Slicer3
$ cvs -d :pserver:anoncvs@www.vtk.org:/cvsroot/VTK co VTK -r VTK-5-2
$ cvs -d :pserver:anoncvs@www.itk.org:/cvsroot/Insight co Insight -r ITK-3-8
$ cvs -d :pserver:anoncvs@www.kwwidgets.org:/cvsroot/KWWidgets co KWWidgets
$ svn co http://svn.slicer.org/Slicer3-lib-mirrors/trunk/cmcurl cmcurl


Configure and build ITK

  • BUILD_SHARED_LIBS ON (optional)
  • CMAKE_SKIP_RPATH ON
  • ITK_USE_REVIEW ON
  • ITK_USE_OPTIMIZED_REGISTRATION_METHODS ON
  • ITK_USE_TRANSFORM_IO_FACTORIES ON

Configure and build VTK

  • All systems:
    • BUILD_SHARED_LIBS ON
    • CMAKE_SKIP_RPATH ON
    • VTK_WRAP_TCL ON
    • VTK_DEBUG_LEAKS ON


  • MacOSX specific (Make sure to install X11):
    • VTK_USE_CARBON OFF
    • VTK_USE_COCOA OFF
    • VTK_USE_X ON


  • Note, those options should not appear, since they disapear since VTK5:
    • VTK_USE_HYBRID ON
    • VTK_USE_PATENTED ON
  • Make sure that the TCL and TK path are set properly
    • TCL_* and TK_*

Configure and build KWWidgets

  • You need to specify where your VTK build tree is.
  • BUILD_SHARED_LIBS ON
  • CMAKE_SKIP_RPATH ON

Configure and build curl

  • BUILD_SHARED_LIBS OFF

Build and Run Slicer3

Manually

  1. Check out and build slicer3 (e.g. on linux)
 svn co http://svn.slicer.org/Slicer3/trunk Slicer3
 mkdir Slicer3-build
 cd Slicer3-build
 ccmake ../Slicer3
 make

Again make sure to turn:

  • BUILD_SHARED_LIBS ON
  • CMAKE_SKIP_RPATH ON


Start slicer with the Slicer3 executable in your build directory.