-
Notifications
You must be signed in to change notification settings - Fork 287
InVesalius Plugins
InVesalius has Plugin support, but there isn't a version released with this support yet. You have to use the version under development from our github repository https://github.com/invesalius/invesalius3. There is not a documentation about InVesalius plugin development but I have github repository with some plugins https://github.com/tfmoraes/inv_plugin_test1/. But it's basically:
1. Each plugin is inside a folder.
2. You have to use Python to interact with Python and wxPython to draw the interface. You can use other language like C, C++, Rust, Cython but the part that interacts with InVesalius has to be Python.
3. In its folder you have to have a __init__.py
file (usually it's a empty file) because each plugin is a Python module.
4. A plugin.json
file with this content:
{
"name": "Name of the plugin",
"description": "A little description of the plugin",
"enable-startup": false
}
"enable-statup"
can be false
or true
. It indicates if the plugin can be used without a image loaded (if true
) ou not (if false
).
5. a main.py
file. This file must have a load()
function where your plugin will start what is necessary, like create a interface.
6. After the plugin is loaded it can use all function inside the InVesalius. See the repository https://github.com/tfmoraes/inv_plugin_test1/ to use as example.
To see the folder where you have to put your plugin in InVesalius go the menu Plugins -> Open Plugins folder.