Difference between revisions of "ITK/Release 4/Modularization/ Add a module"

From KitwarePublic
Jump to navigationJump to search
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:
= Choose a group for your module =
= Choose a group for your module =


Add your module into  "ITK/CMake/ITKGroups.cmake" to be include in ITK.
Add your module into  "ITK/CMake/ITKGroups.cmake" under a specific group. During the CMake step, CMake will pick up information from this file for configuration.
 


= Organize the source tree =
= Organize the source tree =
Line 15: Line 14:
In each module, there are subdirectories,
In each module, there are subdirectories,


* "include
* "include": header files (.h) and template source code (.hxx)
* "src"
* "test": testing source code (.cxx)
* "test"
* "src": source code (.cxx,.c)
 


where the headers, source code and testing code are located, respectively.
The CMake components that are in need for  "ITKFOO" module in the Filtering group are :
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/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/itk-module.cmake |Modules/Filtering/Foo/itk-module.cmake]]
* [[ITK_Release_4/Modularization/Add a module/test/CMakeLists.txt|Modules/Filtering/Foo/test/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]]


If this module generates a library or libraries (has .cxx source files), the source CMakeLists.txt is needed:
* [[ITK_Release_4/Modularization/Add a module/src/CMakeLists.txt|Modules/Filtering/Foo/src/CMakeLists.txt]]


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

Latest revision as of 16:00, 9 December 2011

Choose a group for your module

Add your module into "ITK/CMake/ITKGroups.cmake" under a specific group. During the CMake step, CMake will pick up information from this file for configuration.

Organize the source tree

Modules are located under the directory\

 ITK/Modules/<GroupName>/


In each module, there are subdirectories,

  • "include": header files (.h) and template source code (.hxx)
  • "test": testing source code (.cxx)
  • "src": source code (.cxx,.c)


The CMake components that are in need for "ITKFOO" module in the Filtering group are :

If this module generates a library or libraries (has .cxx source files), the source CMakeLists.txt is needed:

Examples

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