@Deprecated public class PolygonRegionOfInterest extends AbstractIterableRegionOfInterest
Modifier and Type | Class and Description |
---|---|
protected static class |
PolygonRegionOfInterest.Stripe
Deprecated.
We decompose the polygon into stripes from yMin to yMin which have arrays
of xTop and xBottom describing the polygon boundary between yMin and
yMax.
|
AbstractIterableRegionOfInterest.AROIClippedIterableInterval<T extends Type<T>>, AbstractIterableRegionOfInterest.AROIIterableInterval<T extends Type<T>>, AbstractIterableRegionOfInterest.AROIIterationOrder
AbstractRegionOfInterest.AROIRandomAccess
Modifier and Type | Field and Description |
---|---|
protected ArrayList<RealPoint> |
points
Deprecated.
|
nDimensions
Constructor and Description |
---|
PolygonRegionOfInterest()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addVertex(int index,
RealLocalizable p)
Deprecated.
Insert a point into the polygon at the given index
|
boolean |
contains(double[] position)
Deprecated.
Determine whether a point is a member of the region of interest
|
protected int |
findStripeIndex(double y)
Deprecated.
Find the index of the stripe whose yMin is lower or the same as the given
y
|
RealLocalizable |
getEdgeEnd(int start)
Deprecated.
Get the coordinates of the second vertex of the indexed edge
|
protected boolean |
getEdges(double[] position,
double[] x_intercepts)
Deprecated.
Get the closest edge to the left of this one
|
RealLocalizable |
getEdgeStart(int start)
Deprecated.
Get the coordinates of the first vertex of the indexed edge
|
protected void |
getExtrema(long[] minima,
long[] maxima)
Deprecated.
Get the minimum and maximum corners of a bounding hypercube around all
points in the ROI.
|
protected void |
getRealExtrema(double[] minima,
double[] maxima)
Deprecated.
Get the minimum and maximum corners of a bounding hypercube using real
coordinates (which might have fractional components)
The implementer should only override this if the ROI is described in real
coordinates.
|
RealLocalizable |
getVertex(int index)
Deprecated.
Get a vertex by index
|
int |
getVertexCount()
Deprecated.
|
double |
interpolateEdgeXAtY(int start,
double y)
Deprecated.
Given an edge and a Y coordinate, find its X coordinate at that Y
coordinate.
|
boolean |
isHorizontal(int index)
Deprecated.
Determine whether the given edge is horizontal.
|
void |
move(double displacement,
int d)
Deprecated.
|
protected boolean |
nextRaster(long[] position,
long[] end)
Deprecated.
Advance the position to the next raster.
|
void |
removeVertex(int index)
Deprecated.
Remove a vertex from the polygon
|
void |
setVertexPosition(int index,
double[] position)
Deprecated.
Change the position of a vertex
|
void |
setVertexPosition(int index,
float[] position)
Deprecated.
Change the position of a vertex
|
void |
setVertexPosition(int index,
RealLocalizable localizable)
Deprecated.
Change the position of a vertex using a localizable
|
String |
toString()
Deprecated.
|
protected void |
validate()
Deprecated.
Build the cached list of stripes if necessary.
|
dimension, dimensions, getCachedSize, getIterableIntervalOverROI, invalidateCachedState, jumpFwd, max, max, max, min, min, min, nextRaster, remove, size
move, numDimensions, realMax, realMax, realMax, realMin, realMin, realMin, realRandomAccess, realRandomAccess, validateRealExtremaCache
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
move
getAt, getAt, getAt, realRandomAccess, realRandomAccess
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMax, realMin, realMin, realMin
numDimensions
public int getVertexCount()
public RealLocalizable getVertex(int index)
index
- index of the vertex to getpublic void addVertex(int index, RealLocalizable p)
p
- point to be insertedindex
- index of point.public void removeVertex(int index)
index
- index of the vertex to removepublic void setVertexPosition(int index, double[] position)
index
- index of the vertex in questionposition
- public void setVertexPosition(int index, float[] position)
index
- index of the vertex in questionposition
- public void setVertexPosition(int index, RealLocalizable localizable)
index
- index of the vertex in questionlocalizable
- containing the new positionprotected void validate()
protected int findStripeIndex(double y)
y
- protected void getRealExtrema(double[] minima, double[] maxima)
AbstractIterableRegionOfInterest
getRealExtrema
in class AbstractIterableRegionOfInterest
protected void getExtrema(long[] minima, long[] maxima)
AbstractIterableRegionOfInterest
getExtrema
in class AbstractIterableRegionOfInterest
minima
- - minimum coordinates of the ROImaxima
- - maximum coordinates of the ROIprotected boolean nextRaster(long[] position, long[] end)
AbstractIterableRegionOfInterest
nextRaster
in class AbstractIterableRegionOfInterest
position
- on entry, the position of the raster after advancement to its
end (or initial or final position)end
- on exit, the coordinates of the end of the raster. Index 0 is
generally the only pertinent variable, subsequent indices
should be duplicates of the start raster. Nevertheless, using
an array lets the caller pass the results as a modification of
the array.public boolean contains(double[] position)
RegionOfInterest
position
- position in questionpublic RealLocalizable getEdgeStart(int start)
start
- the index of the edgepublic RealLocalizable getEdgeEnd(int start)
start
- the index of the edgepublic boolean isHorizontal(int index)
index
- index of edge to examinepublic double interpolateEdgeXAtY(int start, double y)
start
- index of the edgeprotected boolean getEdges(double[] position, double[] x_intercepts)
position
- position of interestx_intercepts
- x-intercepts of the edges at the Y position passed inpublic void move(double displacement, int d)
Copyright © 2015–2022 ImgLib2. All rights reserved.