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_generator
and cd
into the selected folder cemrg_plugin_generator
, add the folder to the PYTHONPATH
:
export PYTHONPATH=$PYTHONPATH:$PWD
The 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
Plugin
folder in CemrgApp. But before doing this, it is advisory to create a new branch calledplugin/atrailstrainmotion
from thedevelopment
branch, 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: ON
inPluginList.cmake
underPlugins
folder - The following instructions are done inside the
Plugins/kcl.cemrgapp.mainapp
folder. You can follow the way previous plugins have been added.- Create both
.h
and.cpp
files in theperspectives
folder. SoQmitkCemrgAtrialStrainMotion.h
, andQmitkCemrgAtrialStrainMotion.cpp
- Change the
kcl_cemrgapp_mainapp_Activator.cpp
to include the newQmitkCemrgAtrialStrainMotion
files. - Add the new
QmitkCemrgAtrialStrainMotion
files to thefiles.cmake
- Add the new plugin to the
plugin.xml
file.
- Create both
- adding
-
Compile the CemrgApp to check if the new plugin is in correct format.