Package ome.io.nio
Class ReorderedPixelData
- java.lang.Object
-
- ome.util.PixelData
-
- ome.io.nio.ReorderedPixelData
-
public class ReorderedPixelData extends ome.util.PixelData
Represents a block of pixel data that needs to be re-ordered in accordance with a DeltaVision file. NOTE: This buffer does not re-order the actual backing buffer soread-only
buffers may be used and potential callers ofgetData()
should be aware of this restriction.- Since:
- 3.0
- See Also:
PixelData
-
-
Constructor Summary
Constructors Constructor Description ReorderedPixelData(java.lang.String pixelsType, java.nio.ByteBuffer data, int rowSize)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getReorderedPixelOffset
public static int getReorderedPixelOffset(int size, int offset, int rowSize)
Returns the re-ordered pixel offset.- Parameters:
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.- Returns:
- See above.
-
getPixelValueDirect
public double getPixelValueDirect(int offset)
Returns the pixel intensity value of the pixel at a given offset within the backing buffer. This method does not take into account bytes per pixel.- Overrides:
getPixelValueDirect
in classome.util.PixelData
- Parameters:
offset
- The absolute offset within the backing buffer.- Returns:
- The intensity value.
-
getData
public java.nio.ByteBuffer getData()
Returns the backing buffer for the pixel data.- Overrides:
getData
in classome.util.PixelData
- Returns:
- See above.
-
getOrder
public java.nio.ByteOrder getOrder()
Returns the byte order of the backing buffer.- Overrides:
getOrder
in classome.util.PixelData
- Returns:
- See above.
-
setOrder
public void setOrder(java.nio.ByteOrder order)
Set the byte order of the backing buffer.- Overrides:
setOrder
in classome.util.PixelData
- Parameters:
order
- The byte order.
-
-