210 likes | 336 Views
Plugin Interface. Overview Using Plugins Developing Plugins Basic Examples / Demo Outlook. Plugin Interface - Overview. The plugin interface:
E N D
Plugin Interface • Overview • Using Plugins • Developing Plugins • Basic Examples / Demo • Outlook
Plugin Interface - Overview • The plugin interface: • Opens custom access to internal data during real-time processing including information of ROIs, design matrix, raw data, beta maps and contrast t maps. • Allows to perform additional calculations within the plugin and/or to export data for external processing, e.g. in Matlab. • Provides direct pointers to internal data structures without any "buffering" for maximum efficiency -> high performance but careful programming to avoid crashes • Plugins are coded in C++. Templates and examples are available to simplify creation of own plugins
Using Developed Plugins • Installed plugins appear in the Plugins menu • TBV shows plugins that are located in the "Plugins_32" (32 or "Plugins_64" (32/64-bit TBV on 32/64-bit OS) subfolder within the "TBVExtensions" folder. • New plugins are installed simply by copying the respective library file (extension ".dll" on Windows, ".so" on Linux, ".dylib" on Mac) in that folder
Using Developed Plugins • A plugin is started by clicking its name in the Plugins menu. • A plugin needs to start prior to real-time processing(Plugins menu will not be accessible during incremental processing). • TBV opens and shows the Plugin window containing a Log text field that is used by the plugin to inform the user about ongoing processing. • The messages appearing in the Log fully depend on the plugin code
Using Developed Plugins • When starting real-time processing, the plugin is called during processing of each incremental time step and it can access all relevant internal data of TBV. • The image on the right shows a snapshot during real-time processing; the plugin has just been called at time point "74" and informs the user that it saves 4 beta maps to disk. The plugin also presents extracted information about the content of the used design matrix at each step.
Writing TBV Plugins • Deriving from “TBVPluginInterface”, the parent class with virtual functions
Writing TBV Plugins • Including the TBV API functions
Writing TBV Plugins • Including the TBV API functions
Writing TBV Plugins • Only one header (.h) and one main code (.cpp) file necessary
Writing TBV Plugins • Need to change only plugin name and overwrite few (virtual) functions.
Writing TBV Plugins • Need to change only plugin name and overwrite few (virtual) functions.
Writing TBV Plugins • Need to change only plugin name and overwrite few (virtual) functions.
Outlook • Visualization options- Allow plugin to show calculated maps in “Brain View” window- Provide option for user to switch between “native” visualization (GLM maps) and plugin visualization (but only in case that plugin offers map visualizations). • Allow plugin to turn off calculations in TBV in order to replace them with custom routines (and to save time) Expected release date of TBV 3.0: February 2011