Plugins

Making NDIToolbox do more

NDIToolbox supports the execution of plugins, additional bits of code that can be loaded to extend its functionality. Here we'll discuss what a plugin is and how to use one.

What Is A Plugin?

In a nutshell, a plugin is an extra bit of software that's designed to work with NDIToolbox and extend its functionality. For the most part, plugins in NDIToolbox tend to be small programs - they usually do one thing and one thing only, and they usually do not have a separate user interface. The idea is to have a simple program that receives NDE data and configuration info; performs some sort of function on the data; then returns the results. NDIToolbox worries about the details of how to read data and present it to the user.

If you're an end user, you can add plugins to your NDIToolbox installation to make the program work for your needs. If you're more of a developer, you can create your own plugins and share them with others.

Plugins For The End User

Installation

All NDIToolbox plugins must be installed under your plugins folder, which is a subfolder of your NDIToolbox local files folder. Remember from the Quick Start guide that this folder will be under your $HOME folder (e.g. c:\users\chris in Windows 7 or /home/chris under Linux).

Although you can copy a plugin directly to this folder manually, we recommend using NDIToolbox to install your plugins since NDIToolbox will ensure that the plugin is properly structured. From any Plot window, select Plugins from the Tools menu. If you already have a copy of the plugin as a ZIP archive, choose Install Plugin... and select the ZIP to install. The Install Plugin window will pop up, from which you can get more information about the plugin by pressing the About Plugin... button.

If the ZIP archive has been password-protected, make sure the Protected check box is checked and provide the password you were given by the plugin's author. When ready to install, click OK to proceed. NDIToolbox will unpack the ZIP archive and install the plugin in your local files folder. If the plugin doesn't seem to be a proper NDIToolbox plugin, NDIToolbox will abort installation and notify you of the situation.

NDIToolbox can also automatically download and install plugins, for example if you're installing a commercial plugin. The installation procedure is nearly the same as for installing a plugin you've already got locally, but from the Tools menu select Download Plugin... and fill in the Install Plugin window that appears. Among other things, you'll need the full URL to the plugin; if the server hosting the plugin download requires a login you can specify a username and password in this window as well. As is the case with installing a local plugin, if the plugin archive is password-protected you should enter the password in this window.

Running A Plugin

Once a plugin has been successfully installed, you can run it simply by selecting it from the list of plugins. Under the Tools menu, select the Plugins submenu, then click the name of the plugin you wish to execute.

If a plugin requires extra information from you before executing, it will open a new window asking for the input. For example, NDIToolbox includes a median filter plugin that when run asks you to specify the rank (also known as the window length or kernel size) of the filter as shown below. In this example, the user is instructing the median filter plugin to run a filter of rank 3 on the data.

When a plugin is run, NDIToolbox passes it a copy of the current data set displayed in the plot window. The plugin performs its function on this data and returns it to NDIToolbox, which then updates the plot window with the results. Going back to the median filter plugin, here's an example of the results of applying this plugin against an ultrasonic C-scan. The image on the left is the original C-scan image plot; on the right is the resulting C-scan after a median filter of rank 5 has been applied.

Since NDIToolbox keeps a copy of the original data, you can always reverse any changes a plugin makes to your data by selecting Revert To Original from the plot window's Operations menu. The original data will be reloaded and the changes made by the plugin will be discarded.

Tips For Running Plugins