ITK/Release 4/Modularization/ Add a module: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
1. Choose a group for your module
__TOC__
  Add your module into  "ITK/CMake/ITKGroups.cmake" to be include in ITK.


= Choose a group for your module =


2. Organize the source tree
Add your module into  "ITK/CMake/ITKGroups.cmake" to be include in ITK.
  Modules are located under "ITK/Modules/<Group>/".
 
  In each module, there are "include","src", "test" subdirectories, where the headers, source code and testing code are located, respectively.
 
= Organize the source tree =
 
Modules are located under the directory\
 
  ITK/Modules/<GroupName>/
 
 
In each module, there are subdirectories,
 
* "include
* "src"
* "test"
 
where the headers, source code and testing code are located, respectively.
   
   
  The CMake components that are in need for  "ITK-FOO" module in the Filtering group:
The CMake components that are in need for  "ITK-FOO" module in the Filtering group:
  * [[ITK_Release_4/Modularization/Add a module/CMakeLists.txt |Modules/Filtering/Foo/CMakeLists.txt]]
 
  * [[ITK_Release_4/Modularization/Add a module/itk-module.cmake |Modules/Filtering/Foo/itk-module.cmake]]
* [[ITK_Release_4/Modularization/Add a module/CMakeLists.txt |Modules/Filtering/Foo/CMakeLists.txt]]
  * [[ITK_Release_4/Modularization/Add a module/test/CMakeLists.txt|Modules/Filtering/Foo/test/CMakeLists.txt]]  
* [[ITK_Release_4/Modularization/Add a module/itk-module.cmake |Modules/Filtering/Foo/itk-module.cmake]]
  * If this module generates a library or libraries (has .cxx source files): [[ITK_Release_4/Modularization/Add a module/src/CMakeLists.txt|Modules/Filtering/Foo/src/CMakeLists.txt]]
* [[ITK_Release_4/Modularization/Add a module/test/CMakeLists.txt|Modules/Filtering/Foo/test/CMakeLists.txt]]  
* If this module generates a library or libraries (has .cxx source files): [[ITK_Release_4/Modularization/Add a module/src/CMakeLists.txt|Modules/Filtering/Foo/src/CMakeLists.txt]]
 


= Examples =


Examples:
* All modules in ITK.
* All modules in ITK.
* Adding a moule is easy! Arnaud did it without instructions:[http://review.source.kitware.com/#change,1311] added "ITK-FastMarching" module to ITK.
* Adding a moule is easy!
** Arnaud did it without instructions:[http://review.source.kitware.com/#change,1311] added "ITK-FastMarching" module to ITK.

Revision as of 23:01, 4 April 2011

Choose a group for your module

Add your module into "ITK/CMake/ITKGroups.cmake" to be include in ITK.


Organize the source tree

Modules are located under the directory\

 ITK/Modules/<GroupName>/


In each module, there are subdirectories,

  • "include
  • "src"
  • "test"

where the headers, source code and testing code are located, respectively.

The CMake components that are in need for "ITK-FOO" module in the Filtering group:


Examples

  • All modules in ITK.
  • Adding a moule is easy!
    • Arnaud did it without instructions:[1] added "ITK-FastMarching" module to ITK.