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 TypeMethodDescriptionvoidconvertCode(int indexBuffer, int indexGlobal, EncodedVoxels matS, Point3i point) Converts the code at the given index to a connected component ID.intgetCode(int index) Gets the encoded value at the given index.booleanisConnectedComponentID(int offset) Checks if the value at the given offset is a connected component ID.booleanisMinima(int offset) Checks if the value at the given offset is a minima.booleanisTemporary(int offset) Checks if the value at the given offset is temporary.booleanisUnvisited(int offset) Checks if the value at the given offset is unvisited.voidmarkAsTemporary(int offset) Marks the value at the given offset as temporary.voidputCode(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- theEncodedVoxelscontaining the watershed encodingpoint- thePoint3icorresponding to the current position
-