diff --git a/Documentation/Doxygen/DeveloperManual/Starting/FirstSteps/NewModule.dox b/Documentation/Doxygen/DeveloperManual/Starting/FirstSteps/NewModule.dox index c3b65b3ceb..6bc1ce3025 100644 --- a/Documentation/Doxygen/DeveloperManual/Starting/FirstSteps/NewModule.dox +++ b/Documentation/Doxygen/DeveloperManual/Starting/FirstSteps/NewModule.dox @@ -1,82 +1,82 @@ /** \page NewModulePage How to create a new MITK Module \section NewModulePageCreateFolder 1) Create a Folder for your Module First, create a folder for your module within /Modules e.g. 'NewModule'. You need to add the new Folder to the CMakeLists.txt in the Module directory as well as well. Open /Modules/CMakeLists.txt, it should be pretty clear how to add the Module, just insert it into the set(module_dirs) section. \code set(module_dirs ... NewModule ) \endcode Inside the folder create a new folder called "Testing", which will later contain the module tests. Also create subfolders for you sourceFiles, for example "NewModuleFilters" and "NewModuleSourceFiles". \section NewModulePageCreateCMakeLists 2) Create CMakeLists.txt Within your module create the following file named CMakeLists.txt with the following content: \code MITK_CREATE_MODULE(NewModule #<-- module name SUBPROJECTS INCLUDE_DIRS NewModuleFilters NewModuleServices #<-- sub-folders of module INTERNAL_INCLUDE_DIRS ${INCLUDE_DIRS_INTERNAL} DEPENDS Mitk #<-- modules on which your module depends on ) ADD_SUBDIRECTORY(Testing) #<-- Directory for tests \endcode Choose a fitting module name. This name should only contain Letters (both upper- and lowercase), no numbers, no underscores etc. This name will be used to qualify your Module within the MITK Framework, so make sure it is unique. Typically, the name will be the same as name of the Folder the Module resides in. It is good practice to create subfolders in your module to structure your classes. Make sure to include these folders in the List of subfolders, or CMake will not find the internal Files. In the DEPENDS section, you can enter the modules that your module requires to function. You will not be able to use classes from modules that are not listed here. \section NewModulePageCreatefilesdotcmake 3) Create files.cmake Next, create a new file and name it files.cmake, containing the following: \code SET(CPP_FILES NewModuleFilters/File1.cpp NewModuleFilters/File2.cpp NewModuleServices/Filter1.cpp ) \endcode Add each .cpp file you create to this file. Also, only add you .cpp files here, not the header files! \section NewModulePageCreateTEstingEnvironment 4) Set up the Test environment We also need to set up a testing environment where you can add your tests. Inside your "Testing" Folder, create a new files.cmake containing the following: \code SET(MODULE_TESTS mitkNewModuleTest.cpp ) \endcode Also, create a new CMakeLists.text: \code MITK_CREATE_MODULE_TESTS() \endcode That's it! Enjoy your new module! After following these steps, it should look something like this: -\imageMacro{NewModule.png,"Your shiny new module!",16} +\imageMacro{NewModule.png,"Your shiny new module!",6} */ \ No newline at end of file