|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.jai.ROI
jaitools.imageutils.ROIGeometry
public class ROIGeometry
An ROI class that honours double precision coordinates when testing for inclusion.
| Constructor Summary | |
|---|---|
ROIGeometry(com.vividsolutions.jts.geom.Geometry geom)
Constructor which takes a Geometry object to be used
as the reference against which to test inclusion of image coordinates. |
|
ROIGeometry(com.vividsolutions.jts.geom.Geometry geom,
PixelCoordType coordType)
Constructor which takes a Geometry object to be used
as the reference against which to test inclusion of image coordinates. |
|
| Method Summary | |
|---|---|
javax.media.jai.ROI |
add(javax.media.jai.ROI roi)
Returns a new instance which is the union of this ROI and roi. |
boolean |
contains(double x,
double y)
Tests if this ROI contains the given image location. |
boolean |
contains(double x,
double y,
double w,
double h)
Tests if this ROI contains the given rectangle. |
boolean |
contains(int x,
int y)
Tests if this ROI contains the given image location. |
boolean |
contains(int x,
int y,
int w,
int h)
Tests if this ROI contains the given rectangle. |
boolean |
contains(Point p)
Tests if this ROI contains the given point. |
boolean |
contains(Point2D p)
Tests if this ROI contains the given point. |
boolean |
contains(Rectangle rect)
Tests if this ROI contains the given rectangle. |
boolean |
contains(Rectangle2D rect)
Tests if this ROI contains the given rectangle. |
javax.media.jai.ROI |
exclusiveOr(javax.media.jai.ROI roi)
This method is not supported. |
int[][] |
getAsBitmask(int x,
int y,
int width,
int height,
int[][] mask)
This method is not supported. |
com.vividsolutions.jts.geom.Geometry |
getAsGeometry()
Returns the ROI as a JTS Geometry. |
javax.media.jai.PlanarImage |
getAsImage()
Gets an image representation of this ROI using the VectorBinarize
operation. |
LinkedList |
getAsRectangleList(int x,
int y,
int width,
int height)
This method is not supported. |
protected LinkedList |
getAsRectangleList(int x,
int y,
int width,
int height,
boolean mergeRectangles)
This method is not supported. |
Shape |
getAsShape()
Gets a new Shape representing this ROI. |
Rectangle |
getBounds()
Gets the enclosing rectangle of this ROI. |
Rectangle2D |
getBounds2D()
Gets the enclosing double-precision rectangle of this ROI. |
int |
getThreshold()
This method is not supported. |
javax.media.jai.ROI |
intersect(javax.media.jai.ROI roi)
Returns a new instance which is the intersection of this ROI and roi. |
boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the given rectangle intersects with this ROI. |
boolean |
intersects(int x,
int y,
int w,
int h)
Tests if the given rectangle intersects with this ROI. |
boolean |
intersects(Rectangle rect)
Tests if the given rectangle intersects with this ROI. |
boolean |
intersects(Rectangle2D rect)
Tests if the given rectangle intersects with this ROI. |
javax.media.jai.ROI |
performImageOp(RenderedImageFactory RIF,
ParameterBlock paramBlock,
int sourceIndex,
RenderingHints renderHints)
This method is not supported. |
javax.media.jai.ROI |
performImageOp(String name,
ParameterBlock paramBlock,
int sourceIndex,
RenderingHints renderHints)
This method is not supported. |
void |
setThreshold(int threshold)
This method is not supported. |
javax.media.jai.ROI |
subtract(javax.media.jai.ROI roi)
This method is not supported. |
javax.media.jai.ROI |
transform(AffineTransform at)
Returns a new ROI created by applying the given transform to this ROI. |
javax.media.jai.ROI |
transform(AffineTransform at,
javax.media.jai.Interpolation interp)
Returns a new ROI created by applying the given transform to this ROI. |
| Methods inherited from class javax.media.jai.ROI |
|---|
mergeRunLengthList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ROIGeometry(com.vividsolutions.jts.geom.Geometry geom)
Geometry object to be used
as the reference against which to test inclusion of image coordinates.
The argument geom must be either a Polygon or
MultiPolygon.
Using this constructor will result in pixel inclusion being tested with corner coordinates (equivalent to standard JAI pixel indexing).
Note: geom will be copied so subsequent changes to it will
not be reflected in the ROIGeometry object.
geom - either a Polygon or MultiPolygon object
defining the area(s) of inclusion.
IllegalArgumentException - if theGeom is null or
not an instance of either Polygon or MultiPolygon
public ROIGeometry(com.vividsolutions.jts.geom.Geometry geom,
PixelCoordType coordType)
Geometry object to be used
as the reference against which to test inclusion of image coordinates.
The argument geom must be either a Polygon or
MultiPolygon.
Note: geom will be copied so subsequent changes to it will
not be reflected in the ROIGeometry object.
geom - either a Polygon or MultiPolygon object
defining the area(s) of inclusion.coordType - type of pixel coordinates to use when testing for inclusion
IllegalArgumentException - if theGeom is null or
not an instance of either Polygon or MultiPolygon| Method Detail |
|---|
public javax.media.jai.ROI add(javax.media.jai.ROI roi)
roi.
This is only possible if roi is an instance of ROIGeometry
or ROIShape.
add in class javax.media.jai.ROIroi - the ROI to add
UnsupportedOperationException - if roi is not an instance
of ROIGeometry or ROIShapepublic boolean contains(Point p)
contains in class javax.media.jai.ROIp - the point
true if the point is within this ROI;
false otherwisepublic boolean contains(Point2D p)
contains in class javax.media.jai.ROIp - the point
true if the point is within this ROI;
false otherwise
public boolean contains(int x,
int y)
contains in class javax.media.jai.ROIx - location X ordinatey - location Y ordinate
true if the location is within this ROI;
false otherwise
public boolean contains(double x,
double y)
contains in class javax.media.jai.ROIx - location X ordinatey - location Y ordinate
true if the location is within this ROI;
false otherwisepublic boolean contains(Rectangle rect)
contains in class javax.media.jai.ROIrect - the rectangle
true if the rectangle is within this ROI;
false otherwisepublic boolean contains(Rectangle2D rect)
contains in class javax.media.jai.ROIrect - the rectangle
true if the rectangle is within this ROI;
false otherwise
public boolean contains(int x,
int y,
int w,
int h)
contains in class javax.media.jai.ROIx - rectangle origin X ordinatey - rectangle origin Y ordinatew - rectangle widthh - rectangle height
true if the rectangle is within this ROI;
false otherwise
public boolean contains(double x,
double y,
double w,
double h)
contains in class javax.media.jai.ROIx - rectangle origin X ordinatey - rectangle origin Y ordinatew - rectangle widthh - rectangle height
true if the rectangle is within this ROI;
false otherwisepublic javax.media.jai.ROI exclusiveOr(javax.media.jai.ROI roi)
exclusiveOr in class javax.media.jai.ROIUnsupportedOperationException - if called
public int[][] getAsBitmask(int x,
int y,
int width,
int height,
int[][] mask)
getAsBitmask in class javax.media.jai.ROIUnsupportedOperationException - if calledpublic javax.media.jai.PlanarImage getAsImage()
VectorBinarize
operation. For an ROI with very large bounds but simple shape(s) the
resulting image has a small memory footprint.
getAsImage in class javax.media.jai.ROIVectorBinarizeDescriptor
public LinkedList getAsRectangleList(int x,
int y,
int width,
int height)
getAsRectangleList in class javax.media.jai.ROIUnsupportedOperationException - if called
protected LinkedList getAsRectangleList(int x,
int y,
int width,
int height,
boolean mergeRectangles)
getAsRectangleList in class javax.media.jai.ROIUnsupportedOperationException - if calledpublic Shape getAsShape()
Shape representing this ROI.
getAsShape in class javax.media.jai.ROIpublic com.vividsolutions.jts.geom.Geometry getAsGeometry()
Geometry.
public Rectangle getBounds()
getBounds in class javax.media.jai.ROIpublic Rectangle2D getBounds2D()
getBounds2D in class javax.media.jai.ROIpublic int getThreshold()
getThreshold in class javax.media.jai.ROIUnsupportedOperationException - if calledpublic javax.media.jai.ROI intersect(javax.media.jai.ROI roi)
roi.
This is only possible if roi is an instance of ROIGeometry
or ROIShape.
intersect in class javax.media.jai.ROIroi - the ROI to intersect with
UnsupportedOperationException - if roi is not an instance
of ROIGeometry or ROIShapepublic boolean intersects(Rectangle rect)
intersects in class javax.media.jai.ROIrect - the rectangle
true if there is an intersection; false otherwisepublic boolean intersects(Rectangle2D rect)
intersects in class javax.media.jai.ROIrect - the rectangle
true if there is an intersection; false otherwise
public boolean intersects(int x,
int y,
int w,
int h)
intersects in class javax.media.jai.ROIx - rectangle origin X ordinatey - rectangle origin Y ordinatew - rectangle widthh - rectangle height
true if there is an intersection; false otherwise
public boolean intersects(double x,
double y,
double w,
double h)
intersects in class javax.media.jai.ROIx - rectangle origin X ordinatey - rectangle origin Y ordinatew - rectangle widthh - rectangle height
true if there is an intersection; false otherwise
public javax.media.jai.ROI performImageOp(RenderedImageFactory RIF,
ParameterBlock paramBlock,
int sourceIndex,
RenderingHints renderHints)
performImageOp in class javax.media.jai.ROIUnsupportedOperationException - if called
public javax.media.jai.ROI performImageOp(String name,
ParameterBlock paramBlock,
int sourceIndex,
RenderingHints renderHints)
performImageOp in class javax.media.jai.ROIUnsupportedOperationException - if calledpublic void setThreshold(int threshold)
setThreshold in class javax.media.jai.ROIUnsupportedOperationException - if calledpublic javax.media.jai.ROI subtract(javax.media.jai.ROI roi)
subtract in class javax.media.jai.ROIUnsupportedOperationException - if called
public javax.media.jai.ROI transform(AffineTransform at,
javax.media.jai.Interpolation interp)
transform in class javax.media.jai.ROIat - the transforminterp - ignored
public javax.media.jai.ROI transform(AffineTransform at)
transform in class javax.media.jai.ROIat - the transform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||