Class EncodedIntBuffer

Object
EncodedIntBuffer

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

    Constructors
    Constructor
    Description
    EncodedIntBuffer(UnsignedIntBuffer delegate, WatershedEncoding encoding)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    convertCode(int indexBuffer, int indexGlobal, EncodedVoxels matS, Point3i point)
    Converts the code at the given index to a connected component ID.
    int
    getCode(int index)
    Gets the encoded value at the given index.
    boolean
    Checks if the value at the given offset is a connected component ID.
    boolean
    isMinima(int offset)
    Checks if the value at the given offset is a minima.
    boolean
    isTemporary(int offset)
    Checks if the value at the given offset is temporary.
    boolean
    isUnvisited(int offset)
    Checks if the value at the given offset is unvisited.
    void
    markAsTemporary(int offset)
    Marks the value at the given offset as temporary.
    void
    putCode(int index, int code)
    Puts an encoded value at the given index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EncodedIntBuffer

      public EncodedIntBuffer(UnsignedIntBuffer delegate, WatershedEncoding encoding)
  • 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