Class EncodedIntBuffer
Object
EncodedIntBuffer
A wrapper around
UnsignedIntBuffer
that provides methods for encoding and decoding
watershed-related information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
isConnectedComponentID
(int offset) 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.
-
Constructor Details
-
EncodedIntBuffer
-
-
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 buffercode
- the encoded value to put
-
convertCode
Converts the code at the given index to a connected component ID.- Parameters:
indexBuffer
- the index in this bufferindexGlobal
- the global indexmatS
- theEncodedVoxels
containing the watershed encodingpoint
- thePoint3i
corresponding to the current position
-