@OperatorMetadata(alias="PyOp", description="Uses Python code to process data products", version="0.5", authors="N. Fomferra", internal=true) public class PyOperator extends Operator
Modifier and Type | Class and Description |
---|---|
static interface |
PyOperator.PythonProcessor
The interface that the given Python class must implement.
|
Constructor and Description |
---|
PyOperator() |
Modifier and Type | Method and Description |
---|---|
void |
computeTileStack(Map<Band,Tile> targetTiles,
Rectangle targetRectangle,
com.bc.ceres.core.ProgressMonitor pm)
Called by the framework in order to compute the stack of tiles for the given target bands.
|
void |
dispose()
Releases the resources the operator has acquired during its lifetime.
|
String |
getPythonClassName() |
String |
getPythonModuleName() |
String |
getPythonModulePath() |
void |
initialize()
Initializes this operator and sets the one and only target product.
|
void |
setPythonClassName(String pythonClassName) |
void |
setPythonModuleName(String pythonModuleName) |
void |
setPythonModulePath(String pythonModulePath) |
checkForCancellation, computeTile, deactivateComputeTileMethod, finalize, getId, getLogger, getParameter, getParameter, getSourceProduct, getSourceProduct, getSourceProductId, getSourceProducts, getSourceTile, getSourceTile, getSpi, getTargetProduct, getTargetProperty, setLogger, setParameter, setParameterDefaultValues, setRequiresAllBands, setSourceProduct, setSourceProduct, setSourceProducts, setSpi, setTargetProduct, stopTileComputationObservation, update
public String getPythonModulePath()
public void setPythonModulePath(String pythonModulePath)
public String getPythonModuleName()
public void setPythonModuleName(String pythonModuleName)
public String getPythonClassName()
public void setPythonClassName(String pythonClassName)
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.beam.framework.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.
initialize
in class Operator
OperatorException
- If an error occurs during operator initialisation.Operator.getTargetProduct()
public void computeTileStack(Map<Band,Tile> targetTiles, Rectangle targetRectangle, com.bc.ceres.core.ProgressMonitor pm) throws OperatorException
Operator
The default implementation throws a runtime exception with the message "not implemented".
This method shall never be called directly.
computeTileStack
in class Operator
targetTiles
- The current tiles to be computed for each target band.targetRectangle
- The area in pixel coordinates to be computed (same for all rasters in targetRasters
).pm
- A progress monitor which should be used to determine computation cancelation requests.OperatorException
- if an error occurs during computation of the target rasters.Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.