This step-by-step breakdown of each of the toolkit's major processes only scratches the surface, but at least it gives a basic overview of the current functionality of the tool. Also the order of the walkthrough implies a suggested strategy for processing and analysis.

Thumbnails are initially presented for faster viewing. You may click on any of the images to see larger versions.

Original 32-Bit Color Image of a Single Well

Original 32-Bit Color Image of a Single Well

Run ImageJ. Now, File > Open... and select your image.

This image was taken at Baer and Cox labs at the Kirksville College of Osteopathic Medicine. This image was one among hundreds. All images were grown with human embilical vein endothelial cells (HUVEC) on a Matrigel assay.

The goal of the research is to inhibit or encourage the growth of vasculature (the dark veins). Essentially, there are many trays of experiments. Each tray contains dozens of individual wells, and images of each well were taken periodically every few hours. This process generated hundreds of images.

Generally this would involve posting several white sheets of paper on a wall and using a projector. A lab technician would use a marker and try to manually color in all the places where they saw vasculature projected. After all the coloring was done, they would meticulously cut out the cellular shapes. Since the weight of the paper was known, they could place the resultant cutouts on a scale and estimate the total area. Researchers are interested in many aspects of these images, not just the area. By hand accurately quantifying one of these images takes about a full day of work. Measuring a single experiment containing hundreds of these images could take years.

The researchers wish to perform dozens of these experiments involving different chemical inhibitors and chemotactic agents. Clearly there must be a better way!

End User Settings Dialogue - Batch Customization

End User Settings Dialogue - Batch Customization

Customize VNT's behavior by Plugins > VNT > Create Settings, which will alter the behavior for all the images in the folder.

Note: Settings files influence all images in the same folder. If you need to treat two images differently, place them in separate folders.

This plugin was created to facilitate the manipulation of batches of images of various sizes, ranging from a few to hundreds or thousands, a settings editor was created. The editor affects all of the toolkits plugins in a variety of ways by generating a settings.txt file which is human readable and editable.

The contents of this settings.txt file are image and plugin specific. The editor's purpose is to make generating these files simple and easy. One file is needed per folder of images. Entire batches of images can be configured and processed in bulk without need of human intervention.

With your settings file created, the image is ready to be batched. To analyze a single image, run Plugins > VNT > Batch File. If you are batching the contents of a single folder, run Plugins > VNT > Batch Folder. If you wish to batch many folders, run Plugins > VNT > Batch Folder Recursively which will perform analysis on the selected folder, as well as any folders inside it.

Note: Files with prefixes separated by underscores will not be batched, as the toolkit will assume these are temporary files.

8-Bit Intensity Grayscale Image

8-Bit Intensity Grayscale Image

RGB images have many dimensions. You must greyscale your image to proceed. One such method is Image > Type > 8-bit. You can also look at red, green, and blue channels separately by Image > Type > RGB Stack, which creates an image stack. To split the stack into different images, Image > Stacks > Convert Stack to Images.

As a prelude to processing, images are converted to grayscale. While arguably this is a lossy operation, a visual comparison between this and the original should reveal that the vasculature is just as identifiable. Since there is one-fourth less information and the human eye has little change in difficulty discerning the dark veins (vasculature), hopefully a computer will have an easier time sifting through the lesser information to find the vasculature.

In practice most classic image analysis is done on grayscale images. It should be noted that we are now working with images where the color channels may be beneficial, and newer algorithms are in the works.

Lighting Correction Surface 3D Surface Visualization

ImageJ Surface Plot of the 8-Bit Image, an example Visualization of the Lighting Correction Surface

The following visualization was created by Plugins > ImageJ's Interactive 3D Surface Plot.

An important step in preprocessing is determining if lighting needs to be regularized. A 3D visualization of the image can be helpful in determining the type of correction, if any, to be performed. Here a surface is visualized which appears to be polynomial.

While it is not used to generate the surface approximation, the visualization here was created using Kai Uwe Barthel's ImageJ's Interactive 3D Surface Plot.

Lighting Correction Result

Light-Corrected Image Result - the surface and original 8-bit are subtracted from eachother and shifted to 127 gray plane

If your lighting surface is irregular, it may benefit from regularization. There are many plugins available to perform this, both built into ImageJ as well as available as plugins. One method built into ImageJ is a rolling ball subtraction, which can be performed by Process > Subtract Background.... If your lighting creates an approximately polynomial surface (as visualized above) try using Plugins > VNT > Lighting Correction.

For VNT's Lighting Correction plugin, an n-th order polynomial surface is fit to the image. Least squares regression is performed to create this fit. The dimensionality of the surface can be specified via user input in the settings file, created above. All data points in the grayscale image over a certain threshold are used in a large matrix which is input in the regression as datapoints.

Points under the threshold are determined to lack enough information to be useful to the fit. Here, the black background is ignored in fitting. This algorithm produces a surface approximation which is subtracted against the grayscale, producing the pictured result.

Lighting correction is an optional operation. Images that have backlighting or good ambient light generally should not use lighting correction (which have flat plateaus and straight dropoffs without gentle sloping), as this step may only damage an already proper image contrast.

Currently the "center" of subtract is grayscale 127. This is largely for contrast. For images with dark features, maximal contrast would be achieved by leveling the image to grayscale 255. However, for images with high variance, maximal contrast is achieved by leveling the image to grayscale 127. New features may be attempted later to extract more information from the image.

Automated Segmentation - Binary Image

Automated Segmentation - Binary Image

The toolkit now has two primary segmentation routines. The one used here is a standard two-segment feature-AND. In detail:

If your object of interest is primarily darker, on your contrast-enhanced greyscale image use Plugins > VNT > Basic Segment to attempt an automated segmentation. This creates multiple thresholds and feature-ANDs them; some of which may be more appropriate than the automated result.

Regarding the plugin Basic Segment, two binary images are extracted from the light corrected image. The first is a conservative threshold generated by the Otsu Thresholding method with code provided by Christopher Mei, Anthony Joshua, and Tony Collins. The second is an aggressive contrast enhancement and threshold generated by ImageJ's Histogram information and the Image Calculator.

The conservative threshold is "grown" into the aggressive by searching the 8-connected neighbors, ie. a Feature-AND operation. Any isolated components that were in the aggresive segmentation are left out, but any features that were partially in the conservative threshold are used in full.

If your object of interest has a higher pixel-neighborhood variance, use Plugins > VNT > FindEdges Segment. This uses variance filters and edge finding routines to select areas of the image with irregular texturing.

The image can be thresholded automatically by ImageJ using Process > Binary > Make Binary. To select the binary range manually, use Image > Adjust > Threshold....

Enclosed Meshes - Binary Image

Enclosed Meshes - Binary Image

Enclosed meshes are areas completely surrounded by segmentation. Essentially, the mesh is the inverted segmented image. To generate mesh information on the segmentation, use Plugins > VNT > Mesh Analysis.

A large segmented area may have areas which are not actually meshes but are missed segmentation. To correct these areas, specify a minimum mesh size in the settings file. "Mesh Analysis" will automatically fill these in your segmented image.

Since meshes must be completely enclosed, some meshes are not ultimately meshes due to lack of complete enclosure, and they "flood fill" to the edge of the image. This is an indication that the original segmented image needs manual correction.

There are no meshes for segmentation above. Although there certainly should be meshes when viewing the original image, because the vasculature is faint at points throughout the mesh boundaries none are actually generated automatically.

Blum Medial Axis - Skeletonization

Blum Medial Axis - Skeletonization

With your binary segmented image active (white should be the background), run Plugins > VNT > DistanceMap Skeleton to generate a skeleton.

The ImageJ Euclidian Distance Map operation, Process > Binary > Distance Map, is performed on the segmented image. The distance map is analyzed and the ridges, the Blum Medial Axis, are selected. Because discrete EDM skeletons can have a thickness of 2, this skeleton is thinned using ImageJ's Process > Binary > Skeletonize.

Currently our ridge detection software cheats by using Process > Binary > Skeletonize on the segmented image. This produces a poor approximation of the true Blum skeleton.

Finding actual computer code that produces all the beautiful theoretical skeletonizations has been an extreme challenge. In discussion on the ImageJ list, nobody was able to produce software, only papers on how to perform correct skeletonization.

I have written an algorithm that performs analysis on 8-neighbor and 24-neighbor regions around each pixel to attempt to determine if it is a ridge. I have also written a Voronoi/Delaunay triangularization routine. Finally, I have written an algorithm that literally draws discrete circles and looks for bitangencies. No algorithm correctly identifies the entire connected ridge, however it is easy to determine that ImageJ's Skeletonize is very lacking.

By incorporating the distance map information into the skeletonization, the process preserves distance information at all points of the segmented image. Theoretically this is bijective and contains the same information as the entire segmentation, despite being just a skeleton.

Here the image contrast has been greatly increased, otherwise the ridges would not be visible. The EDM values are simply too close to white to be visible by a human eye without enhancement.

Outline re-created from Skeletonization

Outline re-created from Skeletonization

With the distance map skeleton as the active image, run Plugins > VNT > DistanceMap Outline to recreate an outline of the segmented image.

The Distance Map Skeleton preserves all information of the original segmented image. Consequently, the envelope of maximal circles (radius == to the distance map value at the ridge point) drawn along the ridge forms the outline.

This is merely a nice double check that our skeletonization process is 1-to-1 back to the segmented image.

Pruned EDM Skeletonization

Pruned EDM Skeletonization

With the distance map skeleton as the active image, run Plugins > VNT > Endpoint Prune to prune short segments. This process can be customized in the Create Settings process.

Branches which terminate (endsegments) are traced and ones below a certain length are deleted. If a proper thresholding length is specified in the settings file, the outline is smoothed and better approximates the biology of the vascular network.

A good thresholding length for pruning should be approximately the average thickness of the object you're measuring. You can use ImageJ's straight line segment to estimate this value.

Warning: One end-user feature that is potentially damaging to results is aggressive pruning. This process will recursively prune child nodes if their EDM value is too small, and ultimately if an isolated island is too small or lacks branches it will be deleted. Consequently, aggressive endsegment pruning can result in information loss for properly quantifying inhibited networks.

Here the image contrast has been greatly increased, otherwise the ridges would not be visible. The EDM values are simply too close to white to be visible by a human eye without enhancement.

Eyecandy - Original Image with Visual Overlays

EyeCandy - Original Image with Visual Overlays

If your original image had a file path that ImageJ has permission to write, all plugins will save files they produce with specific prefixes. After processing and analysis has been completed and all files are generated, you can create a special stacked image with analysis visualizations with Plugins > VNT > Eye Candy. This can be done manually by using the original image and using Edit > Paste Control... > Transparent.

At this point we've already gathered a lot of information about our image. Pictured is one of the many sample images from the "Eye Candy" plugin, which helps in visualization of the quantification process. If the tool is performing bad segmentation or skeletonization, the visualization is openly apparent!

Information at this point is easily extracted from the image, including but not limited to: vascular network length, enclosed mesh areas, vessel-to-background area ratio, average vessel thickness, etc.

But we can do even better than this!

Graph Theoretic Analysis of Skeleton

Graph Theoretic Analysis

With the pruned distance map skeleton as the active image, run Plugins > VNT > Node Analysis to perform graph modeling of the skeleton.

By parsing the skeleton along its pixels with simple rules, we can construct a graph.

  1. If a node has only 1 neighbor in it's 8-neighborhood, then it is a child node (end point).
  2. If a node has 3 or more neighbors in it's 8-neighborhood, then it is a branch node (branch point).
  3. Tracing along a connection can reveal which two nodes are connected.

So in other words, branch points and end points are labeled, and their radius is represented by the EDM skeleton information. Adjacency information is traced to form symmetric connections, and overlapping nodes are merged to better approximate the biology.

Topological information is analyzed to measure the reliability and connectedness of the vascular network formed.

Results Tabulation for Statistical Analysis

Results Generation

After running the "Node Analysis" plugin, a new line will be appended to the Results window (it will appear if there are no other results open).

After all this work, we record it in many convenient ways. ImageJ offers the Results Table, and all the information is output there. Also all information is saved into a text file for easy importing into any tab-diliminated spreadsheet for statistical analysis.

The output to the Results Table and the text file are nearly identical, and it includes every property we were able to calculate about the image quantitatively and topologically.

The unit for this batch was "pixels" which is contrary to the image for the user settings above. Whatever is given in the User Settings will display here correctly. Measurements are also adjusted accordingly.

Note: Thickness is a radius from the center of the skeleton, so perhaps this value should be doubled to represent the "diameter"?

Website and Vascular Network Toolkit for ImageJ are Copyright 2005 - 2012. VNT for ImageJ is an open source toolkit released under the GNU General Public License.