@OperatorMetadata(alias="WriteRGB", category="Input-Output", description="Creates an RGB image from three source bands.", internal=true) public class WriteRGBOp extends Operator
Modifier and Type | Class and Description |
---|---|
static class |
WriteRGBOp.Spi |
Constructor and Description |
---|
WriteRGBOp() |
Modifier and Type | Method and Description |
---|---|
void |
computeTile(Band band,
Tile targetTile,
ProgressMonitor pm)
Called by the framework in order to compute a tile for the given target band.
|
void |
dispose()
Releases the resources the operator has acquired during its lifetime.
|
void |
doExecute(ProgressMonitor pm)
Executes the operator.
|
void |
initialize()
Initializes this operator and sets the one and only target product.
|
canComputeTile, canComputeTileStack, checkForCancellation, computeTileStack, deactivateComputeTileMethod, ensureSceneGeoCoding, ensureSingleRasterSize, ensureSingleRasterSize, execute, finalize, getId, getLogger, getParameter, getParameter, getProductManager, getSourceProduct, getSourceProduct, getSourceProductId, getSourceProducts, getSourceTile, getSourceTile, getSpi, getTargetProduct, getTargetProperty, setLogger, setParameter, setParameterDefaultValues, setRequiresAllBands, setSourceProduct, setSourceProduct, setSourceProducts, setSpi, setTargetProduct, stopTileComputationObservation, update
public void initialize() throws OperatorException
Operator
The target product can be either defined by a field of type Product
annotated with the
TargetProduct
annotation or
by calling Operator.setTargetProduct(org.esa.snap.core.datamodel.Product)
method.
This method shall never be called directly. The framework calls this method after it has created
an instance of this Operator
. This will occur
only once durting the lifetime of an Operator
instance.
If not already done, calling the Operator.getTargetProduct()
will always trigger
a call to the initialize()
method.
Any client code that must be performed before computation of tile data should be placed here.
initialize
in class Operator
OperatorException
- If an error occurs during operator initialisation.Operator.getTargetProduct()
public void doExecute(ProgressMonitor pm) throws OperatorException
Operator
For operators that compute raster data tiles, the method is usually a no-op. Other operators might perform their main work in this method, e.g. perform some image analysis such as extracting statistics and other features from data products.
Don't call this method directly. The framework may call this method
Operator.execute(ProgressMonitor)
.The default implementation only progresses the progress monitor.
doExecute
in class Operator
pm
- A progress monitor to be notified for long-running tasks.OperatorException
- If an error occurs during computation of the target raster.public void computeTile(Band band, Tile targetTile, ProgressMonitor pm) throws OperatorException
Operator
The default implementation throws a runtime exception with the message "not implemented".
This method shall never be called directly.
computeTile
in class Operator
band
- The target band.targetTile
- The current tile associated with the target band to be computed.pm
- A progress monitor which should be used to determine computation cancellation requests.OperatorException
- If an error occurs during computation of the target raster.Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.