Package org.esa.snap.core.gpf.pointop
Interface Sample
- All Known Subinterfaces:
WritableSample
public interface Sample
A sample represents the (geophysical) value of a
RasterDataNode at a certain a certain pixel position.
This interface is not intended to be implemented by clients.
- Since:
- BEAM 4.9
-
Method Details
-
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
SourceSampleConfigurerorTargetSampleConfigurermethod and used within the sample arrays passed tocomputeSample()orcomputePixel()methods.
-
getDataType
int getDataType()- Returns:
- The geophysical data type of this sample.
- See Also:
-
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
bitat 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.
-