public class PolylineRoiWrapper extends AbstractPolygonRoiWrapper implements WritablePolyline
PolygonRoi
as an ImgLib2 Polyline
.Constructor and Description |
---|
PolylineRoiWrapper(float[] xPoints,
float[] yPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polyline . |
PolylineRoiWrapper(float[] xPoints,
float[] yPoints,
int nPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polyline . |
PolylineRoiWrapper(int[] xPoints,
int[] yPoints,
int nPoints)
Creates an ImageJ 1.x
PolygonRoi and wraps it as an ImgLib2
Polyline . |
PolylineRoiWrapper(PolygonRoi poly)
Wraps an ImageJ 1.x
PolygonRoi as an ImgLib2 Polyline . |
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, realMin
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
boundaryType, hashCode, maskType
equals, numVertices, vertices
and, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xor
isAll, knownConstant
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMin
public PolylineRoiWrapper(int[] xPoints, int[] yPoints, int nPoints)
PolygonRoi
and wraps it as an ImgLib2
Polyline
.xPoints
- x coordinates of the verticesyPoints
- y coordinates of the verticesnPoints
- number of verticespublic PolylineRoiWrapper(float[] xPoints, float[] yPoints, int nPoints)
PolygonRoi
and wraps it as an ImgLib2
Polyline
.xPoints
- x coordinates of the verticesyPoints
- y coordinates of the verticesnPoints
- number of verticespublic PolylineRoiWrapper(float[] xPoints, float[] yPoints)
PolygonRoi
and wraps it as an ImgLib2
Polyline
. The length of xPoints
will be used to determine
the number of vertices this Polyline
has.xPoints
- x coordinates of the verticesyPoints
- y coordinates of the verticespublic PolylineRoiWrapper(PolygonRoi poly)
PolygonRoi
as an ImgLib2 Polyline
.poly
- the PolygonRoi
to be wrappedpublic boolean test(RealLocalizable t)
test
in interface Predicate<RealLocalizable>
public RealLocalizableRealPositionable vertex(int pos)
vertex
in interface Polyshape
vertex
in interface WritablePolyshape
public void addVertex(int index, RealLocalizable vertex)
UnsupportedOperationException
.addVertex
in interface WritablePolyshape
UnsupportedOperationException
- cannot add a new vertex to the
underlying PolygonRoi
public void addVertices(int index, Collection<RealLocalizable> vertices)
UnsupportedOperationException
.addVertices
in interface WritablePolyshape
UnsupportedOperationException
- cannot add new vertices to the
underlying PolygonRoi
public 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 WritablePolyshape
public boolean equals(Object obj)
equals
in interface Polyline
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
Copyright © 2014–2022 ImageJ. All rights reserved.