vnt

Class DistanceMap_Outline

Implemented Interfaces:
PlugInFilter

public class DistanceMap_Outline
extends VascularNetworkToolkit
implements PlugInFilter

Generates an approximate outline of the vessels from a distance map skeleton (a skeleton that is grayscale, retaining distance map information along the skeleton).
Version:
1.0
Author:
Michael Miller - Truman State University
Since:
1.0

Method Summary

ImageProcessor
generateOutline(ImageProcessor ip, boolean outline)
Computes the envelope of the Blum medial axis maximal discs.
void
run(ImageProcessor bp)
Receives a distance map skeleton and generates the approximate outline.
int
setup(String arg, ImagePlus ip)
Specifies the preconditions for the plug-in.

Method Details

generateOutline

public ImageProcessor generateOutline(ImageProcessor ip,
                                      boolean outline)
Computes the envelope of the Blum medial axis maximal discs. 1) Draws black circles at every point along the skeleton using the radius of the color of the skeleton. This regenerates the approximation of the segmented image. 2) Draws white circles at every point along the skeleton using the radius-1 of the color of the skeleton. This deletes the inside of the outline.

Pre: The dimensions width and height must have been loaded prior to calling this method. The given ImageProcessor must be for the ridge skeleton and must be valid. Relies on the fact that this is an 8-bit grayscale distance map.
Post: On success, a new image of the outline is drawn. On failure, no change is made.

Parameters:
ip - The Image Processor is required for the original image data.
outline - If true, an outline is generated. If false, a solid image (which will resemble the original segmented image) is drawn.
Returns:
The ImageProcessor for the newly created image representing the thinned distance map ridge trace.

run

public void run(ImageProcessor bp)
Receives a distance map skeleton and generates the approximate outline. 1) Draws black circles at every point of the skeleton. The outline is the envelope of those circles. 2) Draws white circles with radius-1 at every point of the skeleton. The union of all the pixels drawn is the area inside the outline.

Pre: The image was cleared to run by the setup() method.
Post: The image outline is computed and drawn in a new image.

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.