|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bc.ceres.core.ExtensibleObject
org.esa.beam.framework.datamodel.ProductNode
org.esa.beam.framework.datamodel.DataNode
org.esa.beam.framework.datamodel.RasterDataNode
org.esa.beam.framework.datamodel.AbstractBand
org.esa.beam.framework.datamodel.Band
org.esa.beam.framework.datamodel.VirtualBand
public class VirtualBand
A band contains the data for geophysical parameter in remote sensing data products. Bands are two-dimensional images
which hold their pixel values (samples) in a buffer of the type ProductData. The band class is just a
container for attached metadata of the band, currently:
FlagCodinggetPixel and readPixel methods of this class do not necessarily return the
values contained in the data buffer of type ProductData. If the scalingFactor,
scalingOffset or log10Scaled are set a conversion of the form scalingFactor *
rawSample + scalingOffset is applied to the raw samples before the getPixel and
readPixel methods return the actual pixel values. If the log10Scaled property is true then
the conversion is pow(10, scalingFactor * rawSample + scalingOffset). The several setPixel
and writePixel perform the inverse operations in this case.
ProductData| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.esa.beam.framework.datamodel.RasterDataNode |
|---|
RasterDataNode.RasterDataDoubleList, RasterDataNode.RasterDataProcessor |
| Field Summary | |
|---|---|
static String |
PROPERTY_NAME_EXPRESSION
|
static String |
PROPERTY_NAME_WRITE_DATA
Deprecated. since 4.9, no replacement |
| Fields inherited from class org.esa.beam.framework.datamodel.Band |
|---|
PROPERTY_NAME_SAMPLE_CODING, PROPERTY_NAME_SOLAR_FLUX, PROPERTY_NAME_SPECTRAL_BAND_INDEX, PROPERTY_NAME_SPECTRAL_BANDWIDTH, PROPERTY_NAME_SPECTRAL_WAVELENGTH |
| Fields inherited from class org.esa.beam.framework.datamodel.AbstractBand |
|---|
VIEW_MODE_FORWARD, VIEW_MODE_NADIR, VIEW_MODE_ORTHO |
| Fields inherited from class org.esa.beam.framework.datamodel.RasterDataNode |
|---|
INVALID_POS_TEXT, IO_ERROR_TEXT, NO_DATA_TEXT, NOT_LOADED_TEXT, PROPERTY_NAME_GEOCODING, PROPERTY_NAME_IMAGE_INFO, PROPERTY_NAME_LOG_10_SCALED, PROPERTY_NAME_NO_DATA_VALUE, PROPERTY_NAME_NO_DATA_VALUE_USED, PROPERTY_NAME_ROI_DEFINITION, PROPERTY_NAME_SCALING_FACTOR, PROPERTY_NAME_SCALING_OFFSET, PROPERTY_NAME_STX, PROPERTY_NAME_VALID_PIXEL_EXPRESSION |
| Fields inherited from class org.esa.beam.framework.datamodel.DataNode |
|---|
PROPERTY_NAME_DATA, PROPERTY_NAME_READ_ONLY, PROPERTY_NAME_SYNTHETIC, PROPERTY_NAME_UNIT |
| Fields inherited from class org.esa.beam.framework.datamodel.ProductNode |
|---|
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME |
| Fields inherited from interface org.esa.beam.framework.datamodel.Scaling |
|---|
IDENTITY |
| Constructor Summary | |
|---|---|
VirtualBand(String name,
int dataType,
int width,
int height,
String expression)
Constructs a new Band. |
|
| Method Summary | |
|---|---|
void |
acceptVisitor(ProductVisitor visitor)
Accepts the given visitor. |
protected RenderedImage |
createSourceImage()
Creates the source image associated with this RasterDataNode. |
static com.bc.ceres.glevel.MultiLevelImage |
createVirtualSourceImage(RasterDataNode raster,
String expression)
Non-API. |
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children. |
String |
getExpression()
|
long |
getRawStorageSize(ProductSubsetDef subsetDef)
Gets an estimated raw storage size in bytes of this product node. |
void |
setExpression(String expression)
|
void |
setPixelDouble(int x,
int y,
double pixelValue)
Sets the pixel value at the given pixel coordinate to the given pixel value. |
void |
setPixelFloat(int x,
int y,
float pixelValue)
Sets the pixel at the given pixel coordinate to the given pixel value. |
void |
setPixelInt(int x,
int y,
int pixelValue)
Sets the pixel at the given pixel co-ordinate to the given pixel value. |
String |
toString()
Creates a string defining this band object. |
void |
updateExpression(String oldExternalName,
String newExternalName)
Asks a product node to replace all occurences of and references to the node name given by oldExternalName with oldExternalName. |
void |
writePixels(int x,
int y,
int w,
int h,
double[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
Retrieves the range of pixels specified by the coordinates as double array. |
void |
writePixels(int x,
int y,
int w,
int h,
float[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
Retrieves the range of pixels specified by the coordinates as float array. |
void |
writePixels(int x,
int y,
int w,
int h,
int[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
Retrieves the range of pixels specified by the coordinates as integer array. |
| Methods inherited from class org.esa.beam.framework.datamodel.Band |
|---|
computeStxImpl, createDefaultImageInfo, getFlagCoding, getIndexCoding, getSampleCoding, getSolarFlux, getSpectralBandIndex, getSpectralBandwidth, getSpectralWavelength, isFlagBand, isIndexBand, readRasterData, readRasterDataFully, removeFromFile, setSampleCoding, setSolarFlux, setSpectralBandIndex, setSpectralBandwidth, setSpectralWavelength, writeRasterData, writeRasterDataFully |
| Methods inherited from class org.esa.beam.framework.datamodel.AbstractBand |
|---|
computeBand, ensureMinLengthArray, ensureMinLengthArray, ensureMinLengthArray, ensureRasterData, getPixelDouble, getPixelFloat, getPixelInt, getPixels, getPixels, getPixels, getSceneRasterData, getViewModeId, loadRasterData, readPixels, readPixels, readPixels, setPixels, setPixels, setPixels, unloadRasterData |
| Methods inherited from class org.esa.beam.framework.datamodel.DataNode |
|---|
checkDataCompatibility, createCompatibleProductData, fireProductNodeDataChanged, getData, getDataElems, getDataElemSize, getDataType, getNumDataElems, getUnit, isReadOnly, isSynthetic, setData, setDataElems, setReadOnly, setSynthetic, setUnit |
| Methods inherited from class org.esa.beam.framework.datamodel.ProductNode |
|---|
fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, setDescription, setName, setOwner |
| Methods inherited from class com.bc.ceres.core.ExtensibleObject |
|---|
getExtension |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_NAME_EXPRESSION
@Deprecated public static final String PROPERTY_NAME_WRITE_DATA
| Constructor Detail |
|---|
public VirtualBand(String name,
int dataType,
int width,
int height,
String expression)
Band.
name - the name of the new objectdataType - the raster data type, must be one of the multiple ProductData.TYPE_X
constants, with the exception of ProductData.TYPE_UINT32width - the width of the raster in pixelsheight - the height of the raster in pixelsexpression - the expression code| Method Detail |
|---|
public String getExpression()
public void setExpression(String expression)
public void updateExpression(String oldExternalName,
String newExternalName)
oldExternalName with oldExternalName. Such references most often occur
in band arithmetic expressions.
updateExpression in class RasterDataNodeoldExternalName - The old node name.newExternalName - The new node name.
public void setPixelInt(int x,
int y,
int pixelValue)
AbstractBand
setPixelInt in class AbstractBandx - The X co-ordinate of the pixel locationy - The Y co-ordinate of the pixel locationpixelValue - the new pixel value
public void setPixelFloat(int x,
int y,
float pixelValue)
AbstractBand
setPixelFloat in class AbstractBandx - The X co-ordinate of the pixel locationy - The Y co-ordinate of the pixel locationpixelValue - the new pixel value
public void setPixelDouble(int x,
int y,
double pixelValue)
AbstractBand
setPixelDouble in class AbstractBandx - The X co-ordinate of the pixel locationy - The Y co-ordinate of the pixel locationpixelValue - the new pixel value
public void writePixels(int x,
int y,
int w,
int h,
int[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
throws IOException
writePixels in class AbstractBandx - x offset into the bandy - y offset into the bandw - width of the pixel array to be readh - height of the pixel array to be read.pixels - integer array to be filled with datapm - a monitor to inform the user about progress
IOException
public void writePixels(int x,
int y,
int w,
int h,
float[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
throws IOException
writePixels in class AbstractBandx - x offset into the bandy - y offset into the bandw - width of the pixel array to be readh - height of the pixel array to be read.pixels - float array to be filled with datapm - a monitor to inform the user about progress
IOException
public void writePixels(int x,
int y,
int w,
int h,
double[] pixels,
com.bc.ceres.core.ProgressMonitor pm)
throws IOException
writePixels in class AbstractBandx - x offset into the bandy - y offset into the bandw - width of the pixel array to be readh - height of the pixel array to be read.pixels - double array to be filled with datapm - a monitor to inform the user about progress
IOExceptionpublic void acceptVisitor(ProductVisitor visitor)
The method simply calls visitor.visit(this).
acceptVisitor in class Bandvisitor - the visitor, must not be nullpublic long getRawStorageSize(ProductSubsetDef subsetDef)
getRawStorageSize in class BandsubsetDef - if not null the subset may limit the size returned
public String toString()
toString in class Bandpublic void dispose()
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 dispose() are undefined.
Overrides of this method should always call super.dispose(); after disposing this instance.
dispose in class Bandprotected RenderedImage createSourceImage()
RasterDataNodeRasterDataNode.
This shall preferably be a MultiLevelImage instance.
createSourceImage in class Band
public static com.bc.ceres.glevel.MultiLevelImage createVirtualSourceImage(RasterDataNode raster,
String expression)
raster - The raster data node.expression - The band-arithmetic expression.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||