Class NoduleData

java.lang.Object
noduledata.imagej.NoduleData

public class NoduleData extends Object
This class manages the segmentation of the image and the saving of the data. Also includes many methods used in testing that are not currently part of the pipeline, but which I kept in case others find it useful or applicable to improving the program.
Author:
Brandin Farris
  • Field Summary

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

    Constructors
    Constructor
    Description
    NoduleData(trainableSegmentation.unsupervised.ColorClustering cluster, int redSingle, int greenSingle, int mixedSingle)
    generate a segmentation map using using a ColorClustering model.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    averageLightness(ij.gui.Roi[] rois)
    calculates the average lightness of all nodules within the image.
    ij.ImagePlus
     
    static ij.ImagePlus
    createImageWithRoi(ij.ImagePlus image, ij.gui.Roi roi)
    returns the given image cropped to the given roi.
    ij.ImagePlus
    Returns an image with the segmented nodule pixels set to white.
    void
    run(String saveFile)
    This is what is called to compute the data for the given image.
    ij.ImagePlus
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BOTTOMA

      protected static final double BOTTOMA
      See Also:
    • BOTTOMB

      protected static final double BOTTOMB
      See Also:
    • TOPCUTOFFSLOPE

      protected static final double TOPCUTOFFSLOPE
      See Also:
    • TOPB

      protected static final double TOPB
      See Also:
    • binarymap

      public ij.ImagePlus binarymap
    • image

      public ij.ImagePlus image
    • numInstances

      public int numInstances
  • Constructor Details

    • NoduleData

      public NoduleData(trainableSegmentation.unsupervised.ColorClustering cluster, int redSingle, int greenSingle, int mixedSingle) throws IllegalStateException
      generate a segmentation map using using a ColorClustering model. Initiates the ColorData objects
      Parameters:
      cluster - : cluster object with a loaded image and .model file.
      redSingle - : the upper bound on how large a red nodule can be before assuming it's a clump
      greenSingle - : same as above but for green nodules.
      mixedSingle - : same as above but for mixed nodules.
      Throws:
      IllegalStateException
  • Method Details

    • createImageWithRoi

      public static ij.ImagePlus createImageWithRoi(ij.ImagePlus image, ij.gui.Roi roi)
      returns the given image cropped to the given roi.
    • averageLightness

      public void averageLightness(ij.gui.Roi[] rois)
      calculates the average lightness of all nodules within the image.
      Parameters:
      rois - : array of nodule rois.
    • imageWithoutNodules

      public ij.ImagePlus imageWithoutNodules()
      Returns an image with the segmented nodule pixels set to white. A use case is to see how much of the nodules are not caught in segmentation.
    • run

      public void run(String saveFile)
      This is what is called to compute the data for the given image.
      Parameters:
      saveFile - : where to store output after execution.
    • Visualize

      public ij.ImagePlus Visualize()
      Returns:
      a graph of pixels plotted R against G with segmenting lines.
    • combinedMap

      public ij.ImagePlus combinedMap()
      Returns:
      map containing all nodules highlighted with their respective color.