public class ReorderedPixelData
extends ome.util.PixelData
read-only
buffers may be used and
potential callers of getData()
should be aware of this restriction.PixelData
Constructor and Description |
---|
ReorderedPixelData(java.lang.String pixelsType,
java.nio.ByteBuffer data,
int rowSize)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getData()
Returns the backing buffer for the pixel data.
|
java.nio.ByteOrder |
getOrder()
Returns the byte order of the backing buffer.
|
double |
getPixelValueDirect(int offset)
Returns the pixel intensity value of the pixel at a given offset within
the backing buffer.
|
static int |
getReorderedPixelOffset(int size,
int offset,
int rowSize)
Returns the re-ordered pixel offset.
|
void |
setOrder(java.nio.ByteOrder order)
Set the byte order of the backing buffer.
|
public ReorderedPixelData(java.lang.String pixelsType, java.nio.ByteBuffer data, int rowSize)
pixelsType
- The OME pixels type.data
- The raw pixel data.rowSize
- The size of each pixels row in bytes.public static int getReorderedPixelOffset(int size, int offset, int rowSize)
size
- The number of rows in the array.offset
- The offset within the array of rows assuming a top left
origin.rowSize
- The size of each pixels row in bytes.public double getPixelValueDirect(int offset)
getPixelValueDirect
in class ome.util.PixelData
offset
- The absolute offset within the backing buffer.public java.nio.ByteBuffer getData()
getData
in class ome.util.PixelData
public java.nio.ByteOrder getOrder()
getOrder
in class ome.util.PixelData
public void setOrder(java.nio.ByteOrder order)
setOrder
in class ome.util.PixelData
order
- The byte order.