public class DimapProductReader extends AbstractProductReader
DimapProductReader
class is an implementation of the ProductReader
interface
exclusively for data products having the BEAM-DIMAP product format.DimapProductReaderPlugIn
,
DimapProductWriterPlugIn
Modifier and Type | Class and Description |
---|---|
static class |
DimapProductReader.ReaderExtender |
Constructor and Description |
---|
DimapProductReader(ProductReaderPlugIn readerPlugIn)
Construct a new instance of a product reader for the given BEAM-DIMAP product reader plug-in.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtender(DimapProductReader.ReaderExtender extender) |
void |
bindProduct(Object input,
Product existingProduct) |
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.
|
File |
getInputDir() |
File |
getInputFile() |
Product |
getProduct() |
protected Product |
processProduct(Product existingProduct) |
protected void |
readBandRasterDataImpl(int sourceOffsetX,
int sourceOffsetY,
int sourceWidth,
int sourceHeight,
int sourceStepX,
int sourceStepY,
Band destBand,
int destOffsetX,
int destOffsetY,
int destWidth,
int destHeight,
ProductData destBuffer,
ProgressMonitor pm)
The template method which is called by the
AbstractProductReader.readBandRasterDataImpl(int, int, int, int, int, int, Band, int, int, int, int, ProductData, com.bc.ceres.core.ProgressMonitor) }
method after an optional spatial subset has been applied to the input parameters. |
protected Product |
readProductNodesImpl()
Provides an implementation of the
readProductNodes interface method. |
configurePreferredTileSize, createTiePointGrid, getGridDiscontinutity, getInput, getProductComponents, getReaderPlugIn, getSubsetDef, isInstanceOfValidInputType, isMetadataIgnored, isNodeAccepted, readBandRasterData, readProductNodes, setInput, setSubsetDef, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
readTiePointGridRasterData
public DimapProductReader(ProductReaderPlugIn readerPlugIn)
readerPlugIn
- the given BEAM-DIMAP product writer plug-in, must not be null
public Product getProduct()
public File getInputDir()
public File getInputFile()
protected Product readProductNodesImpl() throws IOException
readProductNodes
interface method. Clients implementing this
method can be sure that the input object and eventually the subset information has already been set.
This method is called as a last step in the readProductNodes(input, subsetInfo)
method.
readProductNodesImpl
in class AbstractProductReader
IOException
- if an I/O error occursIllegalFileFormatException
- if the input file in not decodeablepublic void bindProduct(Object input, Product existingProduct) throws IOException
IOException
protected Product processProduct(Product existingProduct) throws IOException
IOException
protected void readBandRasterDataImpl(int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight, int sourceStepX, int sourceStepY, Band destBand, int destOffsetX, int destOffsetY, int destWidth, int destHeight, ProductData destBuffer, ProgressMonitor pm) throws IOException
AbstractProductReader.readBandRasterDataImpl(int, int, int, int, int, int, Band, int, int, int, int, ProductData, com.bc.ceres.core.ProgressMonitor)
}
method after an optional spatial subset has been applied to the input parameters.
The destination band, buffer and region parameters are exactly the ones passed to the original AbstractProductReader.readBandRasterDataImpl(int, int, int, int, int, int, org.esa.snap.core.datamodel.Band, int, int, int, int, org.esa.snap.core.datamodel.ProductData, com.bc.ceres.core.ProgressMonitor)
call. Since the
destOffsetX
and destOffsetY
parameters are already taken into acount in the
sourceOffsetX
and sourceOffsetY
parameters, an implementor of this method is free to
ignore them.
readBandRasterDataImpl
in class AbstractProductReader
sourceOffsetX
- the absolute X-offset in source raster co-ordinatessourceOffsetY
- the absolute Y-offset in source raster co-ordinatessourceWidth
- the width of region providing samples to be read given in source raster co-ordinatessourceHeight
- the height of region providing samples to be read given in source raster co-ordinatessourceStepX
- the sub-sampling in X direction within the region providing samples to be readsourceStepY
- the sub-sampling in Y direction within the region providing samples to be readdestBand
- the destination band which identifies the data source from which to read the sample valuesdestBuffer
- the destination buffer which receives the sample values to be readdestOffsetX
- 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-ordinatespm
- a monitor to inform the user about progressIOException
- if an I/O error occursAbstractProductReader.getSubsetDef()
public void close() throws IOException
This 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 ProductReader
close
in class AbstractProductReader
IOException
- if an I/O error occurspublic void addExtender(DimapProductReader.ReaderExtender extender)
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.