Creating an Image-Pro Premier Add-in
This short tutorial explains how to create an add-in for Image-Pro Premier using Microsoft Visual Studio. An add-in is an extension to Image-Pro Premier, which has full access to the Premier automation APIs (Application Programming Interface) and commands and implements some custom User Interface providing additional functionality to the product. It is similar to an Image-Pro Premier App but is compiled, developed and debugged using one of the versions of Microsoft Visual Studio, the Microsoft Integrated Development Environment (IDE), instead of the Premier Project Workbench. A free version, called Visual Basic Express 2010, can be downloaded on the Microsoft website.
Installing Visual Studio
The first step required to configure a computer to enable the development of such add-ins is to make sure that you have access to a copy of Microsoft Visual Studio 2010, either the free one, or the professional version with support for the VB.NET language.
Mapping the Image-Pro Premier Installation Folder
Once Visual Studio is installed, the next step is to create a X: logical drive to facilitate access to the Image-Pro premier installation directory and its dlls. This operation is performed in a DOS prompt, using the command subst to map the Premier installation folder (e.g. C:\Program Files\Media Cybernetics\Image-Pro Premier 9.1).
Installing the Add-in Template
After the X: drive is created, it is now time to download the attached ZIP file (Image-Pro Premier Add-in.zip) and save it to the Visual Studio Templates folder: My Documents\Visual Studio 2010\Templates\ProjectTemplates. Doing this, will allow us next, to use the Premier add-in template when creating a new project in Visual Studio.
Compiling the Project
Finally it's only a matter of compiling the resulting project, to create our first add-in. Note that you must have write access to the Image-Pro Premier application folder in order to compile successfully to that location which is the default output folder in this project. Once the project is successfully compiled to the X:\ folder, you can restart Image-Pro Premier and it should have a new Samples tab containing a "Sample Tool" button which when clicked will toggle the "Sample Tool" panel, displaying the name of the active document as an example.
At this point you have all the tools needed to build new Image Analysis features, as sophisticated as required, using the Image-Pro Premier commands and APIs, just like you would do with macros and Apps. Add-ins created using this approach will be compatible with all the variants of Image-Pro Premier, as well as the new Image-Pro Insight 9.1 as long as the APIs used are part of Insight.