Class MixedData

java.lang.Object
noduledata.imagej.ColorData
noduledata.imagej.MixedData

public class MixedData extends ColorData
This class handles mixed nodules specifically, as they're approached differently than the other nodules. I identify mixed nodules by looking for yellow pixels in the segmented binary map. This works because the images we took of the root system were more zoomed out, and may not work for more high definition images, as mixed nodules themselves are not always yellow, and are often green and red next to each other.
Author:
Indefiables
  • Constructor Details

    • MixedData

      public MixedData(ij.plugin.frame.RoiManager manager, int[] color, int colorThreshold, ij.ImagePlus im)
      Uses the ColorData constructor method.
      Parameters:
      manager - : RoiManager object.
      color - : rgb of the nodule type.
      colorThreshold - : pixel threshold for a singular noduel area
      im - : image we're doing analysis on.
  • Method Details

    • getPixelArea

      public int getPixelArea(int index, String color)
      returns the number of pixels of the chosen color for the nodule at the given index.
    • setRoi

      public void setRoi(int index, ij.gui.ShapeRoi roi)
      public method for setting roi at given index.
      Overrides:
      setRoi in class ColorData
    • addRoi

      public void addRoi(ij.gui.ShapeRoi roi)
      public method for appending new roi to end of the array.
      Overrides:
      addRoi in class ColorData
    • removeRoi

      public boolean removeRoi(ij.gui.ShapeRoi roi)
      Attempts to find the given roi in the array of roi's, and removes it if it's present. Returns true if the removal was succesful, false if the roi wasn't found.
      Overrides:
      removeRoi in class ColorData
      Parameters:
      roi - removes the given ROI from list of rois.
    • findMixedNodules

      public void findMixedNodules(ij.ImagePlus im, ColorData red, ColorData green)
      Identifies mixed nodules by checking for yellow pixels or by calculating the distance between red and green rois.
    • drawRoi

      public void drawRoi(ij.gui.ShapeRoi roi)
      shows the given roi as a white blob overlaying the original image.
      Parameters:
      roi -
    • roiPixelCount

      public String roiPixelCount(int index)
      returns the counts of red and green pixels of the mixed nodule roi at the given index.
    • getClumped

      public int[][] getClumped()
      indices of clumped nodules. clumped[mixedRoiIndex][0/1] where 0 == red, 1 == green
    • setClumped

      public void setClumped(int[][] clumped)
      public setter method for clumped nodules array.
      Parameters:
      clumped -