Package noduledata.imagej
Class MixedData
java.lang.Object
noduledata.imagej.ColorData
noduledata.imagej.MixedData
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
-
Field Summary
Fields inherited from class noduledata.imagej.ColorData
COLOR, image, numNodules
-
Constructor Summary
ConstructorsConstructorDescriptionMixedData
(ij.plugin.frame.RoiManager manager, int[] color, int colorThreshold, ij.ImagePlus im) Uses the ColorData constructor method. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRoi
(ij.gui.ShapeRoi roi) public method for appending new roi to end of the array.void
drawRoi
(ij.gui.ShapeRoi roi) shows the given roi as a white blob overlaying the original image.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.int[][]
indices of clumped nodules. clumped[mixedRoiIndex][0/1] where 0 == red, 1 == greenint
getPixelArea
(int index, String color) returns the number of pixels of the chosen color for the nodule at the given index.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.roiPixelCount
(int index) returns the counts of red and green pixels of the mixed nodule roi at the given index.void
setClumped
(int[][] clumped) public setter method for clumped nodules array.void
setRoi
(int index, ij.gui.ShapeRoi roi) public method for setting roi at given index.Methods inherited from class noduledata.imagej.ColorData
averageArea, convertToBinary, createImageWithRoi, fillRect, getArea, getCircularity, getClump, getClumps, getData, getIndex, getMap, getPixels, getRoi, getRois, getTable, removeArrayOfRois, removeRoots, saveTable, setMap, setPixels, setRois, setTable, showAnnotatedMap, showMap, VisualizeRoi
-
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 areaim
- : image we're doing analysis on.
-
-
Method Details
-
getPixelArea
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. -
addRoi
public void addRoi(ij.gui.ShapeRoi roi) public method for appending new roi to end of the array. -
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. -
findMixedNodules
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
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
-
-