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:
PluginImporterclass must be defined inpiva_plugin_importer.pymodule (python file)Path to the
piva_plugin_importer.pyneeds to be added to the$PYTHONPATHof 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.
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: