public class PointRoiWrapper extends Object implements IJRealRoiWrapper<PointRoi>, WritableRealPointCollection<RealLocalizable>
PointRoi
as an ImgLib2
RealPointCollection
.Constructor and Description |
---|
PointRoiWrapper(double x,
double y)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(float[] x,
float[] y)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(float[] x,
float[] y,
int numPoints)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(ij.process.FloatPolygon polygon)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(int[] x,
int[] y,
int numPoints)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(int x,
int y)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
PointRoiWrapper(PointRoi points)
Wraps the given ImageJ 1.x
PointRoi as an ImgLib2
RealPointCollection . |
PointRoiWrapper(Polygon polygon)
Creates an ImageJ 1.x
PointRoi and wraps it as an ImgLib2
RealPointCollection . |
Modifier and Type | Method and Description |
---|---|
void |
addPoint(RealLocalizable point) |
boolean |
equals(Object obj) |
PointRoi |
getRoi()
Returns the backing ImageJ 1.x
Roi . |
int |
hashCode() |
Iterable<RealLocalizable> |
points() |
double |
realMax(int d) |
double |
realMin(int d) |
void |
removePoint(RealLocalizable point) |
long |
size() |
boolean |
test(RealLocalizable t) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
numDimensions
boundaryType, equals, hashCode, maskType
and, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xor
isAll, knownConstant
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
public PointRoiWrapper(int[] x, int[] y, int numPoints)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.x
- x coordinates of the pointsy
- y coordinates of the pointsnumPoints
- total number of points in the collectionpublic PointRoiWrapper(float[] x, float[] y, int numPoints)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.x
- x coordinates of the pointsy
- y coordinates of the pointsnumPoints
- total number of points in the collectionpublic PointRoiWrapper(float[] x, float[] y)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.x
- x coordinates of the pointsy
- y coordinates of the pointspublic PointRoiWrapper(ij.process.FloatPolygon polygon)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.polygon
- FloatPolygon
whose vertices will be the points
contained in this collectionpublic PointRoiWrapper(Polygon polygon)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.polygon
- Polygon
whose vertices will be the points contained
in this collectionpublic PointRoiWrapper(int x, int y)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.x
- x coordinate of the pointy
- y coordinate of the pointpublic PointRoiWrapper(double x, double y)
PointRoi
and wraps it as an ImgLib2
RealPointCollection
.x
- x coordinate of the pointy
- y coordinate of the pointpublic PointRoiWrapper(PointRoi points)
PointRoi
as an ImgLib2
RealPointCollection
.points
- PointRoi
to be wrappedpublic boolean test(RealLocalizable t)
test
in interface Predicate<RealLocalizable>
public double realMin(int d)
realMin
in interface RealInterval
public double realMax(int d)
realMax
in interface RealInterval
public Iterable<RealLocalizable> points()
points
in interface RealPointCollection<RealLocalizable>
public long size()
size
in interface RealPointCollection<RealLocalizable>
public void addPoint(RealLocalizable point)
The position of this point will be stored as a float
, which may
result in a loss of precision.
addPoint
in interface WritableRealPointCollection<RealLocalizable>
public void removePoint(RealLocalizable point)
If there is no ImagePlus
associated with the wrapped
PointRoi
, then an UnsupportedOperationException
will always
be thrown. Otherwise, the point will be removed if it matches any of the
points in the collection.
removePoint
in interface WritableRealPointCollection<RealLocalizable>
public PointRoi getRoi()
IJRoiWrapper
Roi
.getRoi
in interface IJRoiWrapper<PointRoi,RealLocalizable>
Roi
public boolean equals(Object obj)
equals
in interface RealPointCollection<RealLocalizable>
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
Copyright © 2014–2022 ImageJ. All rights reserved.