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

From NAMIC Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
  
===Notes before you begin===
+
=Notes before you begin=
* Slicer3 is assumed to have been built on your computer in the directory '''igt-tutorial'''
+
* Slicer3 is assumed to have been built on your computer in the directory '''igt-tutorial'''.  This means that you have the directories igt-tutorial/Slicer3, igt-tutorial/Slicer3-build and '''igt-tutorial'''/Slicer3-lib
* 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)
+
* 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)
  
===Instructions===
+
=Instructions=
  
 
First, get the OpenIGTLink module source code from the repository:
 
First, get the OpenIGTLink module source code from the repository:
   $ cd igt-tutorial
+
   $ cd '''igt-tutorial'''
 
   $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/IGTLoadableModules/OpenIGTLink OpenIGTLink
 
   $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/IGTLoadableModules/OpenIGTLink OpenIGTLink
  
Line 14: Line 14:
 
   $ mkdir OpenIGTLink-build
 
   $ mkdir OpenIGTLink-build
  
Configure using CMake 2.6:  Press the 'c' key (or the configure button), then set '''Slicer3_DIR''' to your build directory of Slicer3 (i.e. Slicer3-build), press 'c' (or the configure button) again and then press the 'g' key (or the generate button) to generate the makefiles.
+
Configure using CMake 2.6:
 +
* Run CMake - CMake is found in '''igt-tutorial'''/Slicer3-lib/CMake-build/bin  
 +
* Set the source code directory to '''igt-tutorial'''/OpenIGTLink
 +
* Set the build directory to '''igt-tutorial'''/OpenIGTLink-build
 +
* Press the 'c' key (or the configure button) - this give you a dialog box telling you that you haven't set the Slicer build directory yet
 +
* Set '''Slicer3_DIR''' to your build directory of Slicer3 (i.e. Slicer3-build)
 +
* Press 'c' (or the configure button) again
 +
* Then press the 'g' key (or the OK button) to generate the Visual Studio solution (Windows) or makefiles (linux)
  
''' Windows '''
+
=== Windows ===
 
* Open OpenIGTLink.sln in the OpenIGTLink-build folder
 
* Open OpenIGTLink.sln in the OpenIGTLink-build folder
 
* Build -> Build Solution
 
* Build -> Build Solution
Line 22: Line 29:
 
Upon completion, you will find '''OpenIGTLink.dll''' in OpenIGTLink-build/Debug
 
Upon completion, you will find '''OpenIGTLink.dll''' in OpenIGTLink-build/Debug
  
''' Linux / Mac OS X '''
+
Copy OpenIGTLink.dll into '''igt-tutorial'''/Slicer3-build/lib/Slicer3/Modules/Debug
 +
 
 +
=== Linux / Mac OS X ===
 +
* ccmake is found in '''igt-tutorial'''/Slicer3-lib/CMake-build/bin
 +
 
 
   $ cd OpenIGTLink-build
 
   $ cd OpenIGTLink-build
 
   $ ccmake ../OpenIGTLink
 
   $ ccmake ../OpenIGTLink
Line 29: Line 40:
 
   $ make
 
   $ make
  
Upon completion, you should find '''libOpenIGTLink.so''' (Linux) or '''libOpenIGTLink.dylib''' (Mac OS X) at igt-tutorial/OpenIGTLink-build
+
Upon completion, you should find '''libOpenIGTLink.so''' (Linux) or '''libOpenIGTLink.dylib''' (Mac OS X) at '''igt-tutorial'''/OpenIGTLink-build
 +
 
 +
Copy libOpenIGTLink.so (Linux) or libOpenIGTLink.dylib (Mac OS X) into '''igt-tutorial'''/Slicer3-build/lib/Slicer3/Modules/Debug

Latest revision as of 17:47, 16 October 2008

Home < IGT:ToolKit < Build-OpenIGTLink

Back to IGT:ToolKit

Notes before you begin

  • Slicer3 is assumed to have been built on your computer in the directory igt-tutorial. This means that you have the directories igt-tutorial/Slicer3, igt-tutorial/Slicer3-build and igt-tutorial/Slicer3-lib
  • 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)

Instructions

First, get the OpenIGTLink module source code from the repository:

 $ cd igt-tutorial
 $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/IGTLoadableModules/OpenIGTLink OpenIGTLink

Create a new build directory:

 $ mkdir OpenIGTLink-build

Configure using CMake 2.6:

  • Run CMake - CMake is found in igt-tutorial/Slicer3-lib/CMake-build/bin
  • Set the source code directory to igt-tutorial/OpenIGTLink
  • Set the build directory to igt-tutorial/OpenIGTLink-build
  • Press the 'c' key (or the configure button) - this give you a dialog box telling you that you haven't set the Slicer build directory yet
  • Set Slicer3_DIR to your build directory of Slicer3 (i.e. Slicer3-build)
  • Press 'c' (or the configure button) again
  • Then press the 'g' key (or the OK button) to generate the Visual Studio solution (Windows) or makefiles (linux)

Windows

  • Open OpenIGTLink.sln in the OpenIGTLink-build folder
  • Build -> Build Solution

Upon completion, you will find OpenIGTLink.dll in OpenIGTLink-build/Debug

Copy OpenIGTLink.dll into igt-tutorial/Slicer3-build/lib/Slicer3/Modules/Debug

Linux / Mac OS X

  • ccmake is found in igt-tutorial/Slicer3-lib/CMake-build/bin
 $ cd OpenIGTLink-build
 $ ccmake ../OpenIGTLink

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

 $ make

Upon completion, you should find libOpenIGTLink.so (Linux) or libOpenIGTLink.dylib (Mac OS X) at igt-tutorial/OpenIGTLink-build

Copy libOpenIGTLink.so (Linux) or libOpenIGTLink.dylib (Mac OS X) into igt-tutorial/Slicer3-build/lib/Slicer3/Modules/Debug