T
- destination-type (what the voxels will be converted to).public abstract class VoxelsConverter<T> extends Object
Constructor and Description |
---|
VoxelsConverter() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
convertFloat(FloatBuffer in,
T out)
Copies a value from the current position in a
FloatBuffer to the current position in
a buffer of type T . |
Voxels<T> |
convertFrom(VoxelsUntyped from,
VoxelsFactoryTypeBound<T> factory)
Creates a new voxels of type
T and copies the voxels from from . |
protected abstract void |
convertUnsignedByte(UnsignedByteBuffer in,
T out)
Copies a value from the current position in a
UnsignedByteBuffer to the current
position in a buffer of type T . |
protected abstract void |
convertUnsignedInt(UnsignedIntBuffer in,
T out)
Copies a value from the current position in a
UnsignedIntBuffer to the current
position in a buffer of type T . |
protected abstract void |
convertUnsignedShort(UnsignedShortBuffer in,
T out)
Copies a value from the current position in a
UnsignedShortBuffer to the current
position in a buffer of type T . |
void |
copyFrom(VoxelsUntyped from,
Voxels<T> to)
Copies voxels from a source (of any type) to voxels of type
T . |
void |
copyFromFloat(Voxels<FloatBuffer> from,
Voxels<T> to)
Copies voxels from a source of type @{link FloatBuffer} to voxels of type
T . |
void |
copyFromUnsignedByte(Voxels<UnsignedByteBuffer> from,
Voxels<T> to)
Copies voxels from a source of type @{link UnsignedByteBuffer} to voxels of type
T . |
void |
copyFromUnsignedInt(Voxels<UnsignedIntBuffer> from,
Voxels<T> to)
Copies voxels from a source of type @{link UnsignedIntBuffer} to voxels of type
T . |
void |
copyFromUnsignedShort(Voxels<UnsignedShortBuffer> from,
Voxels<T> to)
Copies voxels from a source of type @{link UnsignedShortBuffer} to voxels of type
T . |
public Voxels<T> convertFrom(VoxelsUntyped from, VoxelsFactoryTypeBound<T> factory)
T
and copies the voxels from from
.public void copyFrom(VoxelsUntyped from, Voxels<T> to) throws OperationFailedException
T
.from
- where the voxels are copied from (the source)to
- where the voxels are copied to (the destination)OperationFailedException
- if the extents of from
and to
are not equal.public void copyFromUnsignedByte(Voxels<UnsignedByteBuffer> from, Voxels<T> to) throws OperationFailedException
T
.from
- where the voxels are copied from (the source).to
- where the voxels are copied to (the destination).OperationFailedException
- if the extents of from
and to
are not equal.public void copyFromUnsignedShort(Voxels<UnsignedShortBuffer> from, Voxels<T> to) throws OperationFailedException
T
.from
- where the voxels are copied from (the source).to
- where the voxels are copied to (the destination).OperationFailedException
- if the extents of from
and to
are not equal.public void copyFromUnsignedInt(Voxels<UnsignedIntBuffer> from, Voxels<T> to) throws OperationFailedException
T
.from
- where the voxels are copied from (the source).to
- where the voxels are copied to (the destination).OperationFailedException
- if the extents of from
and to
are not equal.public void copyFromFloat(Voxels<FloatBuffer> from, Voxels<T> to) throws OperationFailedException
T
.from
- where the voxels are copied from (the source).to
- where the voxels are copied to (the destination).OperationFailedException
- if the extents of from
and to
are not equal.protected abstract void convertUnsignedByte(UnsignedByteBuffer in, T out)
UnsignedByteBuffer
to the current
position in a buffer of type T
.in
- the current position of this buffer gives the value to convert, and the position is
incremented.out
- the converted value is written to the current position of this buffer, and the
position is incremented.protected abstract void convertUnsignedShort(UnsignedShortBuffer in, T out)
UnsignedShortBuffer
to the current
position in a buffer of type T
.in
- the current position of this buffer gives the value to convert, and the position is
incremented.out
- the converted value is written to the current position of this buffer, and the
position is incremented.protected abstract void convertUnsignedInt(UnsignedIntBuffer in, T out)
UnsignedIntBuffer
to the current
position in a buffer of type T
.in
- the current position of this buffer gives the value to convert, and the position is
incremented.out
- the converted value is written to the current position of this buffer, and the
position is incremented.protected abstract void convertFloat(FloatBuffer in, T out)
FloatBuffer
to the current position in
a buffer of type T
.in
- the current position of this buffer gives the value to convert, and the position is
incremented.out
- the converted value is written to the current position of this buffer, and the
position is incremented.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.