org.jaitools.jiffle.runtime
Class AbstractIndirectRuntime

java.lang.Object
  extended by org.jaitools.jiffle.runtime.AbstractJiffleRuntime
      extended by org.jaitools.jiffle.runtime.AbstractIndirectRuntime
All Implemented Interfaces:
JiffleIndirectRuntime, JiffleRuntime

public abstract class AbstractIndirectRuntime
extends AbstractJiffleRuntime
implements JiffleIndirectRuntime

The default abstract base class for runtime classes that implement indirect evaluation.

Since:
0.1
Version:
$Id: AbstractIndirectRuntime.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jaitools.jiffle.runtime.AbstractJiffleRuntime
AbstractJiffleRuntime.ImageScopeVar
 
Field Summary
 
Fields inherited from class org.jaitools.jiffle.runtime.AbstractJiffleRuntime
_FN, _imageScopeVarsInitialized, _numVars, _outsideValue, _outsideValueSet, _stk, _vars, VAR_STRING
 
Constructor Summary
AbstractIndirectRuntime()
          Creates a new instance and initializes script-option variables.
 
Method Summary
 void setDestinationImage(java.lang.String varName)
          Specifies the name of the script variable which represents the destination image.
 void setDestinationImage(java.lang.String varName, CoordinateTransform tr)
          Specifies the name of the script variable which represents the destination image and defines the coordinate transform.
 void setSourceImage(java.lang.String varName)
          Associates a variable name with a source image.
 void setSourceImage(java.lang.String varName, CoordinateTransform tr)
          Associates a variable name with a source image and coordinate transform.
 
Methods inherited from class org.jaitools.jiffle.runtime.AbstractJiffleRuntime
getDefaultValue, getDestinationVarNames, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumPixels, getSourceVarNames, getTransform, getVar, getVarIndex, getVarNames, getWidth, getXRes, getYRes, initImageScopeVars, initOptionVars, isWorldSet, registerVar, setDefaultTransform, setImageParams, setTransform, setVar, setVarValue, setWorldByNumPixels, setWorldByResolution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jaitools.jiffle.runtime.JiffleIndirectRuntime
evaluate
 
Methods inherited from interface org.jaitools.jiffle.runtime.JiffleRuntime
getDestinationVarNames, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumPixels, getSourceVarNames, getVar, getVarNames, getWidth, getXRes, getYRes, isWorldSet, setDefaultTransform, setImageParams, setVar, setWorldByNumPixels, setWorldByResolution
 

Constructor Detail

AbstractIndirectRuntime

public AbstractIndirectRuntime()
Creates a new instance and initializes script-option variables.

Method Detail

setDestinationImage

public void setDestinationImage(java.lang.String varName)
Description copied from interface: JiffleIndirectRuntime
Specifies the name of the script variable which represents the destination image. Equivalent to:

 setDestinationImage(varName, null)
 
This convenience method is defined in the interface because it will be commonly when working directly with image coordinates.

Specified by:
setDestinationImage in interface JiffleIndirectRuntime
Parameters:
varName - script variable representing the destination image

setDestinationImage

public void setDestinationImage(java.lang.String varName,
                                CoordinateTransform tr)
                         throws JiffleException
Description copied from interface: JiffleIndirectRuntime
Specifies the name of the script variable which represents the destination image and defines the coordinate transform. The transform defines how to convert from processing area coordinates to image (pixel) coordinates. If tr is null the default identify transform will be used.

Note that Jiffle uses rounding to reduce the transformed coordinates to integers.

Specified by:
setDestinationImage in interface JiffleIndirectRuntime
Parameters:
varName - script variable representing the destination image
tr - transform for processing area to image coordinates
Throws:
JiffleException - if the world bounds and resolution have not been set previously

setSourceImage

public void setSourceImage(java.lang.String varName)
Description copied from interface: JiffleIndirectRuntime
Associates a variable name with a source image. Equivalent to:

 setSourceImage(varName, null)
 
This convenience method is defined in the interface because it will be commonly when working directly with image coordinates.

Specified by:
setSourceImage in interface JiffleIndirectRuntime
Parameters:
varName - script variable representing the source image

setSourceImage

public void setSourceImage(java.lang.String varName,
                           CoordinateTransform tr)
                    throws JiffleException
Description copied from interface: JiffleIndirectRuntime
Associates a variable name with a source image and coordinate transform. The transform defines how to convert from processing area coordinates to image (pixel) coordinates. If tr is null the default identify transform will be used.

Note that Jiffle uses rounding to reduce the transformed coordinates to integers.

Specified by:
setSourceImage in interface JiffleIndirectRuntime
Parameters:
varName - script variable representing the source image
tr - transform for processing area to image coordinates
Throws:
JiffleException - if the world bounds and resolution have not been set previously


Copyright © 2011. All Rights Reserved.