ITK/Release 4/Modularization/Prototype/Tutorial: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 36: Line 36:




= itk-devel: Sub-Directory Approach =
= The sub-directory approach: itk-devel =
To enable downloading and configure the whole modularized ITK package for usual ITK developers, the classic CMake approach is to  
To enable downloading and configure the whole modularized ITK package for usual ITK developers, the classic CMake approach is to  
use "add_subdirectory" to include each module in correct order according to their dependencies.
use "add_subdirectory" to include each module in correct order according to their dependencies.

Revision as of 18:44, 2 November 2010

Overview

  • Toy Example design: this tutorial demonstrates the prototype of modularized ITK with an toy example containing six modules and a testing application. The toy modular ITK package contains six library modules and a test application, which reads and writes images in Nrrd format.

They are listed as follows:

 * 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).
  • CMake prototyping

To enable ITK developers download and configure the whole modularized ITK package, redesigning the cmake configurations of the modularized ITK is necessary. 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. The classic CMake approach is to use "add_subdirectory" to include each module in correct order according to their dependencies. Here we refer this approach as "sub directory" approach (Method A). Another approach is to use the state-of-the-art cmake function "add_export_project" to automate the process of pulling codes and data from their repositories. We refer to this second approach as "export project" 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
  • 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


The sub-directory approach: itk-devel

To enable downloading and configure the whole modularized ITK package for usual ITK developers, the classic CMake approach is to use "add_subdirectory" to include each module in correct order according to their dependencies.

Download

Git repository:

  • itk-devel
  git://kwsource.kitwarein.com/itk/itk-devel.git
  • itk-depends
  git://kwsource.kitwarein.com/itk/itk-depends.git

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

itk-use: Export-Project Approach

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

Reference

 https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial