org.esa.beam.framework.dataop.barithm
Class RasterDataEvalEnv

java.lang.Object
  extended by org.esa.beam.framework.dataop.barithm.RasterDataEvalEnv
All Implemented Interfaces:
EvalEnv

public class RasterDataEvalEnv
extends Object
implements EvalEnv

Represents an evaluation environment for Terms which are operating on raster data.

The evaluation environment is passed to the evalB, evalI and evalB methods of a Term.

Special implementations of the Symbol and Function interfaces, such as RasterDataSymbol, can then use the environment in order to perform raster data specific evaluations.


Constructor Summary
RasterDataEvalEnv(int offsetX, int offsetY, int regionWidth, int regionHeight)
          Constructs a new environment for the given raster data region.
RasterDataEvalEnv(int offsetX, int offsetY, int regionWidth, int regionHeight, org.esa.beam.jai.LevelImageSupport levelImageSupport)
          Constructs a new environment for the given raster data region.
 
Method Summary
 int getElemIndex()
          Gets the index of the current data element.
 int getOffsetX()
          Gets the x-offset of the raster region.
 int getOffsetY()
          Gets the y-offset of the raster region.
 int getPixelX()
          Gets the absolute pixel's x-coordinate within the data raster (from image at level zero in an image pyramid).
 int getPixelY()
          Gets the absolute pixel's y-coordinate within the data raster (from image at level zero in an image pyramid).
 int getRegionHeight()
          Gets the height of the raster region.
 int getRegionWidth()
          Gets the width of the raster region.
 void setElemIndex(int elemIndex)
          Sets the index of the current data element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterDataEvalEnv

public RasterDataEvalEnv(int offsetX,
                         int offsetY,
                         int regionWidth,
                         int regionHeight)
Constructs a new environment for the given raster data region. Should only be used if evaluation takes place at image level zero.

Parameters:
offsetX - the x-offset of the raster region
offsetY - the y-offset of the raster region
regionWidth - the width of the raster region
regionHeight - the height of the raster region

RasterDataEvalEnv

public RasterDataEvalEnv(int offsetX,
                         int offsetY,
                         int regionWidth,
                         int regionHeight,
                         org.esa.beam.jai.LevelImageSupport levelImageSupport)
Constructs a new environment for the given raster data region. Instances created with this constructor consider that the current data evaluation takes place at a higher image level. The methods getSourceX() and getSourceY() will return the correct pixel coordinate at level zero.

Parameters:
offsetX - the x-offset of the raster region
offsetY - the y-offset of the raster region
regionWidth - the width of the raster region
regionHeight - the height of the raster region
levelImageSupport - helps to compute the source pixels at level zero
Method Detail

getOffsetX

public int getOffsetX()
Gets the x-offset of the raster region.

Returns:
the x-offset of the raster region

getOffsetY

public int getOffsetY()
Gets the y-offset of the raster region.

Returns:
the y-offset of the raster region.

getRegionWidth

public int getRegionWidth()
Gets the width of the raster region.

Returns:
the width of the raster region.

getRegionHeight

public int getRegionHeight()
Gets the height of the raster region.

Returns:
the height of the raster region.

getPixelX

public final int getPixelX()
Gets the absolute pixel's x-coordinate within the data raster (from image at level zero in an image pyramid).

Returns:
the current source pixel's x-coordinate

getPixelY

public final int getPixelY()
Gets the absolute pixel's y-coordinate within the data raster (from image at level zero in an image pyramid).

Returns:
the current source pixel's y-coordinate

getElemIndex

public final int getElemIndex()
Gets the index of the current data element.

Returns:
the index of the current data element

setElemIndex

public void setElemIndex(int elemIndex)
Sets the index of the current data element.

Parameters:
elemIndex - the index of the current data element


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.