Skip to content

Plugins: 01 Tutorial (Windows)

Kaspar Schmid edited this page Nov 6, 2015 · 8 revisions

1. Generate plugin files

Before starting, make sure that the paths to /plugin_development/ and /plugins/ are set correctly and are writable (File -> Settings)

Then select Tools -> Generate Plugin Code


Fill out the form and click [Generate]


Your freshly genereted plugin will automatically open in Windows Explorer


2. Write your plugin

Open either the .pro (QtCreator) or .vcjproj (Visual Studio) project file. A plugin project contains the following files:

  • plugin.cpp registers your algorithm to the plugin
  • PluginName.h header and meta information of your algorithm
  • PluginName.cpp implementation of your algorithm

The structure of your plugin implementation file is as follows:

#include "PluginName.h"

void PluginName::init()
{
	<CODE FOR INITIALIZING THE PLUGIN PROCESS>
}

void PluginName::destroy()
{
	<CODE FOR DEINITIALIZING THE PLUGIN PROCESS>
}

bool PluginName::processInputData(IPLImage*, int, bool)
{
	<YOUR IMAGE PROCESSING ALGORITHM>
}

IPLData* PluginName::getResultData(int)
{
	<RETURNING YOUR RESULT>
}

For details on how to implement those methods see:


3. Use your plugin in ImagePlay

When compiling, your plugin is automatically copied to /plugins/PluginName.dll.

In the "Plugin" category of the process library, choose [Reload Plugins].

Warning: reloading of plugins can still be unstable, make sure to save your progress regularly...