public class IlvRasterTileLoader extends Object implements IlvTileLoader, IlvPersistentObject
Constructor and Description |
---|
IlvRasterTileLoader(IlvInputStream stream)
Reads the raster info from the specified input stream.
|
IlvRasterTileLoader(IlvRasterProperties rasterProperties,
IlvRasterMappedBuffer rasterMappedBuffer,
IlvCoordinateTransformation transformation)
Constructor taking as parameters the information about the raster and the
data in two separated objects.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getBytePixel(IlvCoordinate pret,
int noData)
Compute the pixel value.
|
IlvMathTransform |
getInternalTransformation()
Returns the internal transformation from lat/lon to raster x/y.
|
protected int |
getIntPixel(IlvCoordinate pret,
int noData)
Compute the pixel value.
|
int |
getPreviewDelay()
Returns the preview Delay.
|
int |
getPreviewSubsampling()
Returns the subsampling factor for a possible preview image.
|
IlvAttributeProperty |
getProperties()
The image properties.
|
IlvRasterMappedBuffer |
getRasterMappedBuffer()
Return the data of the raster of the original image.
|
IlvRasterProperties |
getRasterProperties()
Accesses the information about the raster of the image.
|
ImageProducer |
getRawImageProducer()
Returns an image producer to return the whole unprojected image.
|
ImageProducer |
getScaledImageProducer(int subsampling,
IlvRect managerBounds)
Returns an image producer able to generate an image for the parameters
passed.
|
IlvCoordinateTransformation |
getTransformation()
Returns Coordinate transformation to attach the image to a manager.
|
boolean |
isHighQualityRendering()
Indicates if the icon should be rendered high quality.
|
static boolean |
isLoadRetryingOnOutOfMemory()
Indicates whether
load(IlvTile) should manage the OutOfMemoryError when a JITDataLoader is set on the image. |
boolean |
isPersistent()
Returns true if the object must be saved by a tile controller.
|
boolean |
isSynchronous()
Tests if this raster tile loader is loading images synchronously or not.
|
void |
load(IlvTile tile)
Function called when a tile has to be loaded.
|
protected IlvRasterIcon |
makeIcon(int subsampling,
Point2D.Double p1,
Point2D.Double p2)
Factory of icons from the subsampling and two corners parameters.
|
protected void |
rasterTileLoaded(IlvTile tile)
This method is called when a raster tile has been loaded.
|
void |
release(IlvTile tile)
Function called when a tile has to be released.
|
void |
setHighQualityRendering(boolean value)
Changes the rendering quality state of the image.
|
static void |
setLoadRetryingOnOutOfMemory(boolean loadRetryingOnOutOfMemory)
Indicates whether
load(IlvTile) should manage the OutOfMemoryError when a JITDataLoader is set on the image. |
void |
setPreviewSubsampling(int previewSubsampling,
int previewDelay)
Sets the subsampling factor for a possible preview image.
|
void |
setProperties(IlvAttributeProperty properties)
Sets the properties that will affect the image when it is created.
|
void |
setSynchronous(boolean synchronous)
Sets the synchronous image loading policy for this tile loader.
|
void |
setTransformation(IlvCoordinateTransformation transformation)
Sets the coordinate transformation to use for creating an image attached to
a manager.
|
protected void |
setupIcon(IlvRasterIcon icon)
Sets up the icon.
|
void |
write(IlvOutputStream out)
Writes the tile loader to an
IlvOutputStream |
public IlvRasterTileLoader(IlvInputStream stream) throws IlvReadFileException
stream
- The input stream.IlvReadFileException
- if an error occurs while reading the data.public IlvRasterTileLoader(IlvRasterProperties rasterProperties, IlvRasterMappedBuffer rasterMappedBuffer, IlvCoordinateTransformation transformation)
rasterProperties
- The information about the raster.rasterMappedBuffer
- The data of the raster of the original image.transformation
- The transformation to use from view to geographic coordinates.public IlvMathTransform getInternalTransformation()
public IlvRasterMappedBuffer getRasterMappedBuffer()
public final IlvRasterProperties getRasterProperties()
public ImageProducer getRawImageProducer()
public IlvCoordinateTransformation getTransformation()
public boolean isPersistent()
isPersistent
in interface IlvTileLoader
IlvTileLoader.isPersistent()
public static boolean isLoadRetryingOnOutOfMemory()
load(IlvTile)
should manage the OutOfMemoryError
when a JITDataLoader
is set on the image.true
if load(IlvTile)
blocks until some memory is freed.public static void setLoadRetryingOnOutOfMemory(boolean loadRetryingOnOutOfMemory)
load(IlvTile)
should manage the OutOfMemoryError
when a JITDataLoader
is set on the image.loadRetryingOnOutOfMemory
- If set to true
, load
will sleep and try loading the data again later.
In 8.5 and above, the default is true
public void load(IlvTile tile) throws Exception
IlvTile.loadComplete
to notify the
tile listeners.load
in interface IlvTileLoader
Exception
IlvTileLoader.load(ilog.views.tiling.IlvTile)
protected void rasterTileLoaded(IlvTile tile)
tile
- The tile that just loaded.protected IlvRasterIcon makeIcon(int subsampling, Point2D.Double p1, Point2D.Double p2)
subsampling
- Initial subsampling of the image created.p1
- The definition rectangle of the object.p2
- The definition rectangle of the object.protected void setupIcon(IlvRasterIcon icon)
icon
- Icon to setup.public void release(IlvTile tile)
release
in interface IlvTileLoader
IlvTileLoader.release(ilog.views.tiling.IlvTile)
public void setHighQualityRendering(boolean value)
true
will improve the rendering. The default value is
false
.value
- The value.public boolean isHighQualityRendering()
true
if the icon is high quality.public void setProperties(IlvAttributeProperty properties)
properties
- Feature properties that will affect the image.public void setTransformation(IlvCoordinateTransformation transformation)
transformation
- Coordinate transformation from view to geographic coordinates to
attach the image to a manager.public void write(IlvOutputStream out) throws IOException
IlvOutputStream
write
in interface IlvPersistentObject
write
in interface IlvTileLoader
out
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
protected int getBytePixel(IlvCoordinate pret, int noData)
pret
- Manager x,y coordinate.noData
- Value to return when no pixel is present at the location.noData
.protected int getIntPixel(IlvCoordinate pret, int noData)
pret
- Manager x,y coordinate.noData
- Value to return when no pixel is present at the location.noData
.public ImageProducer getScaledImageProducer(int subsampling, IlvRect managerBounds)
subsampling
- Subsampling to apply to the image.managerBounds
- Manager bounds of the image.public int getPreviewSubsampling()
public void setPreviewSubsampling(int previewSubsampling, int previewDelay)
previewSubsampling
- The subsampling factor for a possible preview image.previewDelay
- The time in ms where the preview will be visible (for example
500ms).public IlvAttributeProperty getProperties()
public int getPreviewDelay()
public boolean isSynchronous()
true
is returned.public void setSynchronous(boolean synchronous)
synchronous
- Set to true
to load images synchronously.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.