public interface IDrawingLayer extends IDrawingLayerSupport
| Modifier and Type | Field and Description |
|---|---|
static Integer |
ACTIVE_FRONT_LAYER
This constant defines the layer where the topmost component goes.
|
static Integer |
DEFAULT_IMAGE_LAYER
This constant defines the default position of the image layer.
|
static Color |
DEFAULT_LAYER_COLOR
The standard color for a new layer.
|
static String |
DEFAULT_LAYER_COLOR_NAME
The variable name of the default layer color.
|
static BasicStroke |
DEFAULT_LAYER_STROKE
The standard stroke of the layer.
|
static String |
DEFAULT_LAYER_STROKE_NAME
The variable name of the default layer stroke.
|
static Integer |
DRAGGING_LAYER
The dragging layer in this layer, where the mouse dragged gestures are
drawn.
|
static Color |
HIGHLIGHT_COLOR
The color for highlighting a ROI shape on the layer.
|
static String |
HIGHLIGHT_COLOR_NAME
The variable name of the highlight layer color.
|
static BasicStroke |
HIGHLIGHT_STROKE
The standard stroke for highlighting a shape on the layer.
|
static String |
HIGHLIGHT_STROKE_NAME
The variable name of the stroke for highlighting a shape.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllDefaultListeners()
Adds all default listeners.
|
void |
addDefaultCanvasMover()
(Re-)Adds the default key listener.
|
void |
fireNewProperties(javax.media.jai.ROIShape roi)
This method updates the additional information in the
ImageInfoPanel according to the given ROIShape. |
List<javax.media.jai.ROIShape> |
getAllROIShapes()
Get the list of all
ROIShapes in this layer. |
ArrayList<AngleROI> |
getAngleROIs()
Get all
AngleROIs drawn in this layer. |
GeneralPath |
getAngleShape()
A helper variable used by mouse event handlers to draw
AngleROIs. |
javax.media.jai.ROIShape |
getClickedROIShape()
Get the previously clicked
ROIShape. |
AngleROI |
getCurrentAngleROI()
Get the current
AngleROI in this layer. |
EllipseROI |
getCurrentEllipseROI()
Get the current
EllipseROI in this layer. |
FreehandROI |
getCurrentFreehandROI()
Get the current
FreehandROI in this layer. |
LineROI |
getCurrentLineROI()
Get the current
LineROI in this layer. |
PointROI |
getCurrentPointROI()
Get the current
PointROI in this layer. |
PolygonROI |
getCurrentPolygonROI()
Get the current
PolygonROI in this layer. |
RectangleROI |
getCurrentRectangleROI()
Get the current
RectangleROI in this layer. |
javax.media.jai.ROIShape |
getCurrentROIShape()
Get the currently selected
ROIShape. |
ROILayerCursorChanger |
getCursorChanger() |
Color |
getDefaultLayerColor() |
BasicStroke |
getDefaultROIStroke() |
int |
getElementCount()
Gets the total amount of elements in this layer.
|
ArrayList<EllipseROI> |
getEllipseROIs()
Get all
EllipseROIs in this layer. |
ArrayList<FreehandROI> |
getFreehandROIs()
Get all drawn
FreehandROIs in this layer. |
GeneralPath |
getFreehandShape()
Gets the path of the latest drawn shape.
|
Color |
getHighlightColor() |
BasicStroke |
getHighlightStroke() |
UUID |
getID()
Gets the unique ID of this drawing layer.
|
Color |
getLayerColor()
Get the color for ROIs on this layer.
|
Color |
getLineROIBoundaryColor() |
Color |
getLineROIBoundaryRectangleColor() |
ArrayList<LineROI> |
getLineROIs()
Get all
LineROIs in this layer. |
String |
getName()
Get the name of the layer.
|
int |
getNumAnglePoints()
A helper variable used by mouse event handlers to draw
AngleROIs. |
int |
getNumPolyPoints()
Gets the number of corners of the currently drawn
PolygonROI. |
ArrayList<PointROI> |
getPointROIs()
Get all
PointROIs in this layer. |
ArrayList<PolygonROI> |
getPolygonROIs()
Get all drawn
PolygonROIs in this layer. |
GeneralPath |
getPolygonShape()
Gets the shape of the latest
PolygonROI. |
ArrayList<RectangleROI> |
getRectangleROIs()
Get all
RectangleROIs in this layer. |
Color |
getRoiBoundaryRectangleColor() |
javax.media.jai.ROIShape |
getRoiShapeForHighlighting() |
int |
getRoiShiftX0()
Get the x-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
int |
getRoiShiftY0()
Get the y-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
int |
getRoiX0()
Get the x-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
int |
getRoiY0()
Get the y-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
javax.media.jai.ROIShape |
getTmpROIShape()
Gets the temporary ROI shape to be drawn additionally to all present
ones.
|
int |
getZOrder()
The order of the layer in z-direction.
|
boolean |
hasROIs()
Determines whether or not the layer contains any ROI shapes.
|
boolean |
isEmpty()
Determines whether or not the layer is empty.
|
boolean |
isInsidePtEast()
Determines whether or not the mouse is inside of the east boundary point.
|
boolean |
isInsidePtNorth()
Determines whether or not the mouse is inside of the north boundary
point.
|
boolean |
isInsidePtNorthEast()
Determines whether or not the mouse is inside of the north-east boundary
point.
|
boolean |
isInsidePtNorthWest()
Determines whether or not the mouse is inside of the north-west boundary
point.
|
boolean |
isInsidePtSouth()
Determines whether or not the mouse is inside of the south boundary
point.
|
boolean |
isInsidePtSouthEast()
Determines whether or not the mouse is inside of the south-east boundary
point.
|
boolean |
isInsidePtSouthWest()
Determines whether or not the mouse is inside of the south-west boundary
point.
|
boolean |
isInsidePtWest()
Determines whether or not the mouse is inside of the west boundary point.
|
boolean |
isInsideRoi()
Determines whether or not the mouse is inside of a drawn shape.
|
boolean |
isLayerVisible()
A flag whether or not the layer is visible in the canvas.
|
boolean |
isROIDragging()
Get a flag determining whether or not a ROI is currently being dragged by
mouse gesture.
|
boolean |
isSelected()
Get the selection state of this layer.
|
void |
removeAllDefaultListeners()
Removes all default listeners.
|
void |
removeDefaultCanvasMover()
Removes the default key layer listener.
|
void |
removeRoiShapeForHighlighting() |
void |
removeTmpROIShape() |
void |
setAllROIShapes(List<javax.media.jai.ROIShape> shapes)
Sets all ROI shapes in this layer.
|
void |
setAngleROIs(ArrayList<AngleROI> angleROIs)
Set all
AngleROIs in this layer. |
void |
setAngleShape(GeneralPath angleShape)
A helper variable used by mouse event handlers to draw
AngleROIs. |
void |
setBoundEditableRectangles(javax.media.jai.ROIShape[] rs) |
void |
setBoundEditableRectanglesUntransformed(javax.media.jai.ROIShape[] boundEditableRectanglesUntransformed) |
void |
setClickedROIShape(javax.media.jai.ROIShape clickedROIShape)
Set the currently clicked
ROIShape. |
void |
setCurrentAngleROI(AngleROI currentAngleROI)
Set the current
AngleROI in this layer. |
void |
setCurrentEllipseROI(EllipseROI currentEllipseROI)
Set the current
EllipseROI in this layer. |
void |
setCurrentFreehandROI(FreehandROI currentFreehandROI)
Set the current
FreehandROI. |
void |
setCurrentLineROI(LineROI currentLineROI)
Set the current
LineROI in this layer. |
void |
setCurrentPointROI(PointROI currentPointROI)
Set the current
PointROI in this layer. |
void |
setCurrentPolygonROI(PolygonROI currentPolygonROI)
Set the current
PolygonROI. |
void |
setCurrentRectangleROI(RectangleROI currentRectangleROI)
Set the current
RectangleROI in this layer. |
void |
setCurrentROIShape(javax.media.jai.ROIShape shape)
Set the currently selected (active)
ROIShape. |
void |
setCursor(Cursor cursor)
Sets a
Cursor to this layer. |
void |
setDefaultLayerColor(Color defaultLayerColor) |
void |
setDefaultROIStroke(BasicStroke defaultROIStroke) |
void |
setEllipseROIs(ArrayList<EllipseROI> ellipseROIs)
Set all
EllipseROIs in this layer. |
void |
setFreehandROIs(ArrayList<FreehandROI> freehandROIs)
Set all
FreehandROIs in this layer. |
void |
setFreehandShape(GeneralPath freehandShape)
Set the path of the latest shape.
|
void |
setHighlightColor(Color highlightColor) |
void |
setHighlightStroke(BasicStroke highlightStroke) |
void |
setID(UUID id)
Sets the unique ID of this drawing layer.
|
void |
setInsidePtEast(boolean isInsidePtEast)
Set a flag whether or not the mouse is in the east boundary point.
|
void |
setInsidePtNorth(boolean isInsidePtNorth)
Set a flag whether or not the mouse is in the north boundary point.
|
void |
setInsidePtNorthEast(boolean isInsidePtNorthEast)
Set a flag whether or not the mouse is in the north-east boundary point.
|
void |
setInsidePtNorthWest(boolean isInsidePtNorthWest)
Set a flag whether or not the mouse is in the north-west boundary point.
|
void |
setInsidePtSouth(boolean isInsidePtSouth)
Set a flag whether or not the mouse is in the south boundary point.
|
void |
setInsidePtSouthEast(boolean isInsidePtSouthEast)
Set a flag whether or not the mouse is in the south-east boundary point.
|
void |
setInsidePtSouthWest(boolean isInsidePtSouthWest)
Set a flag whether or not the mouse is in the south-west boundary point.
|
void |
setInsidePtWest(boolean isInsidePtWest)
Set a flag whether or not the mouse is in the west boundary point.
|
void |
setInsideRoi(boolean isInsideRoi)
Set a flag whether or not the mouse is inside of a drawn shape.
|
void |
setLayerColor(Color color)
Set the color for ROIs on this layer.
|
void |
setLayerVisible(boolean visible)
Set a flag determining whether or not the layer is visible in the canvas.
|
void |
setLineROIs(ArrayList<LineROI> lineROIs)
Set all
LineROIs in this layer. |
void |
setName(String name)
Determine the name of the layer which is shown in the selection panel.
|
void |
setNumAnglePoints(int numAnglePoints)
A helper variable used by mouse event handlers to draw
AngleROIs. |
void |
setNumPolyPoints(int numPolyPoints)
Set the number of
PolygonROI corners of the currently drawn
polygon ROI. |
void |
setPointROIs(ArrayList<PointROI> pointROIs)
Set all
PointROIs in this layer. |
void |
setPolygonROIs(ArrayList<PolygonROI> polygonROIs)
Set all
PolygonROIs in this layer. |
void |
setPolygonShape(GeneralPath polygonShape)
Sets the shape of the latest
PolygonROI. |
void |
setRectangleROIs(ArrayList<RectangleROI> rectangleROIs)
Set all
RectangleROIs in this layer. |
void |
setROIDragging(boolean isROIDragging)
Set a flag whether or not a ROI is being dragged by mouse gesture.
|
void |
setRoiShiftX0(int roiShiftX0)
Set the x-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
void |
setRoiShiftY0(int roiShiftY0)
Set the y-coordinate of the target point of a translation (shift) without
transformation of a ROI.
|
void |
setRoiX0(int roiX0)
Set the x-coordinate of the origin of a translation (shift) without
transformation of a ROI.
|
void |
setRoiY0(int roiY0)
Set the y-coordinate of the origin of a translation (shift) without
transformation of a ROI.
|
void |
setSelected(boolean selected)
Set the selection state of this layer.
|
void |
setTmpROIShape(javax.media.jai.ROIShape tmp)
Sets a current ROI shape to be drawn additionally to all present ones.
|
void |
setZOrder(int order)
Determine the order of the layer in z-direction.
|
void |
update()
Advise the
IDrawingLayer to repaint all shapes. |
deleteAllROIs, deleteROI, deleteROIs, deleteSelectedROI, drawAngleROI, drawAngleROIs, drawEllipseROI, drawEllipseROIs, drawFreehandROI, drawFreehandROIs, drawLineROI, drawLineROIs, drawPointROI, drawPointROIs, drawPolygonROI, drawPolygonROIs, drawRectangleROI, drawRectangleROIs, drawROI, drawROIsstatic final Integer DEFAULT_IMAGE_LAYER
static final Integer ACTIVE_FRONT_LAYER
static final Integer DRAGGING_LAYER
static final String DEFAULT_LAYER_COLOR_NAME
static final Color DEFAULT_LAYER_COLOR
static final String DEFAULT_LAYER_STROKE_NAME
static final BasicStroke DEFAULT_LAYER_STROKE
static final String HIGHLIGHT_COLOR_NAME
static final Color HIGHLIGHT_COLOR
static final String HIGHLIGHT_STROKE_NAME
static final BasicStroke HIGHLIGHT_STROKE
void setName(String name)
name - a unique name of the layerString getName()
int getZOrder()
>0 are
permitted.Integer indicating the layer's order in a stack of
layersvoid setZOrder(int order)
>0 are permitted.order - an Integer indicating the layer's order in a stack of
layersboolean isLayerVisible()
true, if the layer's components are drawn on the
canvas, false otherwisevoid setLayerVisible(boolean visible)
visible - set to true, if the layer's components should be
drawn on the canvas, false otherwisevoid setLayerColor(Color color)
color - Color getLayerColor()
void setSelected(boolean selected)
selected - boolean isSelected()
true if the layer is selected, false
otherwiseint getElementCount()
boolean isEmpty()
void setAngleROIs(ArrayList<AngleROI> angleROIs)
AngleROIs in this layer.angleROIs - ArrayList<AngleROI> getAngleROIs()
AngleROIs drawn in this layer.void setNumAnglePoints(int numAnglePoints)
AngleROIs.numAnglePoints - int getNumAnglePoints()
AngleROIs.void setAngleShape(GeneralPath angleShape)
AngleROIs.angleShape - the shape of the angle, usually 2 legs, determined by 3 pointsGeneralPath getAngleShape()
AngleROIs.void setCurrentAngleROI(AngleROI currentAngleROI)
AngleROI in this layer. The current
AngleROI will be highlighted first on editing ROIs.currentAngleROI - an AngleROIAngleROI getCurrentAngleROI()
AngleROI in this layer.AngleROIvoid setPolygonROIs(ArrayList<PolygonROI> polygonROIs)
PolygonROIs in this layer. This will overwrite any
existing PolygonROIs.polygonROIs - ArrayList<PolygonROI> getPolygonROIs()
PolygonROIs in this layer.PolygonROIs in this layer.void setCurrentPolygonROI(PolygonROI currentPolygonROI)
PolygonROI.currentPolygonROI - PolygonROI getCurrentPolygonROI()
PolygonROI in this layer.PolygonROI, or null
if there is no PolygonROI presentvoid setPolygonShape(GeneralPath polygonShape)
PolygonROI.polygonShape - GeneralPath getPolygonShape()
PolygonROI.null, if there is no PolygonROIvoid setNumPolyPoints(int numPolyPoints)
PolygonROI corners of the currently drawn
polygon ROI.numPolyPoints - int getNumPolyPoints()
PolygonROI.void setFreehandROIs(ArrayList<FreehandROI> freehandROIs)
FreehandROIs in this layer. This will overwrite any
existing FreehandROIs.freehandROIs - ArrayList<FreehandROI> getFreehandROIs()
FreehandROIs in this layer.FreehandROIs in this layer.void setCurrentFreehandROI(FreehandROI currentFreehandROI)
FreehandROI.currentFreehandROI - FreehandROI getCurrentFreehandROI()
FreehandROI in this layer.FreehandROI, or null
if there is no FreehandROI presentvoid setFreehandShape(GeneralPath freehandShape)
freehandShape - GeneralPath getFreehandShape()
nullvoid setEllipseROIs(ArrayList<EllipseROI> ellipseROIs)
EllipseROIs in this layer. This will overwrite the entire
list of ellipse rois in this layer.ellipseROIs - ArrayList<EllipseROI> getEllipseROIs()
EllipseROIs in this layer.void setCurrentEllipseROI(EllipseROI currentEllipseROI)
EllipseROI in this layer.currentEllipseROI - EllipseROI getCurrentEllipseROI()
EllipseROI in this layer.EllipseROI or the shape that has been drawn
latestvoid setRectangleROIs(ArrayList<RectangleROI> rectangleROIs)
RectangleROIs in this layer. This will overwrite the
entire list of rectangle rois in this layer.rectangleROIs - ArrayList<RectangleROI> getRectangleROIs()
RectangleROIs in this layer.void setCurrentRectangleROI(RectangleROI currentRectangleROI)
RectangleROI in this layer.currentRectangleROI - RectangleROI getCurrentRectangleROI()
RectangleROI in this layer.RectangleROI or the shape that has been
drawn latestvoid setCurrentLineROI(LineROI currentLineROI)
LineROI in this layer.currentLineROI - LineROI getCurrentLineROI()
LineROI in this layer.LineROI or the shape that has been drawn
latestvoid setLineROIs(ArrayList<LineROI> lineROIs)
LineROIs in this layer. This will overwrite the entire
list of line rois in this layer.lineROIs - ArrayList<LineROI> getLineROIs()
LineROIs in this layer.PointROI getCurrentPointROI()
PointROI in this layer.PointROI or the shape that has been drawn
latestvoid setCurrentPointROI(PointROI currentPointROI)
PointROI in this layer.currentPointROI - void setPointROIs(ArrayList<PointROI> pointROIs)
PointROIs in this layer. This will overwrite the entire
list of point rois in this layer.pointROIs - ArrayList<PointROI> getPointROIs()
PointROIs in this layer.void setTmpROIShape(javax.media.jai.ROIShape tmp)
tmp - javax.media.jai.ROIShape getTmpROIShape()
ROIShape, or null, if none is specifiedvoid setAllROIShapes(List<javax.media.jai.ROIShape> shapes)
ROIShapes.shapes - a list of ROI shapes.List<javax.media.jai.ROIShape> getAllROIShapes()
ROIShapes in this layer.ROIShapes of this layervoid setCurrentROIShape(javax.media.jai.ROIShape shape)
ROIShape.shape - javax.media.jai.ROIShape getCurrentROIShape()
ROIShape.ROIShape, which may be of any kindvoid setClickedROIShape(javax.media.jai.ROIShape clickedROIShape)
ROIShape.clickedROIShape - the clicked ROIShape, which may be of any kindjavax.media.jai.ROIShape getClickedROIShape()
ROIShape.ROIShape, which may be of any kindvoid setInsidePtWest(boolean isInsidePtWest)
isInsidePtWest - boolean isInsidePtWest()
true if inside, false otherwisevoid setInsidePtSouthWest(boolean isInsidePtSouthWest)
isInsidePtSouthWest - boolean isInsidePtSouthWest()
true if inside, false otherwisevoid setInsidePtSouth(boolean isInsidePtSouth)
isInsidePtSouth - boolean isInsidePtSouth()
true if inside, false otherwisevoid setInsidePtSouthEast(boolean isInsidePtSouthEast)
isInsidePtSouthEast - boolean isInsidePtSouthEast()
true if inside, false otherwisevoid setInsidePtEast(boolean isInsidePtEast)
isInsidePtEast - boolean isInsidePtEast()
true if inside, false otherwisevoid setInsidePtNorthEast(boolean isInsidePtNorthEast)
isInsidePtNorthEast - boolean isInsidePtNorthEast()
true if inside, false otherwisevoid setInsidePtNorth(boolean isInsidePtNorth)
isInsidePtNorth - boolean isInsidePtNorth()
true if inside, false otherwisevoid setInsidePtNorthWest(boolean isInsidePtNorthWest)
isInsidePtNorthWest - boolean isInsidePtNorthWest()
true if inside, false otherwisevoid setInsideRoi(boolean isInsideRoi)
isInsideRoi - boolean isInsideRoi()
true if inside, false otherwisevoid update()
IDrawingLayer to repaint all shapes.void fireNewProperties(javax.media.jai.ROIShape roi)
ImageInfoPanel according to the given ROIShape.roi - void setROIDragging(boolean isROIDragging)
isROIDragging - boolean isROIDragging()
true if the roi is currently being dragged,
false otherwisevoid setRoiShiftY0(int roiShiftY0)
roiShiftY0 - the coordinate in image pixelsint getRoiShiftY0()
void setRoiShiftX0(int roiShiftX0)
roiShiftX0 - the coordinate in image pixelsint getRoiShiftX0()
void setRoiY0(int roiY0)
roiY0 - the coordinate in image pixelsint getRoiY0()
void setRoiX0(int roiX0)
roiX0 - the coordinate in image pixelsint getRoiX0()
void addAllDefaultListeners()
void removeAllDefaultListeners()
void removeDefaultCanvasMover()
void addDefaultCanvasMover()
void setID(UUID id)
id - void setHighlightStroke(BasicStroke highlightStroke)
BasicStroke getHighlightStroke()
void setHighlightColor(Color highlightColor)
Color getHighlightColor()
void removeRoiShapeForHighlighting()
Color getLineROIBoundaryRectangleColor()
javax.media.jai.ROIShape getRoiShapeForHighlighting()
Color getRoiBoundaryRectangleColor()
Color getLineROIBoundaryColor()
void setDefaultROIStroke(BasicStroke defaultROIStroke)
BasicStroke getDefaultROIStroke()
void setDefaultLayerColor(Color defaultLayerColor)
Color getDefaultLayerColor()
void setBoundEditableRectanglesUntransformed(javax.media.jai.ROIShape[] boundEditableRectanglesUntransformed)
void setBoundEditableRectangles(javax.media.jai.ROIShape[] rs)
void removeTmpROIShape()
ROILayerCursorChanger getCursorChanger()
boolean hasROIs()
true, if minimum one shape is present,
false otherwiseCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.