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

From KitwarePublic
< ITK‎ | Release 4‎ | Wrapping
Jump to navigationJump to search
 
(One intermediate revision by one other user 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
* Xcode version 3.x [http://developer.apple.com]
* Swig for Mac OS X [http://swig.org]
* Swig for Mac OS X [http://swig.org]
* CMake [http://www.cmake.org]
* CMake [http://www.cmake.org]
* Doxygen [http://www.doxygen.org]
* Doxygen [http://www.doxygen.org]
* Git [http://www.itk.org/Wiki/Git/Download]
* Git [http://www.itk.org/Wiki/Git/Download]
optionally ( but we recommend it highly ! )
* ccache [[../../Wrapping/ccache|enabling ccache]]


= Download ITK =
= Download ITK =


Download ITK source from the git page [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 (For results link [[/Wrap_ITK_EXPLICIT|here]]). Much improvement in building WrapITK can be made by [[../../Wrapping/ccache|enabling ccache]]. Finally, run the make utility.
make
ITK/build directory would contain the binaries.


= Experimental build =
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 [[/Wrap_ITK_EXPLICIT|here]] ).
* WRAP_ITK_EXPLICIT
 
Much improvement in building speed can be achieve by [[../../Wrapping/ccache|enabling ccache]].


To create the experimental build, run the command:
Now, keep configuring until the "generate" option appears. Generate. Compile.
ctest -D Experimental

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.