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. (1MB)
|
Constructor and Description |
---|
RomioPixelBuffer(String path,
Pixels pixels)
Creates a new instance.
|
RomioPixelBuffer(String path,
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(Integer x,
Integer y,
Integer z,
Integer c,
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. |
PixelData |
getCol(Integer x,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getColDirect(Integer x,
Integer z,
Integer c,
Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Integer |
getColSize()
Implemented as specified by
PixelBuffer I/F. |
PixelData |
getHypercube(List<Integer> offset,
List<Integer> size,
List<Integer> step)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getHypercubeDirect(List<Integer> offset,
List<Integer> size,
List<Integer> step,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getHypercubeSize(List<Integer> offset,
List<Integer> size,
List<Integer> step)
Retrieves a the size of a hypercube from this pixel buffer.
|
long |
getId()
Implemented as specified by
PixelBuffer I/F. |
PixelData |
getPlane(Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getPlaneDirect(Integer z,
Integer c,
Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getPlaneOffset(Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
PixelData |
getPlaneRegion(Integer x,
Integer y,
Integer width,
Integer height,
Integer z,
Integer c,
Integer t,
Integer stride)
Implemented as specified by
ByteBuffer I/F. |
byte[] |
getPlaneRegionDirect(Integer z,
Integer c,
Integer t,
Integer count,
Integer offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getPlaneSize()
Implemented as specified by
PixelBuffer I/F. |
PixelData |
getRegion(Integer size,
Long offset)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getRegionDirect(Integer size,
Long offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
List<List<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.
|
PixelData |
getRow(Integer y,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getRowDirect(Integer y,
Integer z,
Integer c,
Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getRowOffset(Integer y,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
Integer |
getRowSize()
Implemented as specified by
PixelBuffer I/F. |
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. |
PixelData |
getStack(Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getStackDirect(Integer c,
Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getStackOffset(Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
Long |
getStackSize()
Implemented as specified by
PixelBuffer I/F. |
PixelData |
getTile(Integer z,
Integer c,
Integer t,
Integer x,
Integer y,
Integer w,
Integer h)
Retrieves a tile from this pixel buffer.
|
byte[] |
getTileDirect(Integer z,
Integer c,
Integer t,
Integer x,
Integer y,
Integer w,
Integer h,
byte[] buffer)
Retrieves a tile from this pixel buffer.
|
Dimension |
getTileSize()
Retrieves the tile size for the pixel store.
|
PixelData |
getTimepoint(Integer t)
Implemented as specified by
PixelBuffer I/F. |
byte[] |
getTimepointDirect(Integer t,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
Long |
getTimepointOffset(Integer t)
Implemented as specified by
PixelBuffer I/F. |
Long |
getTimepointSize()
Implemented as specified by
PixelBuffer I/F. |
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 Integer |
safeLongToInteger(Long v)
Converts a Long value to an Integer safely.
|
void |
setPlane(byte[] buffer,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setPlane(ByteBuffer buffer,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setRegion(Integer size,
Long offset,
byte[] buffer)
Implemented as specified by
PixelBuffer I/F. |
void |
setRegion(Integer size,
Long offset,
ByteBuffer buffer)
Implemented as specified by
PixelBuffer I/F. |
void |
setResolutionLevel(int resolutionLevel)
Sets the active resolution level.
|
void |
setRow(ByteBuffer buffer,
Integer y,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setStack(byte[] buffer,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setStack(ByteBuffer buffer,
Integer z,
Integer c,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setTile(byte[] buffer,
Integer z,
Integer c,
Integer t,
Integer x,
Integer y,
Integer w,
Integer h)
Sets a tile in this pixel buffer.
|
void |
setTimepoint(byte[] buffer,
Integer t)
Implemented as specified by
PixelBuffer I/F. |
void |
setTimepoint(ByteBuffer buffer,
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(String path, Pixels pixels)
permitModification
defaults to false.path
- The path to the file.pixels
- The pixels object to handle.public RomioPixelBuffer(String path, Pixels pixels, boolean permitModification)
permitModification
.path
- The path to the file.pixels
- The pixels object to handle.public static Integer safeLongToInteger(Long v)
v
- Long value to convert.ApiUsageException
- If the conversion would cause an overflow
or an underflow.public void checkBounds(Integer x, Integer y, Integer z, Integer c, 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 IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PixelBuffer
IOException
- if an I/O error occurs.public Long getPlaneSize()
PixelBuffer
I/F.getPlaneSize
in interface PixelBuffer
PixelBuffer.getPlaneSize()
public Integer getRowSize()
PixelBuffer
I/F.getRowSize
in interface PixelBuffer
PixelBuffer.getRowSize()
public Integer getColSize()
PixelBuffer
I/F.getColSize
in interface PixelBuffer
PixelBuffer.getColSize()
public Long getStackSize()
PixelBuffer
I/F.getStackSize
in interface PixelBuffer
PixelBuffer.getStackSize()
public Long getTimepointSize()
PixelBuffer
I/F.getTimepointSize
in interface PixelBuffer
PixelBuffer.getTimepointSize()
public Long getTotalSize()
PixelBuffer
I/F.getTotalSize
in interface PixelBuffer
PixelBuffer.getTotalSize()
public Long getRowOffset(Integer y, Integer z, Integer c, 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 Long getPlaneOffset(Integer z, Integer c, 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 Long getStackOffset(Integer c, 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 Long getTimepointOffset(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 PixelData getRegion(Integer size, Long offset) throws 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.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getRegion(Integer, Long)
public byte[] getRegionDirect(Integer size, Long offset, byte[] buffer) throws 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.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getRegionDirect(Integer, Long, byte[])
public PixelData getRow(Integer y, Integer z, Integer c, Integer t) throws 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.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 PixelData getCol(Integer x, Integer z, Integer c, Integer t) throws 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.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(Integer y, Integer z, Integer c, Integer t, byte[] buffer) throws 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.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(Integer x, Integer z, Integer c, Integer t, byte[] buffer) throws 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.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 PixelData getHypercube(List<Integer> offset, List<Integer> size, List<Integer> step) throws 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 .IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getHypercube(List, List, List)
public byte[] getHypercubeDirect(List<Integer> offset, List<Integer> size, List<Integer> step, byte[] buffer) throws 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.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getHypercubeDirect(List, List, List, byte[])
public byte[] getPlaneRegionDirect(Integer z, Integer c, Integer t, Integer count, Integer offset, byte[] buffer) throws 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.IOException
- if there is a problem reading from the pixel buffer.DimensionsOutOfBoundsException
PixelBuffer.getPlaneRegionDirect(Integer, Integer, Integer, Integer,
Integer, byte[])
public PixelData getPlane(Integer z, Integer c, Integer t) throws 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.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 PixelData getPlaneRegion(Integer x, Integer y, Integer width, Integer height, Integer z, Integer c, Integer t, Integer stride) throws 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.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(Integer z, Integer c, Integer t, byte[] buffer) throws 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.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 PixelData getStack(Integer c, Integer t) throws 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.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(Integer c, Integer t, byte[] buffer) throws 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.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 PixelData getTimepoint(Integer t) throws 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.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(Integer t, byte[] buffer) throws 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.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(Integer size, Long offset, byte[] buffer) throws 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.IOException
- if there is a problem writing to the pixel buffer.PixelBuffer.setRegion(Integer, Long, byte[])
public void setRegion(Integer size, Long offset, ByteBuffer buffer) throws 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.IOException
- if there is a problem writing to the pixel buffer.PixelBuffer.setRegion(Integer, Long, ByteBuffer)
public void setRow(ByteBuffer buffer, Integer y, Integer z, Integer c, Integer t) throws 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.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(ByteBuffer buffer, Integer z, Integer c, Integer t) throws 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.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, Integer z, Integer c, Integer t) throws 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.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(ByteBuffer buffer, Integer z, Integer c, Integer t) throws 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.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, Integer z, Integer c, Integer t) throws 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.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(ByteBuffer buffer, Integer t) throws 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.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, Integer t) throws 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.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 IOException
PixelBuffer
I/F.calculateMessageDigest
in interface PixelBuffer
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 String getSha1()
public PixelData getTile(Integer z, Integer c, Integer t, Integer x, Integer y, Integer w, Integer h) throws 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.IOException
- if there is a problem reading from the pixel buffer.PixelBuffer.getTileDirect(Integer, Integer, Integer, Integer, Integer, Integer, Integer, byte[])
public byte[] getTileDirect(Integer z, Integer c, Integer t, Integer x, Integer y, Integer w, Integer h, byte[] buffer) throws 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.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, Integer z, Integer c, Integer t, Integer x, Integer y, Integer w, Integer h) throws IOException, 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.IOException
- if there is a problem writing to the pixel buffer.BufferOverflowException
- if an attempt is made to write off the
end of the file.public int getResolutionLevel()
PixelBuffer
getResolutionLevel
in interface PixelBuffer
public int getResolutionLevels()
PixelBuffer
getResolutionLevels
in interface PixelBuffer
public List<List<Integer>> getResolutionDescriptions()
PixelBuffer
getResolutionDescriptions
in interface PixelBuffer
public 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.public Long getHypercubeSize(List<Integer> offset, List<Integer> size, List<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
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.