jaitools.jiffle.runtime
Interface JiffleDirectRuntime

All Superinterfaces:
JiffleRuntime
All Known Implementing Classes:
AbstractDirectRuntime

public interface JiffleDirectRuntime
extends JiffleRuntime

Defines methods implemented by runtime classes adopting the direct evaluation model. In this model, the runtime object writes values to the destination image(s) directly within its evaluate(int, int) method. It also provides an evaluateAll(JiffleProgressListener) method.

Since:
1.1
Version:
$Id: JiffleDirectRuntime.java 1512 2011-03-07 02:21:45Z michael.bedward $
Author:
Michael Bedward

Method Summary
 void evaluate(int x, int y)
          Evaluates the script for the given image location and writes the result to the destination image(s).
 void evaluateAll(JiffleProgressListener pl)
          Evaluates the script for all locations in the destination image(s).
 double readFromImage(String srcImageName, int x, int y, int band)
          Gets a value from a source image as a double.
 void setDestinationImage(String imageName, WritableRenderedImage image)
          Associates a name, as used in the Jiffle script, with a destination image.
 void setSourceImage(String imageName, RenderedImage image)
          Associates a name, as used in the Jiffle script, with a source image.
 void writeToImage(String destImageName, int x, int y, int band, double value)
          Writes a value to a destination image.
 
Methods inherited from interface jaitools.jiffle.runtime.JiffleRuntime
getVar, setBounds
 

Method Detail

setDestinationImage

void setDestinationImage(String imageName,
                         WritableRenderedImage image)
Associates a name, as used in the Jiffle script, with a destination image.

Parameters:
imageName - image name as used in the Jiffle script
image - writable image

setSourceImage

void setSourceImage(String imageName,
                    RenderedImage image)
Associates a name, as used in the Jiffle script, with a source image.

Parameters:
imageName - image name as used in the Jiffle script
image - writable image

evaluate

void evaluate(int x,
              int y)
Evaluates the script for the given image location and writes the result to the destination image(s).

Parameters:
x - destination X ordinate
y - destination Y ordinate

evaluateAll

void evaluateAll(JiffleProgressListener pl)
Evaluates the script for all locations in the destination image(s).

Parameters:
pl - an optional progress listener (may be null

readFromImage

double readFromImage(String srcImageName,
                     int x,
                     int y,
                     int band)
Gets a value from a source image as a double.

Parameters:
srcImageName - the source image
x - source X ordinate
y - source Y ordinate
band - source band
Returns:
image value

writeToImage

void writeToImage(String destImageName,
                  int x,
                  int y,
                  int band,
                  double value)
Writes a value to a destination image.

Parameters:
destImageName -
x - destination X ordinate
y - destination Y ordinate
band - destination band
value - the value to write


Copyright © 2009-2011. All Rights Reserved.