Class UnsignedByteFromUnsignedByteNoInterleaving
Object
ConvertTo<UnsignedByteBuffer>
ToUnsignedByte
UnsignedByteFromUnsignedByte
UnsignedByteFromUnsignedByteNoInterleaving
Converts a
ByteBuffer
encoding unsigned bytes (no interleaving) to
unsigned byte type, as expected in an Anchor VoxelBuffer
.
This also supports RGB-encoded bytes, where multiple channels are encoded into each voxel, but without interleaving.
- Author:
- Owen Feehan
-
Field Summary
Fields inherited from class org.anchoranalysis.io.bioformats.copyconvert.ConvertTo
destinationSize, extent, sourceIncrement, sourceSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copyChangeOrientation
(ByteBuffer source, boolean littleEndian, int channelIndexRelative, UnsignedByteBuffer destination, OrientationChange orientationCorrection) Copy the bytes, changing orientation.protected void
copyKeepOrientation
(ByteBuffer source, boolean littleEndian, int channelIndexRelative, UnsignedByteBuffer destination) Copy the bytes, without changing orientation.Methods inherited from class org.anchoranalysis.io.bioformats.copyconvert.tobyte.UnsignedByteFromUnsignedByte
bytesPerVoxel, convert, supportsMultipleChannelsPerSourceBuffer
Methods inherited from class org.anchoranalysis.io.bioformats.copyconvert.ConvertTo
convertSliceOfSingleChannel, copyAllChannels, setupBefore
-
Constructor Details
-
UnsignedByteFromUnsignedByteNoInterleaving
public UnsignedByteFromUnsignedByteNoInterleaving()
-
-
Method Details
-
copyKeepOrientation
protected void copyKeepOrientation(ByteBuffer source, boolean littleEndian, int channelIndexRelative, UnsignedByteBuffer destination) Description copied from class:ConvertTo
Copy the bytes, without changing orientation.This is kept separate to
ConvertTo.copyChangeOrientation(java.nio.ByteBuffer, boolean, int, T, org.anchoranalysis.image.core.dimensions.OrientationChange)
as it can be done slightly more efficiently.- Specified by:
copyKeepOrientation
in classConvertTo<UnsignedByteBuffer>
- Parameters:
source
- the buffer we copy all channels from.littleEndian
- true iff the bytes insource
are in little-endian order.channelIndexRelative
- 0 if the buffer is non interleaved, or otherwise the index of the channel among the interleaved channels.destination
- finds an appropriate destination channel for a particular relative-channel-index.
-
copyChangeOrientation
protected void copyChangeOrientation(ByteBuffer source, boolean littleEndian, int channelIndexRelative, UnsignedByteBuffer destination, OrientationChange orientationCorrection) Description copied from class:ConvertTo
Copy the bytes, changing orientation.- Specified by:
copyChangeOrientation
in classConvertTo<UnsignedByteBuffer>
- Parameters:
source
- the buffer we copy all channels from.littleEndian
- true iff the bytes insource
are in little-endian order.channelIndexRelative
- 0 if the buffer is non interleaved, or otherwise the index of the channel among the interleaved channels.destination
- finds an appropriate destination channel for a particular relative-channel-index.orientationCorrection
- any correction of orientation to be applied as bytes are converted.
-