|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.raster.IlvRasterAbstractReader
ilog.views.maps.format.image.IlvRasterBasicImageReader
public class IlvRasterBasicImageReader
GIF,JPG,PNG or TIFF reader that creates reprojectable and pixel-on-demand images. Example of use:
// 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);
| Field Summary |
|---|
| Fields inherited from class ilog.views.maps.raster.IlvRasterAbstractReader |
|---|
needReload |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvRasterBasicImageReader()
public IlvRasterBasicImageReader(IlvInputStream stream)
throws IlvReadFileException
stream - Stream to read from.
IlvReadFileException| Method Detail |
|---|
public 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 - xlon1 - ylat1 - xlon2 - ylat2 -
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||