Custom Plugins

The architecture of piva is designed with modularity in mind, enabling users to implement their own plugins to perform a wide range of tasks and extend the package’s functionality.

Configuration of the custom written plugins is accomplished through PluginImporter object that must fulfill two requirements:

  • PluginImporter class must be defined in piva_plugin_importer.py module (python file)

  • Path to the piva_plugin_importer.py needs to be added to the $PYTHONPATH of your virtual environment. A simple guide on how to do it on any operating system can be found here.

At the start of each session, piva searches for the piva_plugin_importer module, attempts to import the PluginImporter class, and executes whatever code it contains. This may include new visualization tools, data transformation routines, and more.

The most basic implementation of the PluginImporter and an example CustomWidget, with tips and comments on the implementation, can be downloaded from the links below:

This example creates a simple window (shown below) that can be opened from the menu bar.

Image not found.

User Contributions

Everyone is highly encouraged to share tested, self-written custom widgets with the world by adding it to piva’s source code. This is ideally done directly through github or alternatively by contacting the development team: