ITK/Release 4/Modularization/Prototype/Tutorial
Overview
- Toy Example design
This tutorial demonstrates the prototype of modularized ITK with a toy example containing seven modules and a testing application. The seven library modules are:
* itk-vnl (a subset of numeric libraries of VXL), * kwsys (a supporting library for ), * itk-common (core classes, macro definitions, typedefs, and other software constructs central to ITK), * itk-io-common (classes that support the reading and writing of data), * nrrdio (third-party library), * itk-io-nrrd (itk wrapper of nrrdio). * itk-zlib (zlib library wrapped up for nirrdio)
The application "test-itk-nrrd" module contains one test program that reads and writes images in Nrrd format.
- CMake prototyping
To enable ITK developers download and configure the whole modularized ITK package, we designed several cmake magics to serve the modularized ITK . The major challenge is to manage dependencies between the modules. Two strategies using CMake have been proposed so far and both are demonstrated in this tutorial. A classic CMake approach is to use "add_subdirectory" to include each module in correct order according to their dependencies. Git submodule is used to obtain all the modules all together with specific versions. Here we refer this approach as "itk-complete" approach (Method A). Another approach is to use the state-of-the-art cmake function "add_export_project" to automate the process of pulling selected modules from their repositories and building them. Users can select the specific modules they need for their applications from the cmake gui.We refer to this second approach as "itk-optional" approach (Method B).
Requirements
- A computer with a network connection
- A build environment (gcc / VS)
- CMake 2.8.2 installed([1])
- Git 1.7.x.x installed ([2])
Git repositories of individual modules
- itk-vnl
git://kwsource.kitwarein.com/itk/itk-vnl.git
- kwsys
git://kwsource.kitwarein.com/itk/kwsys.git
- itk-zlib
git://kwsource.kitwarein.com/itk/itk-zlib.git
- nrrdio
git://kwsource.kitwarein.com/itk/nrrdio.git
- itk-common
git://kwsource.kitwarein.com/itk/itk-common.git
- itk-io-common
git://kwsource.kitwarein.com/itk/itk-io-common.git
- itk-io-nrrd
git://kwsource.kitwarein.com/itk/itk-io-nrrd.git
- test-itk-nrrd
git://kwsource.kitwarein.com/itk/test-itk-nrrd.git
Method A: itk-complete
Download the itk-complete package using Git:
git clone git://kwsource.kitwarein.com/itk/itk-complete.git
Download toy modular ITK modules using git submodule:
# enter the itk-complete directory cd itk-complete # add the submodule repository URLs git submodule init # clone the repositories and check out the commits specified in the superproject git submodule update
Build
- How to build the modularized code
Test
- How to submit a build to the ITK Dashboard
- and where to find it.
http://www.cdash.org/CDash/index.php?project=Insight#ITKv4_Modularization
Method B: itk-optional
Download
- How to download the modularized code
Configure
- How to configure the modularized code
- CMake commands...
Build
- How to build the modularized code
Test
- How to submit a build to the ITK Dashboard
- and where to find it.
http://www.cdash.org/CDash/index.php?project=Insight#ITKv4_Modularization
CDash Tests
url for the nightly run
Reference
https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial