Object
EncodedIntBuffer

public final class EncodedIntBuffer extends Object
A wrapper around UnsignedIntBuffer that provides methods for encoding and decoding watershed-related information.
  • Constructor Details

  • Method Details

    • isTemporary

      public boolean isTemporary(int offset)
      Checks if the value at the given offset is temporary.
      Parameters:
      offset - the offset in the buffer
      Returns:
      true if the value is temporary, false otherwise
    • isUnvisited

      public boolean isUnvisited(int offset)
      Checks if the value at the given offset is unvisited.
      Parameters:
      offset - the offset in the buffer
      Returns:
      true if the value is unvisited, false otherwise
    • isMinima

      public boolean isMinima(int offset)
      Checks if the value at the given offset is a minima.
      Parameters:
      offset - the offset in the buffer
      Returns:
      true if the value is a minima, false otherwise
    • isConnectedComponentID

      public boolean isConnectedComponentID(int offset)
      Checks if the value at the given offset is a connected component ID.
      Parameters:
      offset - the offset in the buffer
      Returns:
      true if the value is a connected component ID, false otherwise
    • markAsTemporary

      public void markAsTemporary(int offset)
      Marks the value at the given offset as temporary.
      Parameters:
      offset - the offset in the buffer
    • getCode

      public int getCode(int index)
      Gets the encoded value at the given index.
      Parameters:
      index - the index in the buffer
      Returns:
      the encoded value
    • putCode

      public void putCode(int index, int code)
      Puts an encoded value at the given index.
      Parameters:
      index - the index in the buffer
      code - the encoded value to put
    • convertCode

      public void convertCode(int indexBuffer, int indexGlobal, EncodedVoxels matS, Point3i point)
      Converts the code at the given index to a connected component ID.
      Parameters:
      indexBuffer - the index in this buffer
      indexGlobal - the global index
      matS - the EncodedVoxels containing the watershed encoding
      point - the Point3i corresponding to the current position