Class VoxelBufferUnsigned<T extends UnsignedBuffer>
Object
VoxelBuffer<T>
VoxelBufferUnsigned<T>
- Type Parameters:
T
- buffer-type for voxels
A parent class for
VoxelBuffer
that accepts unsigned-buffers and implements some common
operations.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuffer()
The associated buffer for storing the voxels.int
capacity()
The capacity (i.e. size) of the buffer.boolean
Are there voxels remaining in a buffer?boolean
isDirect()
Is this buffer direct or non-direct?void
position
(int newPosition) Assigns a new position to the buffer.Methods inherited from class org.anchoranalysis.image.voxel.buffer.VoxelBuffer
copyVoxelFrom, dataType, duplicate, getInt, putByte, putInt, toString, underlyingBytes
-
Constructor Details
-
VoxelBufferUnsigned
Creates a newVoxelBufferUnsigned
instance.- Parameters:
buffer
- Buffer the buffer to use internally.
-
-
Method Details
-
buffer
Description copied from class:VoxelBuffer
The associated buffer for storing the voxels.This buffer is either a NIO or other classes that wraps the underlying array storing voxel intensities.
- Specified by:
buffer
in classVoxelBuffer<T extends UnsignedBuffer>
- Returns:
- the buffer.
-
capacity
public int capacity()Description copied from class:VoxelBuffer
The capacity (i.e. size) of the buffer.This is meant in the sense of Java's NIO
Buffer
classes.- Specified by:
capacity
in classVoxelBuffer<T extends UnsignedBuffer>
- Returns:
- the size.
-
hasRemaining
public boolean hasRemaining()Description copied from class:VoxelBuffer
Are there voxels remaining in a buffer?This is meant in the sense of Java's NIO
Buffer
classes.- Specified by:
hasRemaining
in classVoxelBuffer<T extends UnsignedBuffer>
- Returns:
- true if there are voxels remaining in the buffer, false otherwise.
-
position
public void position(int newPosition) Description copied from class:VoxelBuffer
Assigns a new position to the buffer.This is meant in the sense of Java's NIO
Buffer
classes.- Specified by:
position
in classVoxelBuffer<T extends UnsignedBuffer>
- Parameters:
newPosition
- the offset to assign as position.
-
isDirect
public boolean isDirect()Description copied from class:VoxelBuffer
Is this buffer direct or non-direct?This is meant in the sense of Java's NIO
Buffer
classes.- Specified by:
isDirect
in classVoxelBuffer<T extends UnsignedBuffer>
- Returns:
- true iff the buffer is direct.
-