Difference between revisions of "IGT:ToolKit/Build-Tracker-Simulator"

From NAMIC Wiki
Jump to: navigation, search
(New page: 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 re...)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
 
Back to [[IGT:ToolKit|IGT:ToolKit]]
 +
[[OpenIGTLink | << OpenIGTLink]] | [[OpenIGTLink/Library | Library]]
  
 +
== Linux / Mac OS X ==
  
===Notes before you begin===
+
First obtain the source code from the repository. Open the terminal and run:
* 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)
 
  
===Instructions===
+
  $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink OpenIGTLink
  
First, get the tracker simulator source code from the repository:
+
Then configure using CMake. The library requires CMake version higher than 2.4.
   $ cd igt-tutorial
+
  $ mkdir OpenIGTLink-build
   $ svn co http://www.na-mic.org/svn/NAMICSandBox/trunk/BRPTools/ScannerIO ScannerIO
+
   $ cd OpenIGTLink-build
 +
   $ ccmake ../OpenIGTLink
  
Configure using CMake 2.6:  You should not need to change any settings - just press the 'c' key followed by the 'g' key to generate the makefiles.
+
Then CMake configuration screen shows up on your terminal. Normally, you don't need to change any options except making sure BUILD_EXAMPLES is ON. Just press the 'c' key (configure) followed by the 'g' key (generate). and quit the configuration screen. Now you are ready to build the software.
$ cd ScannerIO
 
$ ccmake .
 
  
If the previous command has completed without error, you can start building:
 
 
   $ make
 
   $ make
  
Upon completion, you should find the '''TrackerSim''' executable file at ScannerIO/bin
+
You may install the library into your disk (optional). The default target directory is /usr/local, but you can configure it from the CMake configuration screen. To install the files, run
 +
 
 +
  $ make install
 +
 
 +
You might need super user access.
 +
 
 +
== Windows ==
 +
* Download [http://tortoisesvn.net/downloads SVN Windows client] if you don't have one already
 +
* You will also need [http://www.cmake.org/HTML/Download.html CMake] and a C/C++ compiler as [http://www.microsoft.com/express/vc/ Microsoft Visual C++]
 +
* Download out the source code from SVN
 +
** Create a directory, ex. C:\Devel\OpenIGT\OpenIGTLink
 +
** Right click on this directory (OpenIGTLink)
 +
** From the menu select "SVN Checkout..."
 +
** URL of repository: http://www.na-mic.org/svn/NAMICSandBox/trunk/OpenIGTLink/
 +
** Click OK
 +
* Run CMake
 +
** Where is the source code: C:\Devel\OpenIGT\OpenIGTLink
 +
** Where to build the binaries: C:\Devel\OpenIGT\build
 +
** Click "Configure" and select your compiler (usually just click "OK")
 +
** Message: "Build directory does not exit, should I create it?" - click "OK"
 +
** It might give a "pdflatex" error, just ignore it for now
 +
** Click "Configure"
 +
** Click "OK" to close CMake
 +
* Start Visual C and compile the project (C:\Devel\OpenIGT\build\OpenIGTLink.sln)
 +
 
 +
If all went OK you will have the executable and the library:
 +
* C:\Devel\OpenIGT\build\Testing\debug\igtlSocketTest.exe
 +
* C:\Devel\OpenIGT\build\Source\debug\OpenIGTLink.lib
 +
 
 +
== <font color="red">!!Note on Windows!!</font color="red"> ==
 +
If you planning to link the OpenIGTLink Library with IGSTK, or 3D Slicer OpenIGTLinkIF module, please make sure that you use windows version of CMake (not one in the Cygwin environment) and Visual Studio. Since IGSTK and 3D Slicer are compiled with Visual Studio, the OpenIGTLink library built in cygwin environment using GCC cannot be linked with those software.
 +
 
 +
 
 +
 
 +
Upon completion, you should find the '''TrackerSim''' executable file in ScannerIO/bin

Latest revision as of 21:06, 8 April 2009

Home < IGT:ToolKit < Build-Tracker-Simulator

Back to IGT:ToolKit << OpenIGTLink | Library

Linux / Mac OS X

First obtain the source code from the repository. Open the terminal and run:

 $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink OpenIGTLink

Then configure using CMake. The library requires CMake version higher than 2.4.

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

Then CMake configuration screen shows up on your terminal. Normally, you don't need to change any options except making sure BUILD_EXAMPLES is ON. Just press the 'c' key (configure) followed by the 'g' key (generate). and quit the configuration screen. Now you are ready to build the software.

 $ make

You may install the library into your disk (optional). The default target directory is /usr/local, but you can configure it from the CMake configuration screen. To install the files, run

 $ make install

You might need super user access.

Windows

  • Download SVN Windows client if you don't have one already
  • You will also need CMake and a C/C++ compiler as Microsoft Visual C++
  • Download out the source code from SVN
  • Run CMake
    • Where is the source code: C:\Devel\OpenIGT\OpenIGTLink
    • Where to build the binaries: C:\Devel\OpenIGT\build
    • Click "Configure" and select your compiler (usually just click "OK")
    • Message: "Build directory does not exit, should I create it?" - click "OK"
    • It might give a "pdflatex" error, just ignore it for now
    • Click "Configure"
    • Click "OK" to close CMake
  • Start Visual C and compile the project (C:\Devel\OpenIGT\build\OpenIGTLink.sln)

If all went OK you will have the executable and the library:

  • C:\Devel\OpenIGT\build\Testing\debug\igtlSocketTest.exe
  • C:\Devel\OpenIGT\build\Source\debug\OpenIGTLink.lib

!!Note on Windows!!

If you planning to link the OpenIGTLink Library with IGSTK, or 3D Slicer OpenIGTLinkIF module, please make sure that you use windows version of CMake (not one in the Cygwin environment) and Visual Studio. Since IGSTK and 3D Slicer are compiled with Visual Studio, the OpenIGTLink library built in cygwin environment using GCC cannot be linked with those software.


Upon completion, you should find the TrackerSim executable file in ScannerIO/bin