Package org.esa.snap.core.util
Class BitRaster
- java.lang.Object
- 
- org.esa.snap.core.util.BitRaster
 
- 
 public final class BitRaster extends Object A pixel mask provides a boolean value for a given pixel position. It is used to identify valid pixels in a raster.- Since:
- 4.1
 
- 
- 
Constructor SummaryConstructors Constructor Description BitRaster(int width, int height)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear(int pixelIndex)byte[]createBytePackedBitmaskRasterData()Creates a byte-packed bitmask as array of bytes.intgetBytePackedBitmaskRasterWidth()Gets the width of this raster in byte-packed formintgetHeight()intgetWidth()booleanisSet(int pixelIndex)booleanisSet(int x, int y)voidset(int pixelIndex)voidset(int pixelIndex, boolean value)voidset(int x, int y, boolean value)
 
- 
- 
- 
Method Detail- 
getWidthpublic int getWidth() 
 - 
getHeightpublic int getHeight() 
 - 
setpublic void set(int x, int y, boolean value)
 - 
setpublic void set(int pixelIndex, boolean value)
 - 
isSetpublic boolean isSet(int x, int y)
 - 
isSetpublic boolean isSet(int pixelIndex) 
 - 
setpublic void set(int pixelIndex) 
 - 
clearpublic void clear(int pixelIndex) 
 - 
createBytePackedBitmaskRasterDatapublic byte[] createBytePackedBitmaskRasterData() Creates a byte-packed bitmask as array of bytes.This method is used to provide backward API compatibility with BEAM versions prior 4.1. Its use is discouraged. - Returns:
- an array of bytes of size getBytePackedBitmaskRasterWidth()*getHeight()
- See Also:
- getBytePackedBitmaskRasterWidth()
 
 - 
getBytePackedBitmaskRasterWidthpublic final int getBytePackedBitmaskRasterWidth() Gets the width of this raster in byte-packed formThis method is used to provide backward API compatibility with BEAM versions prior 4.1. Its use is discouraged. - Returns:
- the width of this raster in byte-packed form
- See Also:
- createBytePackedBitmaskRasterData()
 
 
- 
 
-