|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIIOParam
ImageReadParam
GeoToolsReadParams
public abstract class GeoToolsReadParams
This class is the base class for building adapters/extensions to the ImageIO
ImageReadParam
class for controlling the processing of reading a
coverage from an ImageReader
.
modules/library/coverage (gt-coverage.jar)
Field Summary | |
---|---|
protected ImageReadParam |
adaptee
The ImageReadParam we are adapting/exteding. |
protected Dimension[] |
preferredTileSizes
An array of preferred tile size range pairs. |
protected int |
tileHeight
The height of each tile if tiling has been set, or 0 otherwise. |
protected int |
tileWidth
The width of each tile if tiling has been set, or 0 otherwise. |
protected boolean |
tilingSet
A boolean that is true if tiling parameters
have been specified. |
Fields inherited from class ImageReadParam |
---|
canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize |
Fields inherited from class IIOParam |
---|
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset |
Constructor Summary | |
---|---|
GeoToolsReadParams()
Default contructor. |
Method Summary | |
---|---|
Dimension[] |
getPreferredTileSizes()
Returns an array of Dimension s indicating the legal size
ranges for tiles. |
int |
getTileHeight()
Returns the width of each tile in an raster as it will be reader If tiling parameters have not been set, an IllegalStateException is thrown. |
int |
getTileWidth()
Returns the width of each tile in an raster as it will be reader If tiling parameters have not been set, an IllegalStateException is thrown. |
void |
setTiling(int tileWidth,
int tileHeight)
Specifies that the image should be tiled. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ImageReadParam adaptee
ImageReadParam
we are adapting/exteding.
protected Dimension[] preferredTileSizes
null
, which indicates that there are no preferred sizes.
If the value is non-null
, it must have an even length of
at least two.
Subclasses that do not support reading tiles may ignore this value.
getPreferredTileSizes()
protected int tileWidth
Subclasses that do not support tiling may ignore this value.
protected int tileHeight
0
.
Subclasses that do not support tiling may ignore this value.
protected boolean tilingSet
boolean
that is true
if tiling parameters
have been specified.
Subclasses that do not support reading tiles may ignore this value.
Constructor Detail |
---|
public GeoToolsReadParams()
Method Detail |
---|
public int getTileWidth()
IllegalStateException
is thrown.
IllegalStateException
- if the tiling parameters have not been set.#setTiling(int, int, int, int)
,
getTileHeight()
public int getTileHeight()
IllegalStateException
is thrown.
IllegalStateException
- if the tiling parameters have not been set.#setTiling(int, int, int, int)
,
getTileWidth()
public void setTiling(int tileWidth, int tileHeight)
tileWidth
and tileHeight
parameters specify the width and height of
the tiles in memory. If the tile width or height is greater than the
width or height of the image, the image is not tiled in that dimension.
tileWidth
- the width of each tile.tileHeight
- the height of each tile.
IllegalArgumentException
- if the tile size is not within one of the allowable ranges
returned by getPreferredTileSizes
.
IllegalArgumentException
- if tileWidth
or tileHeight
is less than or equal to 0.#canWriteTiles
,
#canOffsetTiles
,
getTileWidth()
,
getTileHeight()
,
#getTileGridXOffset()
,
#getTileGridYOffset()
public Dimension[] getPreferredTileSizes()
Dimension
s indicating the legal size
ranges for tiles. The returned array is a copy.
The information is returned as a set of pairs; the first element of a
pair contains an (inclusive) minimum width and height, and the second
element contains an (inclusive) maximum width and height. Together, each
pair defines a valid range of sizes. To specify a fixed size, use the
same width and height for both elements. To specify an arbitrary range, a
value of null
is used in place of an actual array of
Dimension
s.
If no array is specified on the constructor, but tiling is allowed, then
this method returns null
.
Dimension
s with an even length of at
least two, or null
.
UnsupportedOperationException
- if the plug-in does not support tiling.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |