Class NoduleDistances

java.lang.Object
noduledistances.imagej.NoduleDistances
All Implemented Interfaces:
Runnable, org.scijava.command.Command, org.scijava.plugin.SciJavaPlugin

public class NoduleDistances extends Object implements org.scijava.command.Command
Author:
Brandin Farris
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static ij.ImagePlus
     
    static int
     
    static int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    static List<int[]>
    findPairs(int num, int numIters)
    Finds random sets of pairs of nodules.
    static void
    main(String... args)
    This main function serves for development purposes.
    ij.ImagePlus
    preprocessing(ij.ImagePlus imp)
    increases brightness and contrast in the image to improve segmentation of root system.
    void
    run()
     
    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.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static List<int[]> findPairs(int num, int numIters)
      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()
      Specified by:
      run in interface Runnable
    • main

      public static void main(String... args) throws Exception
      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