Package noduledata.imagej
Class NoduleData
java.lang.Object
noduledata.imagej.NoduleData
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
FieldsModifier and TypeFieldDescriptionij.ImagePlus
protected static final double
protected static final double
ij.ImagePlus
int
protected static final double
protected static final double
-
Constructor Summary
ConstructorsConstructorDescriptionNoduleData
(trainableSegmentation.unsupervised.ColorClustering cluster, int redSingle, int greenSingle, int mixedSingle) generate a segmentation map using using a ColorClustering model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
This is what is called to compute the data for the given image.ij.ImagePlus
-
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 clumpgreenSingle
- : 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
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.
-