public class RomioPixelBuffer extends AbstractBuffer implements PixelBuffer
PixelBuffer
Modifier and Type | Field and Description |
---|---|
static int |
MAXIMUM_BUFFER_SIZE
Default maximum buffer size for planar data transfer.
|
Constructor and Description |
---|
RomioPixelBuffer(java.lang.String path,
ome.model.core.Pixels pixels)
Creates a new instance.
|
RomioPixelBuffer(java.lang.String path,
ome.model.core.Pixels pixels,
boolean permitModification)
Creates a new instance, with manual setting of
permitModification . |
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateMessageDigest()
Implemented as specified by
PixelBuffer I/F. |
void |
checkBounds(java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
close()
Closes the buffer, cleaning up file state.
|
int |
getByteWidth()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getCol(java.lang.Integer x,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getColDirect(java.lang.Integer x,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Integer |
getColSize()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getHypercube(java.util.List<java.lang.Integer> offset,
java.util.List<java.lang.Integer> size,
java.util.List<java.lang.Integer> step)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getHypercubeDirect(java.util.List<java.lang.Integer> offset,
java.util.List<java.lang.Integer> size,
java.util.List<java.lang.Integer> step,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getHypercubeSize(java.util.List<java.lang.Integer> offset,
java.util.List<java.lang.Integer> size,
java.util.List<java.lang.Integer> step)
Retrieves a the size of a hypercube from this pixel buffer.
|
long |
getId()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getPlane(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getPlaneDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getPlaneOffset(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getPlaneRegion(java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer width,
java.lang.Integer height,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer stride)
Implemented as specified by
ByteBuffer I/F. |
byte[] |
getPlaneRegionDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer count,
java.lang.Integer offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getPlaneSize()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getRegion(java.lang.Integer size,
java.lang.Long offset)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getRegionDirect(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.util.List<java.util.List<java.lang.Integer>> |
getResolutionDescriptions()
Return a list of lists each of which has sizeX, sizeY for the resolution
level matching the index of the outer index.
|
int |
getResolutionLevel()
Retrieves the active resolution level.
|
int |
getResolutionLevels()
Retrieves the number of resolution levels that the backing
pixels pyramid contains.
|
ome.util.PixelData |
getRow(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getRowDirect(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getRowOffset(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Integer |
getRowSize()
Implemented as specified by
PixelBuffer I/F. |
java.lang.String |
getSha1() |
int |
getSizeC()
Implemented as specified by
PixelBuffer I/F. |
int |
getSizeT()
Implemented as specified by
PixelBuffer I/F. |
int |
getSizeX()
Implemented as specified by
PixelBuffer I/F. |
int |
getSizeY()
Implemented as specified by
PixelBuffer I/F. |
int |
getSizeZ()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getStack(java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getStackDirect(java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getStackOffset(java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getStackSize()
Implemented as specified by
PixelBuffer I/F. |
ome.util.PixelData |
getTile(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer w,
java.lang.Integer h)
Retrieves a tile from this pixel buffer.
|
byte[] |
getTileDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer w,
java.lang.Integer h,
byte[] buffer)
Retrieves a tile from this pixel buffer.
|
java.awt.Dimension |
getTileSize()
Retrieves the tile size for the pixel store.
|
ome.util.PixelData |
getTimepoint(java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getTimepointDirect(java.lang.Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getTimepointOffset(java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getTimepointSize()
Implemented as specified by
PixelBuffer I/F. |
java.lang.Long |
getTotalSize()
Implemented as specified by
PixelBuffer I/F. |
boolean |
isFloat()
Implemented as specified by
PixelBuffer I/F. |
boolean |
isSigned()
Implemented as specified by
PixelBuffer I/F. |
static java.lang.Integer |
safeLongToInteger(java.lang.Long v)
Converts a Long value to an Integer safely.
|
void |
setPlane(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setPlane(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setRegion(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
void |
setRegion(java.lang.Integer size,
java.lang.Long offset,
java.nio.ByteBuffer buffer)
Implemented as specified by
PixelBuffer I/F. |
void |
setResolutionLevel(int resolutionLevel)
Sets the active resolution level.
|
void |
setRow(java.nio.ByteBuffer buffer,
java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setStack(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setStack(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setTile(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer w,
java.lang.Integer h)
Sets a tile in this pixel buffer.
|
void |
setTimepoint(byte[] buffer,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setTimepoint(java.nio.ByteBuffer buffer,
java.lang.Integer t)
Implemented as specified by
PixelBuffer I/F. |
getPath, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPath
public static final int MAXIMUM_BUFFER_SIZE
public RomioPixelBuffer(java.lang.String path, ome.model.core.Pixels pixels)
permitModification
defaults to false.path
- The path to the file.pixels
- The pixels object to handle.public RomioPixelBuffer(java.lang.String path, ome.model.core.Pixels pixels, boolean permitModification)
permitModification
.path
- The path to the file.pixels
- The pixels object to handle.public static java.lang.Integer safeLongToInteger(java.lang.Long v)
v
- Long value to convert.ome.conditions.ApiUsageException
- If the conversion would cause an overflow
or an underflow.public void checkBounds(java.lang.Integer x, java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException
PixelBuffer
I/F.checkBounds
in interface PixelBuffer
x
- offset across the X-axis of the pixel buffer to check.y
- offset across the Y-axis of the pixel buffer to check.z
- offset across the Z-axis of the pixel buffer to check.c
- offset across the C-axis of the pixel buffer to check.t
- offset across the T-axis of the pixel buffer to check.DimensionsOutOfBoundsException
- if y
,
z
, c
or t
is out of bounds.PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface PixelBuffer
java.io.IOException
- if an I/O error occurs.public java.lang.Long getPlaneSize()
PixelBuffer
I/F.getPlaneSize
in interface PixelBuffer
PixelBuffer.getPlaneSize()
public java.lang.Integer getRowSize()
PixelBuffer
I/F.getRowSize
in interface PixelBuffer
PixelBuffer.getRowSize()
public java.lang.Integer getColSize()
PixelBuffer
I/F.getColSize
in interface PixelBuffer
PixelBuffer.getColSize()
public java.lang.Long getStackSize()
PixelBuffer
I/F.getStackSize
in interface PixelBuffer
PixelBuffer.getStackSize()
public java.lang.Long getTimepointSize()
PixelBuffer
I/F.getTimepointSize
in interface PixelBuffer
PixelBuffer.getTimepointSize()
public java.lang.Long getTotalSize()
PixelBuffer
I/F.getTotalSize
in interface PixelBuffer
PixelBuffer.getTotalSize()
public java.lang.Long getRowOffset(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException
PixelBuffer
I/F.getRowOffset
in interface PixelBuffer
y
- offset across the Y-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getRowOffset(Integer, Integer, Integer, Integer)
public java.lang.Long getPlaneOffset(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException
PixelBuffer
I/F.getPlaneOffset
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getPlaneOffset(Integer, Integer, Integer)
public java.lang.Long getStackOffset(java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException
PixelBuffer
I/F.getStackOffset
in interface PixelBuffer
c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getStackOffset(Integer, Integer)
public java.lang.Long getTimepointOffset(java.lang.Integer t) throws DimensionsOutOfBoundsException
PixelBuffer
I/F.getTimepointOffset
in interface PixelBuffer
t
- offset across the T-axis of the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getTimepointOffset(Integer)
public ome.util.PixelData getRegion(java.lang.Integer size, java.lang.Long offset) throws java.io.IOException
PixelBuffer
I/F.getRegion
in interface PixelBuffer
size
- byte width of the region to retrieve.offset
- offset within the pixel buffer.order
set correctly but not that the
backing buffer will have been byte swapped. The buffer is essentially
directly from disk.java.io.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getRegion(Integer, Long)
public byte[] getRegionDirect(java.lang.Integer size, java.lang.Long offset, byte[] buffer) throws java.io.IOException
PixelBuffer
I/F.getRegionDirect
in interface PixelBuffer
size
- byte width of the region to retrieve.offset
- offset within the pixel buffer.buffer
- pre-allocated buffer of the row's size.buffer
containing the data which comprises this
region. It is guaranteed that this buffer will have been byte
swapped. The buffer is essentially directly from disk.java.io.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getRegionDirect(Integer, Long, byte[])
public ome.util.PixelData getRow(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getRow
in interface PixelBuffer
y
- offset across the Y-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getRow(Integer, Integer, Integer, Integer)
public ome.util.PixelData getCol(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getCol
in interface PixelBuffer
x
- offset across the X-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getCol(Integer, Integer, Integer, Integer)
public byte[] getRowDirect(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getRowDirect
in interface PixelBuffer
y
- offset across the Y-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.buffer
- pre-allocated buffer of the row's size.buffer
containing the data which comprises this row
or scanline. It is guaranteed that this buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getRowDirect(Integer, Integer, Integer, Integer, byte[])
public byte[] getColDirect(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getColDirect
in interface PixelBuffer
x
- offset across the X-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.buffer
- pre-allocated buffer of the row's size.buffer
containing the data which comprises this
column. It is guaranteed that this buffer will have been byte swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getColDirect(Integer, Integer, Integer, Integer, byte[])
public ome.util.PixelData getHypercube(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getHypercube
in interface PixelBuffer
offset
- The offset of each dimension of the pixel buffer.size
- The number of pixels to retrieve along each dimension .step
- The step size across each dimension .java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getHypercube(List, List, List)
public byte[] getHypercubeDirect(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getHypercubeDirect
in interface PixelBuffer
offset
- The offset of each dimension of the pixel buffer.size
- The number of pixels to retrieve along each dimension .step
- The step size across each dimension .buffer
- pre-allocated buffer, count
in size.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getHypercubeDirect(List, List, List, byte[])
public byte[] getPlaneRegionDirect(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer count, java.lang.Integer offset, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getPlaneRegionDirect
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.count
- the number of pixels to retrieve.offset
- the offset at which to retrieve count
pixels.buffer
- pre-allocated buffer, count
in size.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getPlaneRegionDirect(Integer, Integer, Integer, Integer,
Integer, byte[])
public ome.util.PixelData getPlane(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getPlane
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getPlane(Integer, Integer, Integer)
public ome.util.PixelData getPlaneRegion(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer stride) throws java.io.IOException, DimensionsOutOfBoundsException
ByteBuffer
I/F.getPlaneRegion
in interface PixelBuffer
x
- offset across the X-axis of the pixel buffer.y
- offset across the Y-axis of the pixel buffer.width
- The number of pixels to retrieve along the X-axis.height
- The number of pixels to retrieve along the Y-axis.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.stride
- The step size.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getPlaneRegion(Integer, Integer, Integer, Integer,
Integer, Integer, Integer, Integer)
public byte[] getPlaneDirect(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getPlaneDirect
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.buffer
- pre-allocated buffer of the plane's size.buffer
containing the data which comprises this 2D
image plane. It is guaranteed that this buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getPlaneDirect(Integer, Integer, Integer, byte[])
public ome.util.PixelData getStack(java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getStack
in interface PixelBuffer
c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getStack(Integer, Integer)
public byte[] getStackDirect(java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getStackDirect
in interface PixelBuffer
c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.buffer
- pre-allocated buffer of the stack's size.buffer
containing the data which comprises this
stack. It is guaranteed that this buffer will have been byte swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getStackDirect(Integer, Integer, byte[])
public ome.util.PixelData getTimepoint(java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getTimepoint
in interface PixelBuffer
t
- offset across the T-axis of the pixel buffer.order
set
correctly but not that the backing buffer will have been byte
swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getTimepoint(Integer)
public byte[] getTimepointDirect(java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.getTimepointDirect
in interface PixelBuffer
t
- offset across the T-axis of the pixel buffer.buffer
- pre-allocated buffer of the timepoint's size.buffer
containing the data which comprises this
timepoint. It is guaranteed that this buffer will have been byte swapped.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.getTimepointDirect(Integer, byte[])
public void setRegion(java.lang.Integer size, java.lang.Long offset, byte[] buffer) throws java.io.IOException
PixelBuffer
I/F.setRegion
in interface PixelBuffer
size
- byte width of the region to set.offset
- offset within the pixel buffer.buffer
- a byte array of the data.java.io.IOException
- if there is a problem writing to the pixel buffer.PixelBuffer.setRegion(Integer, Long, byte[])
public void setRegion(java.lang.Integer size, java.lang.Long offset, java.nio.ByteBuffer buffer) throws java.io.IOException
PixelBuffer
I/F.setRegion
in interface PixelBuffer
size
- byte width of the region to set.offset
- offset within the pixel buffer.buffer
- a byte buffer of the data.java.io.IOException
- if there is a problem writing to the pixel buffer.PixelBuffer.setRegion(Integer, Long, ByteBuffer)
public void setRow(java.nio.ByteBuffer buffer, java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setRow
in interface PixelBuffer
buffer
- a byte buffer of the data comprising this row or scanline.y
- offset across the Y-axis of the pixel buffer.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setRow(ByteBuffer, Integer, Integer, Integer, Integer)
public void setPlane(java.nio.ByteBuffer buffer, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setPlane
in interface PixelBuffer
buffer
- a byte array of the data comprising this 2D image plane.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setPlane(ByteBuffer, Integer, Integer, Integer)
public void setPlane(byte[] buffer, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setPlane
in interface PixelBuffer
buffer
- a byte buffer of the data comprising this 2D image plane.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setPlane(byte[], Integer, Integer, Integer)
public void setStack(java.nio.ByteBuffer buffer, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setStack
in interface PixelBuffer
buffer
- a byte buffer of the data comprising this stack.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setStack(ByteBuffer, Integer, Integer, Integer)
public void setStack(byte[] buffer, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setStack
in interface PixelBuffer
buffer
- a byte array of the data comprising this stack.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setStack(byte[], Integer, Integer, Integer)
public void setTimepoint(java.nio.ByteBuffer buffer, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setTimepoint
in interface PixelBuffer
buffer
- a byte buffer of the data comprising this timepoint.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setTimepoint(ByteBuffer, Integer)
public void setTimepoint(byte[] buffer, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffer
I/F.setTimepoint
in interface PixelBuffer
buffer
- a byte array of the data comprising this timepoint.t
- offset across the T-axis of the pixel buffer.java.io.IOException
- if there is a problem writing to the pixel buffer.DimensionsOutOfBoundsException
- if offsets are out of bounds
after checking with PixelBuffer.checkBounds(Integer, Integer, Integer, Integer, Integer)
.PixelBuffer.setTimepoint(ByteBuffer, Integer)
public byte[] calculateMessageDigest() throws java.io.IOException
PixelBuffer
I/F.calculateMessageDigest
in interface PixelBuffer
java.io.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.calculateMessageDigest()
public int getByteWidth()
PixelBuffer
I/F.getByteWidth
in interface PixelBuffer
PixelBuffer.getByteWidth()
public boolean isSigned()
PixelBuffer
I/F.isSigned
in interface PixelBuffer
PixelBuffer.isSigned()
public boolean isFloat()
PixelBuffer
I/F.isFloat
in interface PixelBuffer
true
if the pixel buffer as floating point,
false
otherwisePixelBuffer.isFloat()
public int getSizeC()
PixelBuffer
I/F.getSizeC
in interface PixelBuffer
PixelBuffer.getSizeC()
public int getSizeT()
PixelBuffer
I/F.getSizeT
in interface PixelBuffer
PixelBuffer.getSizeT()
public int getSizeX()
PixelBuffer
I/F.getSizeX
in interface PixelBuffer
PixelBuffer.getSizeX()
public int getSizeY()
PixelBuffer
I/F.getSizeY
in interface PixelBuffer
PixelBuffer.getSizeY()
public int getSizeZ()
PixelBuffer
I/F.getSizeZ
in interface PixelBuffer
PixelBuffer.getSizeZ()
public long getId()
PixelBuffer
I/F.getId
in interface PixelBuffer
PixelBuffer.getId()
public java.lang.String getSha1()
public ome.util.PixelData getTile(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer x, java.lang.Integer y, java.lang.Integer w, java.lang.Integer h) throws java.io.IOException
PixelBuffer
getTile
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.x
- Top left corner of the tile, X offset.y
- Top left corner of the tile, Y offset.w
- Width of the tile.h
- Height of the tile.java.io.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getTileDirect(Integer, Integer, Integer, Integer, Integer, Integer, Integer, byte[])
public byte[] getTileDirect(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer x, java.lang.Integer y, java.lang.Integer w, java.lang.Integer h, byte[] buffer) throws java.io.IOException
PixelBuffer
getTileDirect
in interface PixelBuffer
z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.x
- Top left corner of the tile, X offset.y
- Top left corner of the tile, Y offset.w
- Width of the tile.h
- Height of the tile.buffer
- Pre-allocated buffer of the tile's size.buffer
containing the data which comprises this
region. It is guaranteed that this buffer will have been byte
swapped. The buffer is essentially directly from disk.java.io.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getTile(Integer, Integer, Integer, Integer, Integer, Integer, Integer)
public void setTile(byte[] buffer, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer x, java.lang.Integer y, java.lang.Integer w, java.lang.Integer h) throws java.io.IOException, java.nio.BufferOverflowException
PixelBuffer
setTile
in interface PixelBuffer
buffer
- A byte array of the data.z
- offset across the Z-axis of the pixel buffer.c
- offset across the C-axis of the pixel buffer.t
- offset across the T-axis of the pixel buffer.x
- Top left corner of the tile, X offset.y
- Top left corner of the tile, Y offset.w
- Width of the tile.h
- Height of the tile.java.io.IOException
- if there is a problem writing to the pixel buffer.java.nio.BufferOverflowException
- if an attempt is made to write off the
end of the file.public int getResolutionLevel()
PixelBuffer
getResolutionLevel
in interface PixelBuffer
PixelBuffer.getResolutionLevels()
. Resolution level 0 is the smallest
resolution and resolution level getResolutionLevels() - 1
is the largest resolution. This is the inverse of how Bio-Formats indexes
resolutions.public int getResolutionLevels()
PixelBuffer
getResolutionLevels
in interface PixelBuffer
public java.util.List<java.util.List<java.lang.Integer>> getResolutionDescriptions()
PixelBuffer
getResolutionDescriptions
in interface PixelBuffer
public java.awt.Dimension getTileSize()
PixelBuffer
getTileSize
in interface PixelBuffer
null
if the pixel
buffer is not tiled.public void setResolutionLevel(int resolutionLevel)
PixelBuffer
setResolutionLevel
in interface PixelBuffer
resolutionLevel
- The resolution level to be used by
the pixel buffer. The level should be non-negative and less
than PixelBuffer.getResolutionLevels()
. Resolution level 0 is the smallest
resolution and resolution level getResolutionLevels() - 1
is the largest resolution. This is the inverse of how Bio-Formats indexes
resolutions.public java.lang.Long getHypercubeSize(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step) throws DimensionsOutOfBoundsException
PixelBuffer
getHypercubeSize
in interface PixelBuffer
offset
- The offset of each dimension of the pixel buffer.size
- The number of pixels to retrieve along each dimension .step
- The step size across each dimension .DimensionsOutOfBoundsException