Package noduledata.imagej
Class UserEditsHandler
java.lang.Object
noduledata.imagej.UserEditsHandler
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
ConstructorsConstructorDescriptionUserEditsHandler
(ij.ImagePlus imp, ColorData red, ColorData green, MixedData mixed) constructor method -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
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
-
Constructor Details
-
UserEditsHandler
constructor method- Parameters:
imp
- : image we're doing analyiss on.red
- : red ColorData objectgreen
- : green ColorData objectmixed
- : mixed ColorData object.
-
-
Method Details
-
scaleImage
returns the scaled image icon according to the given newWidth and newHeight -
run
Method that's called to initialize part of the program allowing the user to make manual changes. -
mouseClicked
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 onimp
- image that contains the given roi.- Returns:
- a close up of the given roi
-