vnt

Class Template_Plugin

Implemented Interfaces:
PlugInFilter

public class Template_Plugin
extends VascularNetworkToolkit
implements PlugInFilter

Generic example of how to write a plugin for ImageJ.
Version:
1.0
Author:
Michael Miller - Truman State University
Since:
1.0

Method Summary

void
run(ImageProcessor bp)
This is called if the setup() was successful.
int
setup(String arg, ImagePlus ip)
Specifies the preconditions for the plug-in.

Method Details

run

public void run(ImageProcessor bp)
This is called if the setup() was successful.

Pre: The image was cleared to run by the setup() method.
Post: Something operation is performed.

Parameters:
bp - Required by the interface. The access information to the original image.

setup

public int setup(String arg,
                 ImagePlus ip)
Specifies the preconditions for the plug-in. If this method succeeds then run() is called.

Pre: ImageJ is running and an 8-bit grayscale image is open. The plug-in was just activated.
Post: Either an argument was processed, the image was not saved to a local folder, or the plug-in is cleared to run on the image.

Parameters:
arg - Required by the interface. The argument list passed to the plug-in.
Returns:
If DONE is returned, ImageJ quits without run()'ing the plug-in. Otherwise, the plug-in signals to ImageJ that this plugin only handles 8-bit (256 grayscale) and will not change the original image.