Package org.esa.snap.core.dataop.barithm
Class RasterDataLoop
- java.lang.Object
-
- org.esa.snap.core.dataop.barithm.RasterDataLoop
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RasterDataLoop.Body
Represents the body to be evaluated for each pixel within the raster.
-
Constructor Summary
Constructors Constructor Description RasterDataLoop(int offsetX, int offsetY, int regionWidth, int regionHeight, Term[] terms, ProgressMonitor pm)
Creates an instance of this class for the given region and terms.RasterDataLoop(RasterDataEvalEnv rasterDataEvalEnv, Term[] terms, ProgressMonitor pm)
Creates an instance of this class for the given region and terms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forEachPixel(RasterDataLoop.Body body)
Evaluates thebody
by calling itseval()
method.void
forEachPixel(RasterDataLoop.Body body, String message)
Evaluates thebody
by calling itseval()
method.int
getOffsetX()
int
getOffsetY()
int
getRegionHeight()
int
getRegionWidth()
Term[]
getTerms()
-
-
-
Constructor Detail
-
RasterDataLoop
public RasterDataLoop(int offsetX, int offsetY, int regionWidth, int regionHeight, Term[] terms, ProgressMonitor pm)
Creates an instance of this class for the given region and terms.- Parameters:
offsetX
- the X-offset of the region.offsetY
- the Y-offset of the region.regionWidth
- the width of the region.regionHeight
- the height of the region.terms
- an array of terms.pm
- a monitor to inform the user about progress
-
RasterDataLoop
public RasterDataLoop(RasterDataEvalEnv rasterDataEvalEnv, Term[] terms, ProgressMonitor pm)
Creates an instance of this class for the given region and terms.- Parameters:
rasterDataEvalEnv
- the raster data evaluation environment passed to the term evaluationterms
- an array of terms.pm
- a monitor to inform the user about progress
-
-
Method Detail
-
getOffsetX
public int getOffsetX()
-
getOffsetY
public int getOffsetY()
-
getRegionWidth
public int getRegionWidth()
-
getRegionHeight
public int getRegionHeight()
-
getTerms
public Term[] getTerms()
-
forEachPixel
public void forEachPixel(RasterDataLoop.Body body) throws IOException
Evaluates thebody
by calling itseval()
method. This method just delegates toforEachPixel(body, null)
.- Parameters:
body
- the object whoseeval
method is called.- Throws:
IOException
- if the raster data could not be read.
-
forEachPixel
public void forEachPixel(RasterDataLoop.Body body, String message) throws IOException
Evaluates thebody
by calling itseval()
method.- Parameters:
body
- the object whoseeval
method is called.message
- the progress message- Throws:
IOException
- if the raster data could not be read.
-
-