ITK/Release 4/Wrapping/WrapITK Installation: Difference between revisions

From KitwarePublic
< ITK‎ | Release 4‎ | Wrapping
Jump to navigationJump to search
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''WrapITK Installation'''
'''WrapITK Installation'''
Steps for WrapITK installation on Mac OS X  Snow Leopard:
Steps for WrapITK installation
 
= Required tools =
= Required tools =
* your usual compiler
* Swig for Mac OS X [http://swig.org]
* CMake [http://www.cmake.org]
* Doxygen [http://www.doxygen.org]
* Git [http://www.itk.org/Wiki/Git/Download]


* Xcode version 3.x from developer.apple.com
optionally ( but we recommend it highly ! )
* Swig for Mac OS X [the default  version would work just fine. Macports version of swig may cause problem]
* ccache [[../../Wrapping/ccache|enabling ccache]]
* CMake from http://www.cmake.org/
* Doxygen from http://www.doxygen.org/
* Git http://www.itk.org/Wiki/Git/Download/


= Download ITK =
= Download ITK =


Download ITK source from the git page from http://www.vtk.org/Wiki/ITK/Git/Download
Download ITK as explained  [http://www.vtk.org/Wiki/ITK/Git/Download | here ]
Make sure you checkout the Master branch using git checkout master instead of any other tag. The output directory ITK would contain the source code.


= Build ITK =
= Build ITK =


Create a new directory for ITK binaries and run cmake from command line or GUI to build the ITK source.
Create a BUILD directory and go there (example given for linux/mac)
mkdir BUILD
cd BUILD


mkdir build
Run CCMake (example given for linux/mac)
cd build
  ccmake ..
  ccmake ..
Make sure of enabling the configuration options USE_WRAP_ITK, ITK_USE_REVIEW, and BUILD_SHARED_LIBS in the configuration. For specific language wrapping support, enable the corresponding options. For example, enable WRAP_ITK_PYTHON for Python, WRAP_ITK_JAVA for Java. Note that WRAP_ITK_EXPLICIT option should be set ON when building WrapITK for many languages;this will improve build time significantly,


make
Set the following CMake flags ON:
* USE_WRAP_ITK
* ITK_USE_REVIEW (This is an advanced option, you would need to toggle them on)
* BUILD_SHARED_LIBS


ITK/build directory would contain the binaries.
Then Choose which language(s) you want to create libraries for by setting the corresponding flag ON
* WRAP_ITK_PYTHON
* WRAP_ITK_JAVA
* WRAP_ITK_TCL ...


= Experimental build =
Note that if you choose more than one, you might want to switch the following flag ON as well to sped up the process ( Examples of speed ups [[/Wrap_ITK_EXPLICIT|here]] ).
* WRAP_ITK_EXPLICIT


To create the experimental build, run the command:
Much improvement in building speed can be achieve by [[../../Wrapping/ccache|enabling ccache]].


ctest -D Experimental
Now, keep configuring until the "generate" option appears. Generate. Compile.

Latest revision as of 16:00, 9 December 2011

WrapITK Installation Steps for WrapITK installation

Required tools

  • your usual compiler
  • Swig for Mac OS X [1]
  • CMake [2]
  • Doxygen [3]
  • Git [4]

optionally ( but we recommend it highly ! )

Download ITK

Download ITK as explained | here

Build ITK

Create a BUILD directory and go there (example given for linux/mac)

mkdir BUILD
cd BUILD

Run CCMake (example given for linux/mac)

ccmake ..

Set the following CMake flags ON:

  • USE_WRAP_ITK
  • ITK_USE_REVIEW (This is an advanced option, you would need to toggle them on)
  • BUILD_SHARED_LIBS

Then Choose which language(s) you want to create libraries for by setting the corresponding flag ON

  • WRAP_ITK_PYTHON
  • WRAP_ITK_JAVA
  • WRAP_ITK_TCL ...

Note that if you choose more than one, you might want to switch the following flag ON as well to sped up the process ( Examples of speed ups here ).

  • WRAP_ITK_EXPLICIT

Much improvement in building speed can be achieve by enabling ccache.

Now, keep configuring until the "generate" option appears. Generate. Compile.