vnt

Class Eye_Candy

Implemented Interfaces:
PlugInFilter

public class Eye_Candy
extends VascularNetworkToolkit
implements PlugInFilter

A simple class that opens the original color image and overlays graphics generated by the Vascular Network Toolkit.
Version:
1.0
Author:
Michael Miller - Truman State University
Since:
1.0

Method Summary

boolean
drawBlendedSegmentationOverlay(ImageProcessor nip, int color)
Opens the original image and it's segmented image, and generates a new image with the segmentation blended in a particular color over the original.
boolean
drawGraphOverlay(ImageProcessor nip, int color)
Opens the simplified graph representation, and generates a new image with the graph overlayed in a particular color over the original.
boolean
drawLightingCorrectionSurface(ImageProcessor nip)
Draws the lighting correction surface into the given ImageProcessor.
boolean
drawMergedGraphOverlay(ImageProcessor nip, int color)
Opens the merged graph representation, and generates a new image with the graph overlayed in a particular color over the original.
boolean
drawNodeOverlay(ImageProcessor nip, int color)
Opens the node overlay, and generates a new image with the nodes overlayed in a particular color over the original.
boolean
drawOriginalImage(ImageProcessor nip)
Draws the original image into the given ImageProcessor.
boolean
drawOutlineOverlay(ImageProcessor nip, int color)
Opens the EDM outline, and generates a new image with the EDM generated outline overlayed in a particular color over the original.
boolean
drawOutlineSkeletonOverlay(ImageProcessor nip, int colorOutline, int colorSkeleton)
Opens the EDM outline, and generates a new image with the EDM generated outline overlayed in a particular color over the original.
boolean
drawPrunedSkeletonOverlay(ImageProcessor nip, int color)
Opens the EDM pruned skeleton, and generates a new image with the skeleton overlayed in a particular color over the original.
boolean
drawSegmentedOverlay(ImageProcessor nip, int color)
Opens the segmentation, and generates a new image with the segmented drawn solid overlayed in a particular color over the original.
boolean
drawSkeletonNodeOverlay(ImageProcessor nip, int skeletonColor, int nodeColor)
Opens the node and skeleton overlays, and generates a new image with the nodes and skeleton overlayed in a particular color over the original.
boolean
drawSkeletonOverlay(ImageProcessor nip, int color)
Opens the EDM skeleton, and generates a new image with the skeleton overlayed in a particular color over the original.
private boolean
loadOriginalImage()
Opens the original image and loads it into memory for access by all the display methods in this class.
void
run(ImageProcessor bp)
Receives a binary image (specifically a thinned, pruned distance map skeletonization) and computes information regarding the topological properties of the image.
int
setup(String arg, ImagePlus ip)
Specifies the preconditions for the plug-in.

Method Details

drawBlendedSegmentationOverlay

public boolean drawBlendedSegmentationOverlay(ImageProcessor nip,
                                              int color)
Opens the original image and it's segmented image, and generates a new image with the segmentation blended in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the blue channel.
Returns:
Returns true on successful draw. False otherwise.
See Also:
Eye_Candy

drawGraphOverlay

public boolean drawGraphOverlay(ImageProcessor nip,
                                int color)
Opens the simplified graph representation, and generates a new image with the graph overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawLightingCorrectionSurface

public boolean drawLightingCorrectionSurface(ImageProcessor nip)
Draws the lighting correction surface into the given ImageProcessor.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new stack should be created of the original color image.

Parameters:
nip - The ImageProcessor that will be drawn on.
Returns:
Returns true on successful draw. False otherwise.

drawMergedGraphOverlay

public boolean drawMergedGraphOverlay(ImageProcessor nip,
                                      int color)
Opens the merged graph representation, and generates a new image with the graph overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawNodeOverlay

public boolean drawNodeOverlay(ImageProcessor nip,
                               int color)
Opens the node overlay, and generates a new image with the nodes overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawOriginalImage

public boolean drawOriginalImage(ImageProcessor nip)
Draws the original image into the given ImageProcessor.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new stack should be created of the original color image.

Parameters:
nip - The ImageProcessor that will be drawn on.
Returns:
Returns true on successful draw. False otherwise.

drawOutlineOverlay

public boolean drawOutlineOverlay(ImageProcessor nip,
                                  int color)
Opens the EDM outline, and generates a new image with the EDM generated outline overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawOutlineSkeletonOverlay

public boolean drawOutlineSkeletonOverlay(ImageProcessor nip,
                                          int colorOutline,
                                          int colorSkeleton)
Opens the EDM outline, and generates a new image with the EDM generated outline overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
Returns:
Returns true on successful draw. False otherwise.

drawPrunedSkeletonOverlay

public boolean drawPrunedSkeletonOverlay(ImageProcessor nip,
                                         int color)
Opens the EDM pruned skeleton, and generates a new image with the skeleton overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawSegmentedOverlay

public boolean drawSegmentedOverlay(ImageProcessor nip,
                                    int color)
Opens the segmentation, and generates a new image with the segmented drawn solid overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawSkeletonNodeOverlay

public boolean drawSkeletonNodeOverlay(ImageProcessor nip,
                                       int skeletonColor,
                                       int nodeColor)
Opens the node and skeleton overlays, and generates a new image with the nodes and skeleton overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
skeletonColor - The 32-bit color to draw the skeleton overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
nodeColor - The 32-bit color to draw the node overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

drawSkeletonOverlay

public boolean drawSkeletonOverlay(ImageProcessor nip,
                                   int color)
Opens the EDM skeleton, and generates a new image with the skeleton overlayed in a particular color over the original.

Pre: This class was setup appropriately with an image from the processed set of images.
Post: A new image should be created the original color image with a graphical overlay.

Parameters:
color - The 32-bit color to draw the overlay. 0xAABBCCDD where AA is the alpha, BB is the red channel, CC is the green channel, and DD is the green channel.
Returns:
Returns true on successful draw. False otherwise.

loadOriginalImage

private boolean loadOriginalImage()
Opens the original image and loads it into memory for access by all the display methods in this class.

Pre: This class was setup appropriately with an image from the processed set of images. Ie: File information exists.
Post: The original image will be loaded into local memory.

Returns:
Returns true on successful load. False otherwise.

run

public void run(ImageProcessor bp)
Receives a binary image (specifically a thinned, pruned distance map skeletonization) and computes information regarding the topological properties of the image. 1) Parses the image for possible node locations. 2) Accesses the distance map to calculate node radii information. 3) Simplifies the structures by testing for node overlap. 4) Performs graph theoretic analysis based on the information generated.

Pre: The image was cleared to run by the setup() method.
Post: Quantitative data is finally extracted from the 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.