-
Notifications
You must be signed in to change notification settings - Fork 126
Plugins: 01 Tutorial (Windows)
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
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:
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...