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 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 form

      This 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: