|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vistech.roi.ROI2D
Represents an ROI. Properties in this class represent attributes of the ROI. The properties include shape of the ROI, mask value for thresholding, and statistics of the ROI. Whenever a new shape is set, this class computes the threshold values and statistics. Statistics computed in this class are: minimum, maximumn mean, standard deviation, and area. If your application needs to compute other types of statistics, extend this class. and override relevant methods.
Field Summary | |
protected java.awt.Point[] |
curPoints
|
protected java.awt.Shape |
currentShape
|
protected java.awt.image.BufferedImage |
displayImage
|
protected java.awt.Color |
drawingColor
|
protected java.awt.Color |
fillColor
|
protected int |
maskValue
|
protected java.awt.image.BufferedImage |
origImage
|
protected java.lang.String[] |
roiColNames
|
protected ROIContext |
roiContext
|
protected java.lang.String[][] |
roiData
|
protected int |
roiNumber
|
protected ROIStatistics[] |
roiStats
|
protected int[][] |
stats
|
protected int |
threshold
|
Constructor Summary | |
ROI2D()
|
Method Summary | |
void |
clearMask()
Clear the ROI. |
void |
drawShape(java.awt.Shape shape,
java.awt.Color color)
Draws the ROI shape over the iamge. |
java.lang.String[] |
getColumnNames()
This is a convenient method that returns the names of the statistics that is computed in this class. |
java.awt.Color |
getDrawingColor()
Reurns the color of the ROI outline. |
java.awt.Color |
getFillColor()
Reurns the color of the thresholded pixels. |
int |
getID()
Reurns the identification number of this ROI. |
int |
getMaskValue()
Reurns the mask value. |
ROIContext |
getROIContext()
Gets the roi context property. |
java.awt.Shape |
getShape()
Reurns the shape of the ROI. |
ROIStatistics[] |
getStats()
Returns the statistics values of each sample in an ROIStatistics object. |
java.lang.String[][] |
getStatsAsString()
This is a convenient method that returns the statistics values as text so that they can be immediately displayed on a table. |
int |
getThreshold()
Returns the threshold value. |
void |
setDrawingColor(java.awt.Color color)
Sets the color of the ROI outline. |
void |
setFillColor(java.awt.Color color)
Sets the color of the thresholded pixels. |
void |
setID(int number)
Sets the identification number for this ROI. |
void |
setMask(java.awt.Point[] points,
int maskValue)
Sets the mask value of the thresholded pixels and highlights them. |
void |
setMaskValue(int number)
Sets the mask value. |
void |
setROIContext(ROIContext roiContext)
Sets the roi context property. |
void |
setShape(java.awt.Shape sh)
Sets the shape property. |
void |
setThreshold(int thresh)
Sets the threshold value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.awt.Shape currentShape
protected transient ROIContext roiContext
protected java.lang.String[] roiColNames
protected int[][] stats
protected java.lang.String[][] roiData
protected int roiNumber
protected ROIStatistics[] roiStats
protected int threshold
protected int maskValue
protected transient java.awt.image.BufferedImage origImage
protected transient java.awt.image.BufferedImage displayImage
protected java.awt.Point[] curPoints
protected java.awt.Color drawingColor
protected java.awt.Color fillColor
Constructor Detail |
public ROI2D()
Method Detail |
public void setROIContext(ROIContext roiContext)
roiContext
- the ROI context.public ROIContext getROIContext()
public void setShape(java.awt.Shape sh)
sh
- the ROI shape.public void drawShape(java.awt.Shape shape, java.awt.Color color)
sh
- the ROI shape.color
- the color of the ROI outline.public java.awt.Shape getShape()
public void setID(int number)
number
- the identification number of the ROI.public int getID()
public void setMaskValue(int number)
number
- the value of the mask.public int getMaskValue()
public void setFillColor(java.awt.Color color)
the
- color of the thresholded pixels.public java.awt.Color getFillColor()
public void setDrawingColor(java.awt.Color color)
the
- color of ROI outlne.public java.awt.Color getDrawingColor()
public java.lang.String[] getColumnNames()
public java.lang.String[][] getStatsAsString()
public ROIStatistics[] getStats()
public int getThreshold()
public void setThreshold(int thresh)
thresh
- the threshold value.com.vistech.roi.ROIUtil.
public void setMask(java.awt.Point[] points, int maskValue)
points
- an arry of points within the ROI.maskValue
- the mask value.public void clearMask()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |