Class UserEditsHandler

java.lang.Object
noduledata.imagej.UserEditsHandler

public class UserEditsHandler extends Object
This class was created to allow the user to make manual adjustments to the programs segmentation and outlines of the nodules. It shows the image and allows the user to click on any of the nodules and make adjustments before saving the output.
Author:
Brandin Farris
  • Constructor Summary

    Constructors
    Constructor
    Description
    UserEditsHandler(ij.ImagePlus imp, ColorData red, ColorData green, MixedData mixed)
    constructor method
  • Method Summary

    Modifier and Type
    Method
    Description
    static ij.ImagePlus
    getImageFromRoi(ij.gui.ShapeRoi roi, ij.ImagePlus imp)
    Creates a zoomed in image of the given nodule.
    protected void
    mouseClicked(Point p1, double scaleRatio, ij.ImagePlus animp)
    Handles when the user clicks anywhere on the GUI.
    Checks if the user clicked on any nodule on the image, and if so, calls a sub menu to allow user to edit that nodule.
    void
    run(String saveFile)
    Method that's called to initialize part of the program allowing the user to make manual changes.
    scaleImage(ImageIcon imp, int newWidth, int newHeight)
    returns the scaled image icon according to the given newWidth and newHeight

    Methods inherited from class java.lang.Object

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

    • UserEditsHandler

      public UserEditsHandler(ij.ImagePlus imp, ColorData red, ColorData green, MixedData mixed)
      constructor method
      Parameters:
      imp - : image we're doing analyiss on.
      red - : red ColorData object
      green - : green ColorData object
      mixed - : mixed ColorData object.
  • Method Details

    • scaleImage

      public ImageIcon scaleImage(ImageIcon imp, int newWidth, int newHeight)
      returns the scaled image icon according to the given newWidth and newHeight
    • run

      public void run(String saveFile)
      Method that's called to initialize part of the program allowing the user to make manual changes.
    • mouseClicked

      protected void mouseClicked(Point p1, double scaleRatio, ij.ImagePlus animp)
      Handles when the user clicks anywhere on the GUI.
      Checks if the user clicked on any nodule on the image, and if so, calls a sub menu to allow user to edit that nodule.
      Parameters:
      p1 - : pixel location clicked.
      scaleRatio - : ratio for converting between screen location and image location.
      animp - : image we're doing analysis on.
    • getImageFromRoi

      public static ij.ImagePlus getImageFromRoi(ij.gui.ShapeRoi roi, ij.ImagePlus imp)
      Creates a zoomed in image of the given nodule. Used for display purposes.
      Parameters:
      roi - Given Roi to zoom in on
      imp - image that contains the given roi.
      Returns:
      a close up of the given roi