Package org.esa.snap.core.dataop.barithm
Class RasterDataEvalEnv
- java.lang.Object
-
- org.esa.snap.core.dataop.barithm.RasterDataEvalEnv
-
- All Implemented Interfaces:
EvalEnv
public class RasterDataEvalEnv extends Object implements EvalEnv
Represents an evaluation environment forTerms
which are operating on raster data.The evaluation environment is passed to the
evalB
,evalI
andevalB
methods of aTerm
.Special implementations of the
Symbol
andFunction
interfaces, such asRasterDataSymbol
, can then use the environment in order to perform raster data specific evaluations.
-
-
Constructor Summary
Constructors Constructor Description 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, LevelImageSupport levelImageSupport)
Constructs a new environment for the given raster data region.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 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 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
-
-