public abstract class AbstractDirectRuntime extends AbstractJiffleRuntime implements JiffleDirectRuntime
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractDirectRuntime.DestinationImage |
AbstractJiffleRuntime.SourceImage
Modifier and Type | Field and Description |
---|---|
protected Map<String,AbstractDirectRuntime.DestinationImage> |
_destImages |
_defaultTransform, _FN, _images, _imageScopeVarsInitialized, _outsideValue, _outsideValueSet, _stk
Constructor and Description |
---|
AbstractDirectRuntime()
Creates a new instance and initializes script-option variables.
|
AbstractDirectRuntime(String[] variableNames)
Creates a new instance and initializes script-option variables.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluateAll(JiffleProgressListener pl)
Evaluates the script for all pixel locations within the world bounds.
|
Map |
get_images()
Returns the images set for this runtime object as a
Map with
variable name as key and iamge as value. |
void |
setDefaultBounds()
Sets default bounds for the processing area.
|
void |
setDefaultTransform(CoordinateTransform tr)
Sets a coordinate transform to be used by any source and destination images
submitted to the runtime object without their own transforms.
|
void |
setDestinationImage(String varName,
WritableRenderedImage image)
Associates a variable name with a destination image.
|
void |
setDestinationImage(String varName,
WritableRenderedImage image,
CoordinateTransform tr)
Associates a variable name with a destination image and coordinate transform.
|
void |
writeToImage(String destImageName,
double x,
double y,
int band,
double value)
Writes a value to a destination image for a given world position and
image band.
|
getDestinationVarNames, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumPixels, getSourceVarNames, getTransform, getVar, getVariableField, getVarNames, getWidth, getXRes, getYRes, initImageScopeVars, initOptionVars, isWorldSet, readFromImage, setImageParams, setSourceImage, setSourceImage, setSourceImageBandTransform, setSourceImageCoordinateTransform, setVar, setWorldByNumPixels, setWorldByResolution
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate
getDestinationVarNames, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumPixels, getSourceVarNames, getVar, getVarNames, getWidth, getXRes, getYRes, isWorldSet, readFromImage, setImageParams, setSourceImage, setSourceImage, setSourceImageBandTransform, setSourceImageCoordinateTransform, setVar, setWorldByNumPixels, setWorldByResolution
protected Map<String,AbstractDirectRuntime.DestinationImage> _destImages
public AbstractDirectRuntime()
public AbstractDirectRuntime(String[] variableNames)
public void setDestinationImage(String varName, WritableRenderedImage image)
setDestinationImage(varName, image, null)
This convenience method is defined in the interface because it will be
commonly when working directly with image coordinates.setDestinationImage
in interface JiffleDirectRuntime
varName
- script variable representing the destination imageimage
- writable imagepublic void setDestinationImage(String varName, WritableRenderedImage image, CoordinateTransform tr) throws JiffleException
tr
is null
the default
identify transform will be used.
Note that Jiffle uses rounding to reduce the transformed coordinates to integers.
setDestinationImage
in interface JiffleDirectRuntime
varName
- script variable representing the destination imageimage
- writable imagetr
- transform for processing area to image coordinatesJiffleException
- if the world bounds and resolution have not
been set previouslypublic void evaluateAll(JiffleProgressListener pl)
evaluateAll
in interface JiffleDirectRuntime
pl
- an optional progress listener (may be null
public void writeToImage(String destImageName, double x, double y, int band, double value)
writeToImage
in interface JiffleDirectRuntime
x
- destination X ordinate in world unitsy
- destination Y ordinate in world unitsband
- destination bandvalue
- the value to writepublic void setDefaultBounds()
setDefaultBounds
in interface JiffleDirectRuntime
setDefaultBounds
in class AbstractJiffleRuntime
public void setDefaultTransform(CoordinateTransform tr) throws JiffleException
AbstractJiffleRuntime
tr
is null
the system default transform (IdentityCoordinateTransform
)
will be used.setDefaultTransform
in interface JiffleRuntime
setDefaultTransform
in class AbstractJiffleRuntime
tr
- the coordinate transform to use as the default; or null
for the system defaultJiffleException
- if the world bounds and resolution have not
been set previouslypublic Map get_images()
AbstractJiffleRuntime
Map
with
variable name as key and iamge as value. The returned Map
is
a copy of the one held by this object, so it can be safely modified
by the caller.get_images
in interface JiffleRuntime
get_images
in class AbstractJiffleRuntime
Copyright © 2006–2018 GeoSolutions. All rights reserved.