public class ROI2DPoint extends ROI2DShape
Modifier and Type | Class and Description |
---|---|
class |
ROI2DPoint.ROI2DPointPainter |
ROI2DShape.ROI2DShapePainter
ROI2D.ROI2DPainter
ROI.ROIGroupId, ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_POSITION |
DEFAULT_COLOR, DEFAULT_NORMAL_COLOR, DEFAULT_OPACITY, DEFAULT_STROKE, defaultColor, defaultOpacity, defaultShowName, defaultStroke, ID_CLASSNAME, ID_COLOR, ID_GROUPID, ID_ID, ID_NAME, ID_OPACITY, ID_PROPERTIES, ID_READONLY, ID_ROI, ID_SELECTED, ID_SHOWNAME, ID_STROKE, idComparator, nameComparator, PROPERTY_COLOR, PROPERTY_CREATING, PROPERTY_GROUPID, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_OPACITY, PROPERTY_READONLY, PROPERTY_SHOWNAME, PROPERTY_STROKE, ROI_CHANGED_ALL, ROI_CHANGED_POSITION
Constructor and Description |
---|
ROI2DPoint() |
ROI2DPoint(double x,
double y) |
ROI2DPoint(java.awt.geom.Point2D position) |
ROI2DPoint(java.awt.geom.Point2D pt,
boolean cm)
Deprecated.
|
ROI2DPoint(Point5D pt)
Generic constructor for interactive mode
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAddPoint()
Return true if this ROI support adding new point
|
double |
computeNumberOfContourPoints()
Compute and returns the number of point (pixel) composing the ROI contour.
|
double |
computeNumberOfPoints()
Generic implementation for ROI2D using the BooleanMask object so the result is just an
approximation.
|
boolean |
contains(double x,
double y)
Tests if the specified coordinates are inside the
ROI . |
boolean |
contains(double x,
double y,
double w,
double h)
Tests if the
ROI entirely contains the specified rectangular area. |
boolean |
contains(java.awt.geom.Point2D p)
Tests if a specified
Point2D is inside the ROI. |
boolean |
contains(java.awt.geom.Rectangle2D r)
Tests if the interior of the
ROI entirely contains the specified Rectangle2D . |
boolean |
contains(ROI roi)
Tests if the
ROI entirely contains the specified ROI . |
void |
controlPointOverlayChanged(OverlayEvent event)
Called when anchor overlay changed
|
java.lang.String |
getDefaultName() |
java.awt.geom.Line2D |
getLine() |
java.awt.geom.Point2D |
getPoint() |
java.awt.geom.Rectangle2D |
getRectangle()
Deprecated.
Use
getLine() instead. |
boolean |
intersects(ROI r)
Tests if the current
ROI intersects the specified ROI . |
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
void |
onChanged(CollapsibleEvent object)
roi changed
|
boolean |
saveToXML(org.w3c.dom.Node node)
SAVE
|
addNewPoint, addNewPoint, addPoint, addPoint, addPointAt, canRemovePoint, canTranslate, computeBounds2D, controlPointPositionChanged, getBooleanMask, getControlPoints, getExclusiveUnion, getIntersection, getLength, getPathIterator, getPathIterator, getPoints, getShape, getSubtraction, getUnion, hasSelectedPoint, intersects, intersects, isOverEdge, painterChanged, removePoint, removePointAt, removeSelectedPoint, translate, unselectAllPoints
canSetBounds, canSetPosition, computeBounds5D, computePerimeter, contains, contains, getArea, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask2D, getBooleanMask2D, getBounds, getBounds2D, getC, getDimension, getPerimeter, getPerimeter, getPosition, getPosition2D, getROI2DList, getROI2DList, getROI2DList, getSubROI, getT, getZ, intersects, isActiveFor, isActiveFor, isOver, isOver, isOverEdge, isOverEdge, isOverEdge, merge, setBounds2D, setBounds5D, setC, setPosition, setPosition2D, setPosition5D, setT, setZ, substract, subtract
add, addListener, attachTo, beginUpdate, canvasToImageDeltaX, canvasToImageDeltaY, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, contains, contains, copyFrom, create, create, create, create, createFromXML, delete, delete, detachFrom, detachFromAll, detachFromAll, endUpdate, exclusiveAdd, focusChanged, getAdjustedStroke, getAdjustedStroke, getBooleanMask2D, getBounds5D, getClassName, getColor, getCopy, getDefaultColor, getDefaultOpacity, getDefaultShowName, getDefaultStroke, getDisplayColor, getFirstSequence, getFocusedColor, getGroupId, getIcon, getId, getName, getNameSuffix, getNumberOfContourPoints, getNumberOfPoints, getOpacity, getOverlay, getPainter, getPosition5D, getProperties, getProperty, getPropertyValue, getROICount, getROIList, getROIList, getROIList, getROIsFromXML, getSelectedColor, getSequences, getShowName, getSimpleClassName, getStroke, getVolume, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersect, intersects, isAttached, isCreating, isDefaultName, isEditable, isEmpty, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, mergeWith, nameChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, roiChanged, saveROIsToXML, selectionChanged, setColor, setCreating, setDefaultColor, setDefaultOpacity, setDefaultShowName, setDefaultStroke, setEditable, setFocused, setGroupId, setIcon, setMousePos, setName, setOpacity, setProperty, setPropertyValue, setReadOnly, setROIsFromXML, setSelected, setSelected, setSelectedColor, setShowName, setStroke, subtract
public static final java.lang.String ID_POSITION
@Deprecated public ROI2DPoint(java.awt.geom.Point2D pt, boolean cm)
public ROI2DPoint(java.awt.geom.Point2D position)
public ROI2DPoint(Point5D pt)
public ROI2DPoint(double x, double y)
public ROI2DPoint()
public java.lang.String getDefaultName()
getDefaultName
in class ROI2DShape
@Deprecated public java.awt.geom.Rectangle2D getRectangle()
getLine()
instead.public java.awt.geom.Line2D getLine()
public java.awt.geom.Point2D getPoint()
public void controlPointOverlayChanged(OverlayEvent event)
controlPointOverlayChanged
in class ROI2DShape
public boolean contains(double x, double y)
ROI2D
ROI
.contains
in interface java.awt.Shape
contains
in class ROI2DShape
x
- the specified X coordinate to be testedy
- the specified Y coordinate to be testedtrue
if the specified coordinates are inside the ROI
boundary;
false
otherwise.public boolean contains(java.awt.geom.Point2D p)
ROI2D
Point2D
is inside the ROI.contains
in interface java.awt.Shape
contains
in class ROI2DShape
p
- the specified Point2D
to be testedtrue
if the specified Point2D
is inside the boundary of the ROI
;
false
otherwise.public boolean contains(double x, double y, double w, double h)
ROI2D
ROI
entirely contains the specified rectangular area. All
coordinates that lie inside the rectangular area must lie within the ROI
for the
entire rectangular area to be considered contained within the ROI
.
The ROI.contains()
method allows a ROI
implementation to conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the rectangular area are
prohibitively expensive.
ROIs
this method might return false
even though the ROI
contains
the rectangular area.contains
in interface java.awt.Shape
contains
in class ROI2DShape
x
- the X coordinate of the upper-left corner of the specified rectangular areay
- the Y coordinate of the upper-left corner of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areatrue
if the interior of the ROI
entirely contains the
specified rectangular area; false
otherwise or, if the ROI
contains the
rectangular area and the intersects
method returns true
and the containment
calculations would be too expensive to perform.public boolean contains(java.awt.geom.Rectangle2D r)
ROI2D
ROI
entirely contains the specified Rectangle2D
. The
ROI.contains()
method allows a implementation to
conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the
Rectangle2D
are prohibitively expensive.
false
even though the ROI
contains the
Rectangle2D
.contains
in interface java.awt.Shape
contains
in class ROI2DShape
r
- The specified Rectangle2D
true
if the interior of the ROI
entirely contains the Rectangle2D
;
false
otherwise or, if the ROI
contains the Rectangle2D
and the
intersects
method returns true
and the containment calculations would be too
expensive to perform.ROI2D.contains(double, double, double, double)
public boolean contains(ROI roi)
ROI
ROI
entirely contains the specified ROI
.
WARNING: this method may be "pixel accurate" only depending the internal implementation.public boolean intersects(ROI r)
ROI
ROI
intersects the specified ROI
.intersects
in class ROI2D
true
if ROI
intersect, false
otherwise.public void onChanged(CollapsibleEvent object)
onChanged
in interface ChangeListener
onChanged
in class ROI2DShape
public boolean canAddPoint()
ROI2DShape
canAddPoint
in class ROI2DShape
public double computeNumberOfContourPoints()
ROI
computeNumberOfContourPoints
in class ROI2DShape
public double computeNumberOfPoints()
ROI2D
computeNumberOfPoints
in class ROI2D
public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
loadFromXML
in class ROI2DShape
public boolean saveToXML(org.w3c.dom.Node node)
XMLPersistent
saveToXML
in interface XMLPersistent
saveToXML
in class ROI2D