public class IlvComputedRasterReader extends IlvRasterAbstractReader
IlvImageComputation
set.
// Create the reader IlvComputedRasterReader reader = new IlvComputedRasterReader(manager); // set the image computation object reader.setImageComputation(imageComputation); // use the reader in a tiled data source IlvTiledRasterDataSource ds = IlvRasterDataSourceFactory.buildTiledImageDataSource(manager, reader, true, true, null);
needReload
Constructor and Description |
---|
IlvComputedRasterReader(IlvInputStream stream)
The stream constructor.
|
IlvComputedRasterReader(IlvManager manager)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
IlvCoordinateSystem |
getCoordinateSystem()
Returns a WGS84 coordinate system.
|
IlvImageComputation |
getImageComputation()
Returns the instance of the image builder used to make, or recreate, the
computed image.
|
IlvMathTransform |
getInternalTransformation(int imageIndex)
Returns
null . |
static int |
getMaxImageSize()
Returns the maximum image area, that is the
width x height . |
IlvFeatureAttributeProperty |
getProperties(int imageIndex)
Returns
null . |
static int |
getWarningImageHeight()
Returns the maximum height acceptable for a computed image
before a warning message is displayed.
|
static int |
getWarningImageWidth()
Returns the maximum width acceptable for a computed image before a
warning message is displayed.
|
static void |
getWarningImageWidth(int warningImageWidth)
Indicates that trying to create images with a width greater than the
parameter passed will lead to a warning message being displayed.
|
static boolean |
isAllowMessages()
Returns
true if messages should be displayed. |
void |
reload(IlvThreadMonitoringData monitorInfo)
Removes all images, then recreates a new one using style information
and image computation.
|
void |
restart()
Rewinds the iterator for a new use.
|
static void |
setAllowMessages(boolean allowMessages)
Indicates whether messages should be displayed.
|
void |
setImageComputation(IlvImageComputation imageBuilder)
Sets the image builder instance that will be used to make, or recreate,
the computed image.
|
static void |
setMaxImageSize(int max_image_size)
Indicates that images with an area greater than the parameter passed will
not be created.
|
void |
setStyle(IlvGradientRasterStyle style)
Sets the style used for retrieving the image bounds and calling
IlvImageComputation.buildImage(IlvRasterProperties, IlvThreadMonitoringData, IlvManager, IlvGradientRasterStyle) . |
static void |
setWarningImageHeight(int warningImageHeight)
Indicates that trying to create images with a height greater than the
parameter passed will lead to a warning message being displayed.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object to an output stream.
|
addRaster, computeGisImageBounds, computeLimits, createRasterTileLoader, dispose, getDefaultFeatureRenderer, getDefaultMaximumIntervalsForDeterminingImageLocation, getImageBounds, getImageCount, getInverseTransformation, getLowerRightCorner, getLowerRightCorner, getMaximumIntervalsForDeterminingImageLocation, getNextFeature, getRasterMappedBuffer, getRasterProperties, getTileLoader, getTileLoader, getTileLoaders, getTransformation, getUpperLeftCorner, getUpperLeftCorner, isForceImageLoadingWhenSaving, isGeoreferenced, isHighQualityRendering, isNeedReload, removeRaster, setDefaultMaximumIntervalsForDeterminingImageLocation, setForceImageLoadingWhenSaving, setHighQualityRendering, setMaximumIntervalsForDeterminingImageLocation, setTransformation
public IlvComputedRasterReader(IlvManager manager)
manager
- The manager used for calls to
IlvImageComputation.buildImage(IlvRasterProperties, IlvThreadMonitoringData, IlvManager, IlvGradientRasterStyle)
.public IlvComputedRasterReader(IlvInputStream stream) throws IlvReadFileException
stream
- The stream to read from.IlvReadFileException
- if there is a problem reading from
stream
.public void setImageComputation(IlvImageComputation imageBuilder)
imageBuilder
- The image computing object.public IlvImageComputation getImageComputation()
public void setStyle(IlvGradientRasterStyle style)
IlvImageComputation.buildImage(IlvRasterProperties, IlvThreadMonitoringData, IlvManager, IlvGradientRasterStyle)
.
Calling this method indicates to the reader that it needs a reload.style
- The style to set.public IlvMathTransform getInternalTransformation(int imageIndex)
null
.getInternalTransformation
in class IlvRasterAbstractReader
imageIndex
- The index of the raster.null
.IlvRasterAbstractReader.getInternalTransformation(int)
public IlvCoordinateSystem getCoordinateSystem()
IlvMapFeatureIterator.getCoordinateSystem()
public IlvFeatureAttributeProperty getProperties(int imageIndex)
null
.getProperties
in class IlvRasterAbstractReader
imageIndex
- The index of the image.null
.IlvRasterAbstractReader.getProperties(int)
public void reload(IlvThreadMonitoringData monitorInfo)
reload
in class IlvRasterAbstractReader
monitorInfo
- Thread monitoring data.IlvRasterAbstractReader.reload(ilog.views.maps.raster.datasource.IlvThreadMonitoringData)
public static boolean isAllowMessages()
true
if messages should be displayed.true
is returned.public static void setAllowMessages(boolean allowMessages)
allowMessages
- Set to true
to indicate that messages
should be displayed.public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
write
in class IlvRasterAbstractReader
stream
- The output stream.IOException
- when an exception occurs during
the write operation for this object.public static int getMaxImageSize()
width x height
.public static void setMaxImageSize(int max_image_size)
width x height
of the image must be less
than max_image_size
.
Using this method prevents too much memory being allocating if the
computed image is too large.
When the image area is bigger than max_image_size
, a
smaller image is created. This is done by changing the style precision
based on the values returned by getWarningImageHeight()
and
getWarningImageWidth()
.
A message may be displayed to the user to indicate the change.
Note: the default value is 10,000,000
pixels.
max_image_size
- The maximum image area.setAllowMessages(boolean)
public static int getWarningImageHeight()
public static void setWarningImageHeight(int warningImageHeight)
warningImageHeight
, a warning message may be displayed to the
user.
If he or she accepts to reduce the image precision, or if no message is
allowed, a smaller image is created. This is done by changing the style
precision until the resulting number of pixels is less than
warningImageHeight
.
Note: the default value is 1000
.
warningImageHeight
- The maximum image height.setAllowMessages(boolean)
public static int getWarningImageWidth()
public static void getWarningImageWidth(int warningImageWidth)
warningImageWidth
, a warning message is displayed to the
user. If he or she aggrees to reduce the image precision, or if no message
is allowed, a smaller image will be created. This is done by changing the
style precision until the resulting width is less than
warningImageWidth
.
Note: the default value is 1000
.
warningImageWidth
- The maximum image width.setAllowMessages(boolean)
public void restart()
restart
in interface IlvMapReusableFeatureIterator
restart
in class IlvRasterAbstractReader
IlvMapReusableFeatureIterator.restart()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.