Difference between revisions of "IGT:ToolKit/Build-IGSTK"

From NAMIC Wiki
Jump to: navigation, search
Line 1: Line 1:
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
  
1. In directory '''igt-tutorial''', download IGSTK source code by running these commands:
+
===Notes before you begin===
  cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK login
+
* Slicer3 is assumed to have been built on your computer in the directory '''igt-tutorial'''
  answer by 'igstk'
+
* CMake 2.6 is absolutely required. If you don't have it installed, you can use the version of ccmake found in igt-tutorial/Slicer3-lib/CMake-build/bin (it will be CMake 2.6)
cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTK
+
* VTK needs to be built with the the parallel setting (VTK_USE_PARALLEL) set to ONNewer builds of Slicer3 build VTK with the parallel setting turned on. If you have an older build of Slicer3, you can either update Slicer3 or rebuild VTK.
  cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTKSandbox
 
  
2. Build IGSTK
+
===Get the IGSTK and IGSTKSandbox source code:===
* In directory '''igt-tutorial''', create a new directory '''IGSTK-build'''.
+
  $ cd igt-tutorial
* Cd IGSTK-build, configure the project
+
  $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK login
ccmake ../IGSTK
+
    answer with 'igstk'
You need ITK, VTK for the configuration. ITK and VTK can be found after Slicer3 is built. Here is an example of how IGSTK is configured:
+
  $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTK
 +
  $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTKSandbox
 +
 
 +
===Build IGSTK===
 +
cd to your '''igt-tutorial''' folder, then
 +
 
 +
  $ mkdir IGSTK-build
 +
  $ cd IGSTK-build
 +
  $ ccmake ../IGSTK
 +
 
 +
Configure using CMake 2.6.  You need ITK and VTK for this configuration, both of which can be found in your '''Slicer3-lib''' folder after Slicer3 has been built. Here is an example of how IGSTK is configured:
  
 
  BUILD_DOCUMENTATION              OFF
 
  BUILD_DOCUMENTATION              OFF
Line 36: Line 45:
 
  VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build
 
  VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build
  
* Run this command to build
+
If the previous command has completed without error, you can start building
make
+
  $ make
 +
 
 +
===Build IGSTKSandbox===
 +
cd to your '''igt-tutorial''' folder, then
 +
 
 +
  $ mkdir IGSTKSandbox-build
 +
  $ cd IGSTKSandbox-build
 +
  $ ccmake ../IGSTKSandbox
  
3. Build IGSTKSandbox
+
Configure using CMake 2.6.  You need ITK, VTK and IGSTK for this configuration.  ITK and VTK can be found in your '''Slicer3-lib''' folder after Slicer3 has been built.  IGSTK was built in the previous step. Here is an example of how IGSTK is configured (note that you should refer to the IGSTK folder and not the IGSTK-build folder):
* In directory '''igt-tutorial''', create a new directory '''IGSTKSandbox-build'''.
 
* Cd IGSTKSandbox-build, configure the project
 
  ccmake ../IGSTKSandbox
 
You need ITK, VTK and IGSTK to configure IGSTKSandbox. See below for an example:
 
  
 
  BUILD_SHARED                    ON
 
  BUILD_SHARED                    ON
Line 77: Line 89:
 
  VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build
 
  VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build
  
* Run this command to build
+
If the previous command has completed without error, you can start building
make
+
  $ make

Revision as of 04:57, 5 June 2008

Home < IGT:ToolKit < Build-IGSTK

Back to IGT:ToolKit

Notes before you begin

  • Slicer3 is assumed to have been built on your computer in the directory igt-tutorial
  • CMake 2.6 is absolutely required. If you don't have it installed, you can use the version of ccmake found in igt-tutorial/Slicer3-lib/CMake-build/bin (it will be CMake 2.6)
  • VTK needs to be built with the the parallel setting (VTK_USE_PARALLEL) set to ON. Newer builds of Slicer3 build VTK with the parallel setting turned on. If you have an older build of Slicer3, you can either update Slicer3 or rebuild VTK.

Get the IGSTK and IGSTKSandbox source code:

 $ cd igt-tutorial
 $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK login
   answer with 'igstk'
 $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTK
 $ cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/IGSTK co IGSTKSandbox

Build IGSTK

cd to your igt-tutorial folder, then

 $ mkdir IGSTK-build
 $ cd IGSTK-build
 $ ccmake ../IGSTK

Configure using CMake 2.6. You need ITK and VTK for this configuration, both of which can be found in your Slicer3-lib folder after Slicer3 has been built. Here is an example of how IGSTK is configured:

BUILD_DOCUMENTATION              OFF
BUILD_TESTING                    ON
CMAKE_BACKWARDS_COMPATIBILITY    2.4
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX             /usr/local
DART_ROOT                        DART_ROOT-NOTFOUND
EXECUTABLE_OUTPUT_PATH           /home/hliu/projects/igstk/IGSTK-build/bin
IGSTK_BUILD_EXAMPLES             ON
IGSTK_BUILD_TESTING              ON
IGSTK_DEVELOPMENT_VERSION        ON
IGSTK_TEST_AURORA_ATTACHED       ON
IGSTK_TEST_AURORA_PORT_NUMBER    0
IGSTK_TEST_LOOPBACK_ATTACHED     OFF
IGSTK_TEST_LOOPBACK_PORT_NUMBE   1
IGSTK_TEST_POLARIS_ATTACHED      OFF
IGSTK_TEST_POLARIS_PORT_NUMBER   0
IGSTK_USE_FLTK                   OFF
IGSTK_USE_MicronTracker          OFF
IGSTK_USE_Qt                     OFF
ITK_DIR                          /home/hliu/projects/Slicer3-lib/Insight-build
LIBRARY_OUTPUT_PATH              /home/hliu/projects/igstk/IGSTK-build/bin
VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build

If the previous command has completed without error, you can start building

 $ make

Build IGSTKSandbox

cd to your igt-tutorial folder, then

 $ mkdir IGSTKSandbox-build
 $ cd IGSTKSandbox-build
 $ ccmake ../IGSTKSandbox

Configure using CMake 2.6. You need ITK, VTK and IGSTK for this configuration. ITK and VTK can be found in your Slicer3-lib folder after Slicer3 has been built. IGSTK was built in the previous step. Here is an example of how IGSTK is configured (note that you should refer to the IGSTK folder and not the IGSTK-build folder):

BUILD_SHARED                     ON
BUILD_TESTING                    ON
CMAKE_BACKWARDS_COMPATIBILITY    2.4
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX             /usr/local
DART_ROOT                        DART_ROOT-NOTFOUND
DOT                              DOT-NOTFOUND
EXECUTABLE_OUTPUT_PATH           /home/hliu/projects/igstk/IGSTKSandbox-build/bin
FLTK_DIR                         FLTK_DIR-NOTFOUND
IGSTKSandbox_BUILD_EXAMPLES      ON
IGSTKSandbox_BUILD_SUPERVISED_   OFF
IGSTKSandbox_BUILD_TESTING       ON
IGSTKSandbox_SEND_TRANSFORMS_T   ON
IGSTKSandbox_TEST_AURORA_ATTAC   ON
IGSTKSandbox_TEST_AURORA_PORT_   0
IGSTKSandbox_TEST_FLOCKOFBIRD_   OFF
IGSTKSandbox_TEST_FLOCKOFBIRD_   1
IGSTKSandbox_TEST_LOOPBACK_ATT   OFF
IGSTKSandbox_TEST_LOOPBACK_POR   1
IGSTKSandbox_TEST_POLARIS_ATTA   OFF
IGSTKSandbox_TEST_POLARIS_PORT   0
IGSTKSandbox_USE_FLTK            OFF
IGSTKSandbox_USE_MicronTracker   OFF
IGSTKSandbox_USE_OpenIGTLink     ON
IGSTKSandbox_USE_Qt              OFF
IGSTKSandbox_USE_vtkKWImage      ON
IGSTK_SOURCE_DIR                 /home/hliu/projects/igstk/IGSTK
IGSTK_USE_COORDINATE_REFERENCE   ON
ITK_DIR                          /home/hliu/projects/Slicer3-lib/Insight-build
LIBRARY_OUTPUT_PATH              /home/hliu/projects/igstk/IGSTKSandbox-build/bin
VTK_DIR                          /home/hliu/projects/Slicer3-lib/VTK-build

If the previous command has completed without error, you can start building

 $ make