public final class ToUnsignedByteScaleByMaxValue extends ToUnsignedByte
The scaling occurs so that the full 8-bit range of values is supported.
Constructor and Description |
---|
ToUnsignedByteScaleByMaxValue(int maxValue)
Creates with the maximum-value which existing values are scaled against.
|
Modifier and Type | Method and Description |
---|---|
protected void |
convertFloat(FloatBuffer in,
UnsignedByteBuffer out)
Copies a value from the current position in a
FloatBuffer to the current position in
a buffer of type T . |
protected void |
convertUnsignedInt(UnsignedIntBuffer in,
UnsignedByteBuffer out)
Copies a value from the current position in a
UnsignedIntBuffer to the current
position in a buffer of type T . |
protected void |
convertUnsignedShort(UnsignedShortBuffer in,
UnsignedByteBuffer out)
Copies a value from the current position in a
UnsignedShortBuffer to the current
position in a buffer of type T . |
void |
setMaxValue(long maxValue)
Assigns the maximum-value that will be represented in the scaled-values.
|
convertUnsignedByte
convertFrom, copyFrom, copyFromFloat, copyFromUnsignedByte, copyFromUnsignedInt, copyFromUnsignedShort
public ToUnsignedByteScaleByMaxValue(int maxValue)
maxValue
- the maximum-value that will be represented in the scaled-values.public void setMaxValue(long maxValue)
maxValue
- the maximum-value.protected void convertUnsignedShort(UnsignedShortBuffer in, UnsignedByteBuffer out)
VoxelsConverter
UnsignedShortBuffer
to the current
position in a buffer of type T
.convertUnsignedShort
in class VoxelsConverter<UnsignedByteBuffer>
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 void convertUnsignedInt(UnsignedIntBuffer in, UnsignedByteBuffer out)
VoxelsConverter
UnsignedIntBuffer
to the current
position in a buffer of type T
.convertUnsignedInt
in class VoxelsConverter<UnsignedByteBuffer>
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 void convertFloat(FloatBuffer in, UnsignedByteBuffer out)
VoxelsConverter
FloatBuffer
to the current position in
a buffer of type T
.convertFloat
in class VoxelsConverter<UnsignedByteBuffer>
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.