public class PolygonRoiWrapper extends AbstractPolygonRoiWrapper implements WritablePolygon2D
PolygonRoi as an ImgLib2 Polygon2D.| Constructor and Description |
|---|
PolygonRoiWrapper(float[] xPoints,
float[] yPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polygon2D. |
PolygonRoiWrapper(float[] xPoints,
float[] yPoints,
int nPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polygon2D. |
PolygonRoiWrapper(int[] xPoints,
int[] yPoints,
int nPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polygon2D. |
PolygonRoiWrapper(PolygonRoi poly)
Wraps an ImageJ 1.x
PolygonRoi as an ImgLib2 Polygon2D. |
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(int index,
RealLocalizable vertex)
This will always throw an
UnsupportedOperationException. |
void |
addVertices(int index,
Collection<RealLocalizable> vertices)
This will always throw an
UnsupportedOperationException. |
boolean |
equals(Object obj) |
int |
hashCode() |
void |
removeVertex(int index)
If the wrapped
PolygonRoi is not associated with an
ImagePlus, then this method will always throw an
UnsupportedOperationException. |
boolean |
test(RealLocalizable t) |
RealLocalizableRealPositionable |
vertex(int pos) |
getRoi, numDimensions, numVertices, realMax, realMinclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddVertexhashCode, maskType, numDimensionsequals, numVertices, verticesand, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xorboundaryType, isAll, knownConstantmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMinpublic PolygonRoiWrapper(int[] xPoints,
int[] yPoints,
int nPoints)
PolygonRoi and wraps it as an ImgLib2
Polygon2D.xPoints - x coordinates of the verticesyPoints - y coordinates of the verticesnPoints - number of verticespublic PolygonRoiWrapper(float[] xPoints,
float[] yPoints,
int nPoints)
PolygonRoi and wraps it as an ImgLib2
Polygon2D.xPoints - x coordinates of the verticesyPoints - y coordinates of the verticesnPoints - number of verticespublic PolygonRoiWrapper(float[] xPoints,
float[] yPoints)
PolygonRoi and wraps it as an ImgLib2
Polygon2D. The length of xPoints will be used to determine
the number of vertices this Polygon2D has.xPoints - x coordinates of the verticesyPoints - y coordinates of the verticespublic PolygonRoiWrapper(PolygonRoi poly)
PolygonRoi as an ImgLib2 Polygon2D.poly - the PolygonRoi to be wrappedpublic boolean test(RealLocalizable t)
Since PolygonRoi.contains(int, int) uses the "pnpoly" algorithm for
real space polygons, so does this implementation. Thus resulting in a
Polygon2D with unspecified boundary behavior.
test in interface Predicate<RealLocalizable>public RealLocalizableRealPositionable vertex(int pos)
vertex in interface Polyshapevertex in interface WritablePolyshapepublic void addVertex(int index,
RealLocalizable vertex)
UnsupportedOperationException.addVertex in interface WritablePolyshapeUnsupportedOperationException - cannot add a new vertex to the
underlying PolygonRoipublic void addVertices(int index,
Collection<RealLocalizable> vertices)
UnsupportedOperationException.addVertices in interface WritablePolyshapeUnsupportedOperationException - cannot add new vertices to the
underlying PolygonRoipublic void removeVertex(int index)
PolygonRoi is not associated with an
ImagePlus, then this method will always throw an
UnsupportedOperationException. Otherwise, the vertex will be
removed provided the index is valid.removeVertex in interface WritablePolyshapepublic boolean equals(Object obj)
equals in interface Polygon2Dequals in interface MaskPredicate<RealLocalizable>equals in class ObjectCopyright © 2014–2022 ImageJ. All rights reserved.