Package noduledistances.imagej
Class NoduleDistances
java.lang.Object
noduledistances.imagej.NoduleDistances
- All Implemented Interfaces:
Runnable,org.scijava.command.Command,org.scijava.plugin.SciJavaPlugin
- Author:
- Brandin Farris
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ij.ImagePlusstatic intstatic intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ij.ImagePlusblackenOutsideRectangle(ij.ImagePlus image) Method that asks the user to draw a rectangle around the part of the image containing the root system to remove any noise outside the root system.static List<int[]>findPairs(int num, int numIters) Finds random sets of pairs of nodules.static voidThis main function serves for development purposes.ij.ImagePluspreprocessing(ij.ImagePlus imp) increases brightness and contrast in the image to improve segmentation of root system.voidrun()voidsaveRandomPaths(RootGraph graph, GraphOverlay graphOverlay, String saveFile, String title) Saves a set of images that are random computed shortest paths between the nodule nodes.ij.ImagePlusshortestPath(int startNodeIndex, int endNodeIndex, RootGraph graph, GraphOverlay graphOverlay) Generates an image showing the shortest 5 paths between the two given nodes by \ coloring the paths taken 5 distinct colors
-
Field Details
-
image
public static ij.ImagePlus image -
SCALEFACTOR
public static final int SCALEFACTOR- See Also:
-
initialWidth
public static int initialWidth -
initialHeight
public static int initialHeight
-
-
Constructor Details
-
NoduleDistances
public NoduleDistances()
-
-
Method Details
-
shortestPath
public ij.ImagePlus shortestPath(int startNodeIndex, int endNodeIndex, RootGraph graph, GraphOverlay graphOverlay) Generates an image showing the shortest 5 paths between the two given nodes by \ coloring the paths taken 5 distinct colors- Parameters:
startNodeIndex- : start node of the paths we're highlighting.endNodeIndex- : end node of the paths we're highlighting.graph- : graph object of the root system.graphOverlay- : Image of the root system with the graph object overlayed.
-
preprocessing
public ij.ImagePlus preprocessing(ij.ImagePlus imp) increases brightness and contrast in the image to improve segmentation of root system.- Parameters:
imp- : image of the root system.- Returns:
- preprocessed image
-
blackenOutsideRectangle
public static ij.ImagePlus blackenOutsideRectangle(ij.ImagePlus image) Method that asks the user to draw a rectangle around the part of the image containing the root system to remove any noise outside the root system. This greatly improves the root segmentation process.- Parameters:
image- : image of the root system.- Returns:
- : image with everything outside of the user-provided rectangle is black.
-
findPairs
Finds random sets of pairs of nodules.- Parameters:
num- : number of nodules in the image.numIters- : the number of pairs to create.- Returns:
- : numIters pairs of nodules, randomly generated.
-
saveRandomPaths
public void saveRandomPaths(RootGraph graph, GraphOverlay graphOverlay, String saveFile, String title) Saves a set of images that are random computed shortest paths between the nodule nodes.- Parameters:
graph- : object that contains all of the graph information.graphOverlay- : Object that is used to overlay the graph onto the root system for visual purposes.saveFile- : user-specified location for saving the output of the plugin.title- : what you want to name the images generated by this method.
-
run
public void run() -
main
This main function serves for development purposes. It allows you to run the plugin immediately out of your integrated development environment (IDE).- Parameters:
args- whatever, it's ignored- Throws:
Exception
-