Skip to content

Contribute to CemrgApp

Jose Alonso Solis-Lemus edited this page Jul 26, 2022 · 2 revisions

Two possibilities, contributing a plugin or contributing a module.

Collaborating for the app

  • Fork the repository
  • Clone from your forked repository
  • Checkout the development branch
  • Create a new branch for you to work on
  • Build (follow instructions Build the App)

Contributing a plugin

Creating a plugin is simple. Assuming that,

$CEMRG_SOURCE = /path/to/clone/of/cemrgapp
$CEMRG_BUILD = /path/to/cemrgapp/build/folder

Then, once you build CemrgApp, you have access to the plugin generator, first go to the following folder:

cd $CEMRG_BUILD/MITK-build/bin

Then, create the folder structure of your plugin like the example below:

./MitkPluginGenerator -y --out-dir /path/to/output_dir \ 
    --license /LICENSE \ 
    --vendor KCL \ 
    --project-copyright $CEMRG_SOURCE/Copyright.txt \
    --project-app-name CemrgApp \ 
    --view-class "ClassNameView" \ 
    --view-name "Class Name" \ 
    --plugin-symbolic-name kcl.cemrgapp.classname \ 
    --plugin-name "Name of Plugin"

If you are using this guide to create your own plugin, change the following line to your needs

./MitkPluginGenerator -y -o /path/to/output_dir -vc "ClassNameView" -vn "Class Name" -ps kcl.cemrgapp.scar -pn "Name of Plugin" --project-app-name CemrgApp --vendor KCL --license $CEMRG_SOURCE/LICENSE --project-copyright $CEMRG_SOURCE/Copyright.txt

Modify created plugin to match our plugins

  • Code standards
  • Same structure
  • Add to PluginList.cmake file

Create new perspective on kcl.cemrgapp.mainapp These steps will help you add your plugin to CemrgApp as a perspective.

  • Create perspective: QMitkCemrgYourNewPerspective.{h, cpp}, then
  • Add a call to it in kcl_cemrgapp_mainapp_Activator.cpp,
  • Add it to plugin.xml, and
  • Add it to files.cmake

Contributing a module