Package org.esa.snap.core.dataop.barithm
Class RasterDataEvalEnv
java.lang.Object
org.esa.snap.core.dataop.barithm.RasterDataEvalEnv
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionRasterDataEvalEnv(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, LevelImageSupport levelImageSupport) Constructs a new environment for the given raster data region. -
Method Summary
Modifier and TypeMethodDescriptionfinal intGets the index of the current data element.intGets the x-offset of the raster region.intGets the y-offset of the raster region.final intGets the absolute pixel's x-coordinate within the data raster (from image at level zero in an image pyramid).final intGets the absolute pixel's y-coordinate within the data raster (from image at level zero in an image pyramid).intGets the height of the raster region.intGets the width of the raster region.voidsetElemIndex(int elemIndex) Sets the index of the current data element.
-
Constructor Details
-
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 regionoffsetY- the y-offset of the raster regionregionWidth- the width of the raster regionregionHeight- the height of the raster region
-
RasterDataEvalEnv
public RasterDataEvalEnv(int offsetX, int offsetY, int regionWidth, int regionHeight, 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 methodsgetSourceX()andgetSourceY()will return the correct pixel coordinate at level zero.- Parameters:
offsetX- the x-offset of the raster regionoffsetY- the y-offset of the raster regionregionWidth- the width of the raster regionregionHeight- the height of the raster regionlevelImageSupport- helps to compute the source pixels at level zero
-
-
Method Details
-
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
-