public class IlvRasterBasicImageReader extends IlvRasterAbstractReader
// create a raster reader for the gif file IlvRasterBasicImageReader imageReader = new IlvRasterBasicImageReader(); imageReader.addMap(gifFile.getFile()); // georeference this image (it covers the whole earth) imageReader.setImageBounds(0,-Math.PI,Math.PI/2,Math.PI,-Math.PI/2); // create a datasource for the gif file. IlvMapDataSource imageDataSource = IlvRasterDataSourceFactory.buildTiledImageDataSource(manager,imageReader,true,true,null);
needReload| Constructor and Description |
|---|
IlvRasterBasicImageReader()
Default constructor to create on-demand pixel JPG,TIFF,GIF or PNG images.
|
IlvRasterBasicImageReader(IlvInputStream stream)
Constructor to reconstruct an image reader from saved information.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMap(String file)
Adds an image to read.
|
boolean |
addMap(URL url)
Adds an image to read.
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the associated coordinate system or
null if none has been set. |
IlvMathTransform |
getInternalTransformation(int imageIndex)
Return the projection associated with the raster stored at the given
index.
|
IlvFeatureAttributeProperty |
getProperties(int imageIndex)
Returns the feature properties to be associated with the image.
|
void |
reload(IlvThreadMonitoringData monitorInfo)
Given the state of the reader (the number of images read, coverage zone,...), the purpose of this method
is to recreate all images from the original source.
|
void |
setImageBounds(int imageIndex,
double xlon1,
double ylat1,
double xlon2,
double ylat2)
Sets the internal transformation to place image at specified lat/lon.
|
void |
setInternalTransformation(IlvMathTransform transformation)
Specifies a mathematical transform to apply when reading the image.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
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, restart, setDefaultMaximumIntervalsForDeterminingImageLocation, setForceImageLoadingWhenSaving, setHighQualityRendering, setMaximumIntervalsForDeterminingImageLocation, setTransformationpublic IlvRasterBasicImageReader()
public IlvRasterBasicImageReader(IlvInputStream stream) throws IlvReadFileException
stream - Stream to read from.IlvReadFileExceptionpublic IlvMathTransform getInternalTransformation(int imageIndex)
getInternalTransformation in class IlvRasterAbstractReaderimageIndex - The index of the raster.IlvRasterAbstractReader.getInternalTransformation(int)public boolean addMap(String file)
file - file to read.true if image is loaded.public boolean addMap(URL url)
url - url of the image file.true if image is loaded.public void write(IlvOutputStream stream) throws IOException
write in interface IlvPersistentObjectwrite in class IlvRasterAbstractReaderstream - The output stream.IOException - thrown when an exception occurs during
the write operation for this object.public void reload(IlvThreadMonitoringData monitorInfo)
IlvRasterProperties of the reader as they
might not be saved when the theme only is saved.reload in class IlvRasterAbstractReadermonitorInfo - Used to update task progress.public void setInternalTransformation(IlvMathTransform transformation)
transformation - interpolation and/or reprojection operation.public IlvCoordinateSystem getCoordinateSystem()
null if none has been set.public IlvFeatureAttributeProperty getProperties(int imageIndex)
getProperties in class IlvRasterAbstractReaderimageIndex - The index of the image.IlvRasterAbstractReader.getProperties(int)public void setImageBounds(int imageIndex,
double xlon1,
double ylat1,
double xlon2,
double ylat2)
imageIndex - Index of the image.xlon1 - Western-most longitude in Radians.ylat1 - Northern-most latitude in Radians.xlon2 - Eastern-most longitude in Radians.ylat2 - Southern-most latitude in Radians.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.