Package org.esa.snap.core.gpf.pointop
Interface Sample
-
- All Known Subinterfaces:
WritableSample
public interface Sample
A sample represents the (geophysical) value of aRasterDataNode
at a certain a certain pixel position.This interface is not intended to be implemented by clients.
- Since:
- BEAM 4.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getBit(int bitIndex)
Interprets an integer sample as a sequence of bits (flags).boolean
getBoolean()
int
getDataType()
double
getDouble()
float
getFloat()
int
getIndex()
int
getInt()
RasterDataNode
getNode()
-
-
-
Method Detail
-
getNode
RasterDataNode getNode()
- Returns:
- The raster data node to which this sample belongs.
-
getIndex
int getIndex()
- Returns:
- The index of the sample defined by the various
SourceSampleConfigurer
orTargetSampleConfigurer
method and used within the sample arrays passed tocomputeSample()
orcomputePixel()
methods.
-
getDataType
int getDataType()
- Returns:
- The geophysical data type of this sample.
- See Also:
RasterDataNode.getGeophysicalDataType()
-
getBit
boolean getBit(int bitIndex)
Interprets an integer sample as a sequence of bits (flags).- Parameters:
bitIndex
- The bit index. Valid range is zero to n-1, where n is 8, 16, 32, 64, depending on the actual raster data type.- Returns:
- The sample value as
bit
at given bit index.
-
getBoolean
boolean getBoolean()
- Returns:
- The sample value as
boolean
.
-
getInt
int getInt()
- Returns:
- The sample value as
int
.
-
getFloat
float getFloat()
- Returns:
- The sample value as
float
.
-
getDouble
double getDouble()
- Returns:
- The sample value as
double
.
-
-