Package org.esa.snap.core.util
Class BitRaster
java.lang.Object
org.esa.snap.core.util.BitRaster
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(int pixelIndex) byte[]
Creates a byte-packed bitmask as array of bytes.final int
Gets the width of this raster in byte-packed formint
int
getWidth()
boolean
isSet
(int pixelIndex) boolean
isSet
(int x, int y) void
set
(int pixelIndex) void
set
(int pixelIndex, boolean value) void
set
(int x, int y, boolean value)
-
Constructor Details
-
BitRaster
public BitRaster(int width, int height)
-
-
Method Details
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
set
public void set(int x, int y, boolean value) -
set
public void set(int pixelIndex, boolean value) -
isSet
public boolean isSet(int x, int y) -
isSet
public boolean isSet(int pixelIndex) -
set
public void set(int pixelIndex) -
clear
public void clear(int pixelIndex) -
createBytePackedBitmaskRasterData
public 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
public 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:
-