|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.gpf.internal.OperatorProductReader
public class OperatorProductReader
The OperatorProductReader is an adapter class that wraps
Operators to BEAM ProductReaders. It enables
the usage of BEAM Products inside of this framework without
the necessity to make changes on the Product's signature.
| Constructor Summary | |
|---|---|
OperatorProductReader(OperatorContext operatorContext)
Creates a OperatorProductReader instance. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the access to all currently opened resources such as file input streams and all resources of this children directly owned by this reader. |
Object |
getInput()
Retrives the current input destination object. |
OperatorContext |
getOperatorContext()
|
ProductReaderPlugIn |
getReaderPlugIn()
Returns the plug-in which created this product reader. |
ProductSubsetDef |
getSubsetDef()
Returns the subset information with which this a data product is read from its physical source. |
void |
readBandRasterData(Band destBand,
int destOffsetX,
int destOffsetY,
int destWidth,
int destHeight,
ProductData destBuffer,
com.bc.ceres.core.ProgressMonitor pm)
Reads raster data from the data source specified by the given destination band into the given in-memory buffer and region. |
Product |
readProductNodes(Object input,
ProductSubsetDef subsetDef)
Reads a data product and returns a in-memory representation of it. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OperatorProductReader(OperatorContext operatorContext)
OperatorProductReader instance.
operatorContext - the operator context| Method Detail |
|---|
public OperatorContext getOperatorContext()
public Object getInput()
ProductReadernull if the
setInput has not been called so far.
getInput in interface ProductReaderpublic ProductReaderPlugIn getReaderPlugIn()
ProductReader
getReaderPlugIn in interface ProductReadernullpublic ProductSubsetDef getSubsetDef()
ProductReader
getSubsetDef in interface ProductReadernull
public Product readProductNodes(Object input,
ProductSubsetDef subsetDef)
throws IOException
ProductReaderThe given subset info can be used to specify spatial and spectral portions of the original proudct. If the subset is omitted, the complete product is read in.
Whether the band data - the actual pixel values - is read in immediately or later when pixels are requested, is up to the implementation.
readProductNodes in interface ProductReaderinput - an object representing a valid output for this product reader, might be a
ImageInputStream or other Object to use for future decoding.subsetDef - a spectral or spatial subset (or both) of the product. If null, the entire product
is read in
IOException - if an I/O error occurs
IllegalFileFormatException - if the file format is illegal
public void readBandRasterData(Band destBand,
int destOffsetX,
int destOffsetY,
int destWidth,
int destHeight,
ProductData destBuffer,
com.bc.ceres.core.ProgressMonitor pm)
throws IOException
ProductReaderProductSubsetDef instance attached to it, the method
should also consider the specified spatial subset and sub-sampling (if any) applied to the destination band.
destOffsetX,
destOffsetY, destWidth and destHeight parameters are given in the band's
raster co-ordinates of the raster which results after applying the optional spatial subset and
sub-sampling given by the ProductSubsetDef instance to the data source. If no spatial subset
and sub-sampling is specified, the destination co-ordinates are identical with the source co-ordinates. The
destination region should always specify a sub-region of the band's scene raster.
destOffsetX and destOffsetY of the destination region. The offset parameters are
not an offset within the buffer.destWidth *
destHeight. The pixel values read are stored in line-by-line order, so the raster X co-ordinate varies
faster than the Y co-ordinate.
readBandRasterData in interface ProductReaderdestBand - the destination band which identifies the data source from which to read the sample valuesdestOffsetX - the X-offset in the band's raster co-ordinatesdestOffsetY - the Y-offset in the band's raster co-ordinatesdestWidth - the width of region to be read given in the band's raster co-ordinatesdestHeight - the height of region to be read given in the band's raster co-ordinatesdestBuffer - the destination buffer which receives the sample values to be read
IOException - if an I/O error occursRasterDataNode.getSceneRasterWidth(),
RasterDataNode.getSceneRasterHeight()
public void close()
throws IOException
ProductReaderThis method should be called only if it is for sure that this object instance will never be used again. The
results of referencing an instance of this class after a call to close() are undefined.
Overrides of this method should always call super.close(); after disposing this instance.
close in interface ProductReaderIOException - if an I/O error occurspublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||