There is no need to install anythin as the libraries used are common python libraries. After cloning the repository
git clone https://github.com/OpenHeartDevelopers/cemrg_plugin_generator.git cemrg_plugin_generatorand cd into the selected folder cemrg_plugin_generator, add the folder to the PYTHONPATH:
export PYTHONPATH=$PYTHONPATH:$PWDThe help text is below:
➜ python scripts/plugin_generator.py -h
usage: plugin_generator.py [-h] [-pn PLUGIN_NAME] [-sn SYMBOLIC_NAME] [-vn VIEW_NAME] [-v VENDOR]
[-l LICENSE] [-d] [-ow]
optional arguments:
-o / --output OUTPUT_FOLDER (Output will be in OUTPUT_FOLDER/PLUGIN_NAME )
-pn / --plugin-name PLUGIN_NAME
-sn / --symbolic-name SYMBOLIC_NAME (default = kcl.cemrgapp.myplugin)
-vn / --view-name VIEW_NAME (View filename )
-v / --vendor VENDOR (default = KCL)
-l / --license LICENSE_PATH
-d, --debug
-ow, --overwrite This is an example usage of plugin generator for the Atrial Strain Motion pipeline:
- Generate the plugin with the following command
python scripts/plugin_generator.py -pn "Cemrg Atrial Strain Motion" -sn kcl.cemrgapp.atrialstrainmotion -vn AtrialStrainMotion- Move this new pineline to the
Pluginfolder in CemrgApp. But before doing this, it is advisory to create a new branch calledplugin/atrailstrainmotionfrom thedevelopmentbranch, and checkout to it
cd ~/Projects/CemrgApp/cemrgapp
git checkout development
git checkout -b plugin/atrialstrainmotion
cd ~/Repositories/cemrg_plugin_generator
mv ./kcl.cemrgapp.atrialstrainmotion ~/Projects/CemrgApp/cemrgapp/CemrgApp/Plugins/-
Make the CemrgApp aware of it by
- adding
kcl.cemrgapp.atrialstrainmotion: ONinPluginList.cmakeunderPluginsfolder - The following instructions are done inside the
Plugins/kcl.cemrgapp.mainappfolder. You can follow the way previous plugins have been added.- Create both
.hand.cppfiles in theperspectivesfolder. SoQmitkCemrgAtrialStrainMotion.h, andQmitkCemrgAtrialStrainMotion.cpp - Change the
kcl_cemrgapp_mainapp_Activator.cppto include the newQmitkCemrgAtrialStrainMotionfiles. - Add the new
QmitkCemrgAtrialStrainMotionfiles to thefiles.cmake - Add the new plugin to the
plugin.xmlfile.
- Create both
- adding
-
Compile the CemrgApp to check if the new plugin is in correct format.