org.jaitools.jiffle.runtime
Interface JiffleIndirectRuntime

All Superinterfaces:
JiffleRuntime
All Known Implementing Classes:
AbstractIndirectRuntime

public interface JiffleIndirectRuntime
extends JiffleRuntime

Defines methods implemented by runtime classes adopting the indirect evaluation model. In this model, there is only a single destination image and the evaluate(double, double) method passes values back to the caller rather than writing them to the destination image directly.

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

Method Summary
 double evaluate(double x, double y)
          Evaluates the script for the given world position.
 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 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
 

Method Detail

setDestinationImage

void setDestinationImage(java.lang.String varName,
                         CoordinateTransform tr)
                         throws JiffleException
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.

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

setDestinationImage

void setDestinationImage(java.lang.String varName)
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.

Parameters:
varName - script variable representing the destination image

setSourceImage

void setSourceImage(java.lang.String varName,
                    CoordinateTransform tr)
                    throws JiffleException
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.

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

setSourceImage

void setSourceImage(java.lang.String varName)
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.

Parameters:
varName - script variable representing the source image

evaluate

double evaluate(double x,
                double y)
Evaluates the script for the given world position.

Parameters:
x - world position X ordinate
y - world position Y ordinate
Returns:
the result


Copyright © 2011. All Rights Reserved.