public class UnsignedByteFromUnsignedInt extends ToUnsignedByteWithScaling
If more than 8-bits are being used in the input values, scaling is applied to map the range of effective-bits (how many bits are used) to an 8-bit range.
scaling
destinationSize, extent, sourceIncrement, sourceSize
Constructor and Description |
---|
UnsignedByteFromUnsignedInt(int effectiveBits)
Create with a number of effective-bits.
|
Modifier and Type | Method and Description |
---|---|
protected int |
bytesPerVoxel()
The number bytes to describe each source-voxel.
|
protected int |
extractScaledValue(byte[] sourceArray,
int index,
boolean littleEndian)
Extracts a value from the source-array, and apply any scaling and clamping.
|
copyChangeOrientation, copyKeepOrientation, supportsMultipleChannelsPerSourceBuffer
convert, convertSliceOfSingleChannel, copyAllChannels, setupBefore
public UnsignedByteFromUnsignedInt(int effectiveBits)
effectiveBits
- the number of bits that are used in the input-type e.g. 8 or 12 or 16.protected int bytesPerVoxel()
ConvertTo
bytesPerVoxel
in class ConvertTo<UnsignedByteBuffer>
protected int extractScaledValue(byte[] sourceArray, int index, boolean littleEndian)
ToUnsignedByteWithScaling
extractScaledValue
in class ToUnsignedByteWithScaling
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.