|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.PropertySourceImpl
org.geotools.coverage.AbstractCoverage.Renderable
protected class AbstractCoverage.Renderable
A view of a coverage as a renderable image. Renderable images allow interoperability with Java2D for a two-dimensional slice of a coverage (which may or may not be a grid coverage).
AbstractCoverage.getRenderableImage(int, int)
,
Serialized FormField Summary | |
---|---|
protected GeneralDirectPosition |
coordinate
A coordinate point where to evaluate the function. |
protected int |
xAxis
Dimension to use for x axis. |
protected int |
yAxis
Dimension to use for y axis. |
Fields inherited from class javax.media.jai.PropertySourceImpl |
---|
cachedPropertyNames, properties, propertySources |
Fields inherited from interface java.awt.image.renderable.RenderableImage |
---|
HINTS_OBSERVED |
Constructor Summary | |
---|---|
AbstractCoverage.Renderable(int xAxis,
int yAxis)
Constructs a renderable image. |
Method Summary | |
---|---|
java.awt.image.RenderedImage |
createDefaultRendering()
Returns a rendered image with a default width and height in pixels. |
protected java.awt.image.renderable.RenderContext |
createRenderContext(java.awt.geom.Rectangle2D gridBounds,
java.awt.RenderingHints hints)
Initializes a render context with an affine transform that maps the coverage envelope to the specified destination rectangle. |
java.awt.image.RenderedImage |
createRendering(java.awt.image.renderable.RenderContext context)
Creates a rendered image using a given render context. |
java.awt.image.RenderedImage |
createScaledRendering(int width,
int height,
java.awt.RenderingHints hints)
Creates a rendered image with width width and height height in pixels. |
void |
getElements(double startX,
double startY,
double deltaX,
double deltaY,
int countX,
int countY,
int element,
double[] real,
double[] imag)
Returns all values of a given element for a specified set of coordinates. |
void |
getElements(float startX,
float startY,
float deltaX,
float deltaY,
int countX,
int countY,
int element,
float[] real,
float[] imag)
Returns all values of a given element for a specified set of coordinates. |
float |
getHeight()
Gets the height in coverage coordinate space. |
float |
getMinX()
Gets the minimum X coordinate of the rendering-independent image data. |
float |
getMinY()
Gets the minimum Y coordinate of the rendering-independent image data. |
int |
getNumElements()
Returns the number of elements per value at each position. |
java.util.Vector<java.awt.image.renderable.RenderableImage> |
getSources()
Returns null to indicate that no source information is available. |
float |
getWidth()
Gets the width in coverage coordinate space. |
boolean |
isComplex()
Returns false since values are not complex. |
boolean |
isDynamic()
Returns true if successive renderings with the same arguments
may produce different results. |
Methods inherited from class javax.media.jai.PropertySourceImpl |
---|
getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.image.renderable.RenderableImage |
---|
getProperty, getPropertyNames |
Field Detail |
---|
protected final int xAxis
protected final int yAxis
protected final GeneralDirectPosition coordinate
y
ordinates will be ignored, since they will vary for each pixel
to be evaluated. Other ordinates, if any, should be set to a fixed value. For example a
coverage may be three-dimensional, where the third dimension is the time axis. In such
case, coordinate.ord[2]
should be set to the point in time where to evaluate the
coverage. By default, all ordinates are initialized to 0. Subclasses should set the
desired values in their constructor if needed.
Constructor Detail |
---|
public AbstractCoverage.Renderable(int xAxis, int yAxis)
xAxis
- Dimension to use for x axis.yAxis
- Dimension to use for y axis.Method Detail |
---|
public java.util.Vector<java.awt.image.renderable.RenderableImage> getSources()
null
to indicate that no source information is available.
getSources
in interface java.awt.image.renderable.RenderableImage
public boolean isDynamic()
true
if successive renderings with the same arguments
may produce different results. The default implementation returns false
.
isDynamic
in interface java.awt.image.renderable.RenderableImage
GridCoverage2D.isDataEditable()
public boolean isComplex()
false
since values are not complex.
isComplex
in interface javax.media.jai.ImageFunction
false
in default implementation.public float getWidth()
getWidth
in interface java.awt.image.renderable.RenderableImage
AbstractCoverage.getEnvelope()
,
AbstractCoverage.getCoordinateReferenceSystem()
public float getHeight()
getHeight
in interface java.awt.image.renderable.RenderableImage
AbstractCoverage.getEnvelope()
,
AbstractCoverage.getCoordinateReferenceSystem()
public float getMinX()
getMinX
in interface java.awt.image.renderable.RenderableImage
AbstractCoverage.getEnvelope()
,
AbstractCoverage.getCoordinateReferenceSystem()
public float getMinY()
getMinY
in interface java.awt.image.renderable.RenderableImage
AbstractCoverage.getEnvelope()
,
AbstractCoverage.getCoordinateReferenceSystem()
public java.awt.image.RenderedImage createDefaultRendering()
createDefaultRendering
in interface java.awt.image.renderable.RenderableImage
public java.awt.image.RenderedImage createScaledRendering(int width, int height, java.awt.RenderingHints hints)
width
and height height
in pixels.
If width
is 0, it will be computed automatically from height
. Conversely,
if height
is 0, il will be computed automatically from width
.
The default implementation creates a render context with createRenderContext(java.awt.geom.Rectangle2D, java.awt.RenderingHints)
and invokes createRendering(RenderContext)
.
createScaledRendering
in interface java.awt.image.renderable.RenderableImage
width
- The width of rendered image in pixels, or 0.height
- The height of rendered image in pixels, or 0.hints
- Rendering hints, or null
.
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext context)
ImageFunction
" operation if possible (i.e. if
the area of interect is rectangular and the affine transform contains only
translation and scale coefficients).
createRendering
in interface java.awt.image.renderable.RenderableImage
context
- The render context to use to produce the rendering.
protected java.awt.image.renderable.RenderContext createRenderContext(java.awt.geom.Rectangle2D gridBounds, java.awt.RenderingHints hints)
gridBounds
- The two-dimensional destination rectangle.hints
- The rendering hints, or null
if none.
GridGeometry2D.getGridToCRS2D()
.GridGeometry2D.getGridToCRS2D()
public int getNumElements()
getElements(...)
methods
invocation. The default implementation returns the number of sample
dimensions in the coverage.
getNumElements
in interface javax.media.jai.ImageFunction
public void getElements(float startX, float startY, float deltaX, float deltaY, int countX, int countY, int element, float[] real, float[] imag)
ImageFunction
" operator and the image
type is not double
. The default implementation invokes
AbstractCoverage.evaluate(DirectPosition,float[])
recursively.
getElements
in interface javax.media.jai.ImageFunction
public void getElements(double startX, double startY, double deltaX, double deltaY, int countX, int countY, int element, double[] real, double[] imag)
ImageFunction
" operator and the image
type is double
. The default implementation invokes
AbstractCoverage.evaluate(DirectPosition,double[])
recursively.
getElements
in interface javax.media.jai.ImageFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |