public class ROI2DPolyLine extends ROI2DShape
Modifier and Type | Class and Description |
---|---|
class |
ROI2DPolyLine.ROI2DPolyLinePainter |
ROI2DShape.ROI2DShapePainter
ROI2D.ROI2DPainter
ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_POINT |
static java.lang.String |
ID_POINTS |
DEFAULT_COLOR, DEFAULT_NORMAL_COLOR, DEFAULT_OPACITY, DEFAULT_STROKE, ID_CLASSNAME, ID_COLOR, ID_ID, ID_NAME, ID_OPACITY, ID_READONLY, ID_ROI, ID_SELECTED, ID_SHOWNAME, ID_STROKE, idComparator, nameComparator, PROPERTY_COLOR, PROPERTY_CREATING, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_OPACITY, PROPERTY_READONLY, PROPERTY_SHOWNAME, PROPERTY_STROKE
Constructor and Description |
---|
ROI2DPolyLine() |
ROI2DPolyLine(java.util.List<java.awt.geom.Point2D> points) |
ROI2DPolyLine(java.awt.geom.Point2D pt) |
ROI2DPolyLine(java.awt.geom.Point2D pt,
boolean cm)
Deprecated.
|
ROI2DPolyLine(Point5D pt)
Generic constructor for interactive mode
|
ROI2DPolyLine(java.awt.Polygon polygon) |
Modifier and Type | Method and Description |
---|---|
double |
computeNumberOfContourPoints()
Generic implementation for ROI2D using the BooleanMask object so the result is just an
approximation.
|
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[] |
getBooleanMask(int x,
int y,
int w,
int h,
boolean inclusive)
Get the boolean bitmap mask for the specified rectangular area of the roi.
|
java.awt.Polygon |
getPolygon() |
boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of the
ROI intersects the interior of a specified
rectangular area. |
boolean |
intersects(java.awt.geom.Rectangle2D r)
Tests if the interior of the
ROI intersects the interior of a specified
Rectangle2D . |
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
boolean |
saveToXML(org.w3c.dom.Node node)
SAVE
|
void |
setPoints(java.util.ArrayList<java.awt.geom.Point2D> pts)
Deprecated.
Use
setPoints(ArrayList) instead. |
void |
setPoints(java.util.List<java.awt.geom.Point2D> pts) |
void |
setPolygon(java.awt.Polygon polygon) |
addNewPoint, addPoint, addPoint, addPointAt, canAddPoint, canRemovePoint, canTranslate, computeBounds2D, contains, controlPointOverlayChanged, controlPointPositionChanged, getControlPoints, getPathIterator, getPathIterator, getPoints, getShape, hasSelectedPoint, intersects, isOverEdge, onChanged, painterChanged, removePoint, removePointAt, removeSelectedPoint, setSelected, translate
canSetBounds, canSetPosition, computeBounds5D, contains, contains, getArea, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getAsBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask, getBooleanMask2D, getBooleanMask2D, getBounds, getBounds2D, getC, getDimension, getPerimeter, getPosition, getPosition2D, getROI2DList, getROI2DList, getROI2DList, getT, getZ, intersects, isActiveFor, isActiveFor, isOver, isOver, isOverEdge, isOverEdge, isOverEdge, merge, setBounds2D, setBounds5D, setC, setPosition, setPosition2D, setPosition5D, setT, setZ, substract, subtract
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, focusChanged, getAdjustedStroke, getAdjustedStroke, getBooleanMask2D, getBounds5D, getClassName, getColor, getCopy, getDisplayColor, getExclusiveUnion, getFirstSequence, getFocusedColor, getIcon, getId, getIntersection, getName, getNumberOfContourPoints, getNumberOfPoints, getOpacity, getOverlay, getPainter, getPosition5D, getPropertyValue, getROICount, getROIList, getROIList, getROIList, getROIsFromXML, getSelectedColor, getSequences, getShowName, getSimpleClassName, getStroke, getSubtraction, getUnion, getVolume, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersects, isAttached, isCreating, isEditable, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, nameChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, saveROIsToXML, selectionChanged, setColor, setCreating, setEditable, setFocused, setIcon, setMousePos, setName, setOpacity, setPropertyValue, setReadOnly, setROIsFromXML, setSelected, setSelectedColor, setShowName, setStroke
public static final java.lang.String ID_POINTS
public static final java.lang.String ID_POINT
@Deprecated public ROI2DPolyLine(java.awt.geom.Point2D pt, boolean cm)
public ROI2DPolyLine(java.awt.geom.Point2D pt)
public ROI2DPolyLine(Point5D pt)
public ROI2DPolyLine(java.awt.Polygon polygon)
public ROI2DPolyLine(java.util.List<java.awt.geom.Point2D> points)
public ROI2DPolyLine()
public void setPoints(java.util.List<java.awt.geom.Point2D> pts)
@Deprecated public void setPoints(java.util.ArrayList<java.awt.geom.Point2D> pts)
setPoints(ArrayList)
instead.public java.awt.Polygon getPolygon()
public void setPolygon(java.awt.Polygon polygon)
public double computeNumberOfContourPoints()
ROI2D
computeNumberOfContourPoints
in class ROI2D
public double computeNumberOfPoints()
ROI2D
computeNumberOfPoints
in class ROI2D
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(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(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 intersects(double x, double y, double w, double h)
ROI2D
ROI
intersects the interior of a specified
rectangular area. The rectangular area is considered to intersect the ROI
if any
point is contained in both the interior of the ROI
and the specified rectangular
area.
The ROI.intersects()
method allows a ROI
implementation to conservatively
return true
when:
ROI
intersect,
but
ROIs
this method might return true
even though the
rectangular area does not intersect the ROI
.intersects
in interface java.awt.Shape
intersects
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
and the interior of the
rectangular area intersect, or are both highly likely to intersect and intersection
calculations would be too expensive to perform; false
otherwise.public boolean intersects(java.awt.geom.Rectangle2D r)
ROI2D
ROI
intersects the interior of a specified
Rectangle2D
. The ROI.intersects()
method allows a ROI
implementation to conservatively return true
when:
Rectangle2D
and the ROI
intersect, but
ROIs
this method might return true
even though the
Rectangle2D
does not intersect the ROI
.intersects
in interface java.awt.Shape
intersects
in class ROI2DShape
r
- the specified Rectangle2D
true
if the interior of the ROI
and the interior of the
specified Rectangle2D
intersect, or are both highly likely to intersect
and intersection calculations would be too expensive to perform; false
otherwise.ROI2D.intersects(double, double, double, double)
public boolean[] getBooleanMask(int x, int y, int w, int h, boolean inclusive)
ROI2D
getBooleanMask
in class ROI2D
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 areainclusive
- If true then all partially contained (intersected) pixels are included in the mask.public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
loadFromXML
in class ROI2D
public boolean saveToXML(org.w3c.dom.Node node)
XMLPersistent
saveToXML
in interface XMLPersistent
saveToXML
in class ROI2D