|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vistech.roi.ROIManager
Creates a number of ROI-related objects required by the QuantAnalyzer application, and facilitates communication between them through events.
Field Summary | |
protected ROI2D |
currentROI
|
protected CompositeCanvas2D |
destCanvas
|
protected PanZoom |
destPanZoom
|
protected java.awt.Color |
drawingColor
|
protected int |
imageHeight
|
protected int |
imageWidth
|
protected int |
maskValue
|
protected ReportPanel |
reportPan
|
protected java.util.Vector |
roiCollection
|
protected ROIContext |
roiContext
|
protected int |
roiCount
|
protected ShapeMarker |
roiMarker
|
protected CompositeCanvas2D |
sourceCanvas
|
protected PanZoom |
sourcePanZoom
|
protected ThresholdAdjPanel |
thAdjuster
|
protected int |
viewerHeight
|
protected int |
viewerWidth
|
Constructor Summary | |
ROIManager()
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is called when an action event is fired by the JTextField in the ThresholdAdjPanel. |
protected void |
createROI(java.awt.Shape shape)
Creates a new ROI2D object for a specified shape, and deposits that ROI on the displayed image. |
javax.swing.JPanel |
createUI(java.awt.image.BufferedImage img)
Creates various objects. |
void |
eraseShapes()
Erases shapes drawn over the source as well as the destination canvas. |
ROI2D |
getCurrentROI()
Returns the current ROI2D object. |
java.awt.Dimension |
getViewerSize()
Returns the dimesnions of the viewer frame. |
void |
reset()
Erases shapes drawn over the source as well as the destination canvas. |
void |
setDrawingColor(java.awt.Color color)
Sets the drawing color of the ROI outline. |
void |
setMaskValue(int value)
Sets the mask value of the current ROI. |
void |
setPanZoom(boolean state)
Turns the pan/zoom feature on or off. |
void |
setShapeType(int mode)
This is a proxy method that sets the current shape type in the roiMarker object. |
void |
shapeDrawn(ShapeEvent e)
This method is called when a shape event is received. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
This method is called when a change eventis fired by the JSlider in the ThresholdAdjPanel. |
protected void |
thresholdROI(int thresh)
Performs the threshold operation on the ROI. |
void |
updateROI(java.awt.Shape shape)
For a specified shape, this method calls appropriate methods to create a new ROI object, and to update inforamtion related to this ROI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int imageWidth
protected int imageHeight
protected int viewerWidth
protected int viewerHeight
protected CompositeCanvas2D sourceCanvas
protected CompositeCanvas2D destCanvas
protected java.util.Vector roiCollection
protected ROIContext roiContext
protected ShapeMarker roiMarker
protected ReportPanel reportPan
protected ROI2D currentROI
protected int roiCount
protected PanZoom destPanZoom
protected PanZoom sourcePanZoom
protected ThresholdAdjPanel thAdjuster
protected java.awt.Color drawingColor
protected int maskValue
Constructor Detail |
public ROIManager()
Method Detail |
public javax.swing.JPanel createUI(java.awt.image.BufferedImage img)
img
- the image, which is needed for creating the ROIContext object.public void shapeDrawn(ShapeEvent e)
shapeDrawn
in interface ShapeEventListener
e
- the shape event state object.public void updateROI(java.awt.Shape shape)
shape
- the ROI shape.protected void createROI(java.awt.Shape shape)
shape
- the ROI shape.public ROI2D getCurrentROI()
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- the ChangeEvent object, which carries the threshold value.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the ActionEvent object, which carries the threshold value.protected void thresholdROI(int thresh)
public void setPanZoom(boolean state)
state
- if true, turns on pan/zoom.public void setShapeType(int mode)
mode
- the shape type, which is one of ShapeMarker.FREEHAND,
ShapeMarker.ELLIPSE, and ShapeMarker.RECTANGLE.public void setDrawingColor(java.awt.Color color)
color
- the drawing color of the ROI outline.public void setMaskValue(int value)
value
- the mask value.public java.awt.Dimension getViewerSize()
public void eraseShapes()
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |