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.intcapacity()The capacity (i.e. size) of the buffer.booleanAre there voxels remaining in a buffer?booleanisDirect()Is this buffer direct or non-direct?voidposition(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 newVoxelBufferUnsignedinstance.- Parameters:
buffer- Buffer the buffer to use internally.
-
-
Method Details
-
buffer
Description copied from class:VoxelBufferThe 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:
bufferin classVoxelBuffer<T extends UnsignedBuffer>- Returns:
- the buffer.
-
capacity
public int capacity()Description copied from class:VoxelBufferThe capacity (i.e. size) of the buffer.This is meant in the sense of Java's NIO
Bufferclasses.- Specified by:
capacityin classVoxelBuffer<T extends UnsignedBuffer>- Returns:
- the size.
-
hasRemaining
public boolean hasRemaining()Description copied from class:VoxelBufferAre there voxels remaining in a buffer?This is meant in the sense of Java's NIO
Bufferclasses.- Specified by:
hasRemainingin 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:VoxelBufferAssigns a new position to the buffer.This is meant in the sense of Java's NIO
Bufferclasses.- Specified by:
positionin classVoxelBuffer<T extends UnsignedBuffer>- Parameters:
newPosition- the offset to assign as position.
-
isDirect
public boolean isDirect()Description copied from class:VoxelBufferIs this buffer direct or non-direct?This is meant in the sense of Java's NIO
Bufferclasses.- Specified by:
isDirectin classVoxelBuffer<T extends UnsignedBuffer>- Returns:
- true iff the buffer is direct.
-