public class BfPyramidPixelBuffer extends java.lang.Object implements PixelBuffer
PixelBuffer implementation which uses Bio-Formats to
read pixels data directly from original files.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PYR_LOCK_EXT |
protected OmeroPixelsPyramidReader |
reader
Bio-Formats implementation the delegate uses to read the backing TIFF.
|
protected OmeroPixelsPyramidWriter |
writer
Bio-Formats implementation used to write to the backing TIFF.
|
| Modifier | Constructor and Description |
|---|---|
|
BfPyramidPixelBuffer(Pixels pixels,
java.lang.String filePath,
boolean write)
We may want a constructor that takes the id of an imported file
or that takes a File object?
|
|
BfPyramidPixelBuffer(TileSizes sizes,
Pixels pixels,
java.lang.String filePath,
boolean write)
Full constructor taking a
TileSizes implementation which defines
how large the pyramid tiles will be. |
protected |
BfPyramidPixelBuffer(TileSizes sizes,
Pixels pixels,
java.lang.String filePath,
boolean write,
boolean init) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acquireLock() |
byte[] |
calculateMessageDigest()
Calculates a SHA-1 message digest for the entire pixel buffer.
|
void |
checkBounds(java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Checks to ensure that no one particular axis has an offset out of bounds.
|
void |
close()
Closes the buffer, cleaning up file state.
|
protected void |
closeRaf() |
protected void |
closeWriter()
This method should never exit without releasing the lock.
|
java.nio.ByteOrder |
getByteOrder()
Returns the current pixel byte order.
|
int |
getByteWidth()
Returns the byte width for the pixel buffer.
|
PixelData |
getCol(java.lang.Integer x,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Retrieves a particular column from this pixel buffer.
|
byte[] |
getColDirect(java.lang.Integer x,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Retrieves a particular column from this pixel buffer.
|
java.lang.Integer |
getColSize()
Retrieves the in memory size of a column of pixels in this pixel buffer.
|
PixelData |
getHypercube(java.util.List<java.lang.Integer> offset,
java.util.List<java.lang.Integer> size,
java.util.List<java.lang.Integer> step)
Retrieves a hypercube from this pixel buffer.
|
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)
Retrieves a hypercube from the given pixels directly.
|
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()
Retrieves the identifier of this pixel buffer
|
java.lang.String |
getPath()
Retrieves the full path to this pixel buffer on disk
|
PixelData |
getPlane(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Retrieves a particular 2D image plane from this pixel buffer.
|
byte[] |
getPlaneDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Retrieves a particular 2D image plane from this pixel buffer.
|
java.lang.Long |
getPlaneOffset(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Retrieves the offset for a particular 2D image plane in this pixel
buffer.
|
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)
Retrieves a particular region of a 2D image plane from this pixel buffer.
|
byte[] |
getPlaneRegionDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
java.lang.Integer count,
java.lang.Integer offset,
byte[] buffer)
Retrieves a region from a given plane directly.
|
java.lang.Long |
getPlaneSize()
Retrieves the in memory size of a 2D image plane in this pixel buffer.
|
PixelData |
getRegion(java.lang.Integer size,
java.lang.Long offset)
Retrieves a region from this pixel buffer.
|
byte[] |
getRegionDirect(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
Retrieves a region from this pixel buffer directly.
|
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.
|
PixelData |
getRow(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Retrieves a particular row or scanline from this pixel buffer.
|
byte[] |
getRowDirect(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Retrieves a particular row or scanline from this pixel buffer.
|
java.lang.Long |
getRowOffset(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Retrieves the offset for a particular row or scanline in this pixel
buffer.
|
java.lang.Integer |
getRowSize()
Retrieves the in memory size of a row or scanline of pixels in this
pixel buffer.
|
int |
getSizeC()
Retrieves the size in C of this pixel buffer
|
int |
getSizeT()
Retrieves the size in T of this pixel buffer
|
int |
getSizeX()
Retrieves the size in X of this pixel buffer
|
int |
getSizeY()
Retrieves the size in Y of this pixel buffer
|
int |
getSizeZ()
Retrieves the size in Z of this pixel buffer
|
PixelData |
getStack(java.lang.Integer c,
java.lang.Integer t)
Retrieves the the entire number of optical sections for a single
wavelength or channel at a particular timepoint in this pixel buffer.
|
byte[] |
getStackDirect(java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
Retrieves the the entire number of optical sections for a single
wavelength or channel at a particular timepoint in this pixel buffer.
|
java.lang.Long |
getStackOffset(java.lang.Integer c,
java.lang.Integer t)
Retrieves the offset for the entire number of optical sections
for a single wavelength or channel at a particular timepoint in
this pixel buffer.
|
java.lang.Long |
getStackSize()
Retrieves the in memory size of the entire number of optical sections
for a single wavelength or channel at a particular timepoint in
this pixel buffer.
|
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.
|
PixelData |
getTimepoint(java.lang.Integer t)
Retrieves the entire number of optical sections for all
wavelengths or channels at a particular timepoint in this pixel buffer.
|
byte[] |
getTimepointDirect(java.lang.Integer t,
byte[] buffer)
Retrieves the entire number of optical sections for all
wavelengths or channels at a particular timepoint in this pixel buffer.
|
java.lang.Long |
getTimepointOffset(java.lang.Integer t)
Retrieves the in memory size of the entire number of optical sections for
all wavelengths or channels at a particular timepoint in this
pixel buffer.
|
java.lang.Long |
getTimepointSize()
Retrieves the in memory size of the entire number of optical sections for
all wavelengths or channels at a particular timepoint in this
pixel buffer.
|
java.lang.Long |
getTotalSize()
Retrieves the in memory size of the entire pixel buffer.
|
protected void |
init(java.lang.String filePath,
boolean write) |
protected void |
initializeReader()
If the pyramid file exists (which the constructor guarantees) then we
assume that even if a lock file is present, that it's no longer valid.
|
protected void |
initializeWriter(java.lang.String output,
java.lang.String compression,
boolean bigTiff,
int tileWidth,
int tileLength)
Initializes the writer.
|
boolean |
isFloat()
Returns whether or not the pixel buffer has floating point pixels.
|
boolean |
isLittleEndian() |
protected boolean |
isLockedByOthers() |
boolean |
isSigned()
Returns whether or not the pixel buffer has signed pixels.
|
boolean |
isWrite()
Whether or not this instance is in writing-mode.
|
void |
setByteOrder(java.nio.ByteOrder byteOrder)
Sets the pixel byte order.
|
void |
setPlane(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Sets a particular 2D image plane in this pixel buffer.
|
void |
setPlane(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Sets a particular 2D image plane in this pixel buffer.
|
void |
setRegion(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
Sets a region in this pixel buffer.
|
void |
setRegion(java.lang.Integer size,
java.lang.Long offset,
java.nio.ByteBuffer buffer)
Sets a region in this pixel buffer.
|
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)
Sets a particular row or scanline in this pixel buffer.
|
void |
setStack(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Sets the entire number of optical sections for a single
wavelength or channel at a particular timepoint in this pixel buffer.
|
void |
setStack(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
Sets the entire number of optical sections for a single
wavelength or channel at a particular timepoint in this pixel buffer.
|
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)
Sets the entire number of optical sections for all
wavelengths or channels at a particular timepoint in this pixel buffer.
|
void |
setTimepoint(java.nio.ByteBuffer buffer,
java.lang.Integer t)
Sets the entire number of optical sections for all
wavelengths or channels at a particular timepoint in this pixel buffer.
|
protected OmeroPixelsPyramidWriter writer
protected OmeroPixelsPyramidReader reader
public static final java.lang.String PYR_LOCK_EXT
public BfPyramidPixelBuffer(Pixels pixels, java.lang.String filePath, boolean write) throws java.io.IOException, FormatException
java.io.IOExceptionFormatExceptionpublic BfPyramidPixelBuffer(TileSizes sizes, Pixels pixels, java.lang.String filePath, boolean write) throws java.io.IOException, FormatException
TileSizes implementation which defines
how large the pyramid tiles will be.sizes - pixels - filePath - write - java.io.IOExceptionFormatExceptionprotected BfPyramidPixelBuffer(TileSizes sizes, Pixels pixels, java.lang.String filePath, boolean write, boolean init) throws java.io.IOException, FormatException
java.io.IOExceptionFormatExceptionprotected void init(java.lang.String filePath,
boolean write)
throws java.io.IOException,
FormatException
java.io.IOExceptionFormatExceptionprotected void initializeReader()
throws java.io.IOException,
FormatException
java.io.IOExceptionFormatExceptionprotected void initializeWriter(java.lang.String output,
java.lang.String compression,
boolean bigTiff,
int tileWidth,
int tileLength)
throws FormatException
BfPyramidPixelBuffer instances
may try to also call this method in which case acquireLock()
will throw a LockTimeout.output - The file where to write the compressed data.compression - The compression to use.bigTiff - Pass true to set the bigTiff
flag, false otherwise.java.lang.Exception - Thrown if an error occurred.FormatExceptionprotected void acquireLock()
protected void closeRaf()
protected boolean isLockedByOthers()
protected void closeWriter()
throws java.io.IOException
java.io.IOExceptionpublic boolean isWrite()
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
PixelBuffersetTile in interface PixelBufferbuffer - 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 java.nio.ByteOrder getByteOrder()
public void setByteOrder(java.nio.ByteOrder byteOrder)
byteOrder - The pixel byte order to set.public byte[] calculateMessageDigest()
throws java.io.IOException
PixelBuffercalculateMessageDigest in interface PixelBufferjava.io.IOException - if there is a problem reading from the pixel buffer.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
PixelBuffernull may be passed as the argument to any one of the offsets
to ignore it for the purposes of bounds checking.checkBounds in interface PixelBufferx - 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.public void close()
throws java.io.IOException
PixelBufferclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface PixelBufferjava.io.IOException - if an I/O error occurs.public int getByteWidth()
PixelBuffergetByteWidth in interface PixelBufferpublic PixelData getCol(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffergetCol in interface PixelBufferx - 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.getColDirect(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
PixelBuffergetColDirect in interface PixelBufferx - 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.getCol(Integer, Integer, Integer, Integer)public java.lang.Integer getColSize()
PixelBuffergetColSize in interface PixelBufferpublic 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
PixelBuffergetHypercube in interface PixelBufferoffset - 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.DimensionsOutOfBoundsExceptionpublic 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
PixelBuffergetHypercubeDirect in interface PixelBufferoffset - 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.DimensionsOutOfBoundsExceptionpublic 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
PixelBuffergetHypercubeSize in interface PixelBufferoffset - 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 .DimensionsOutOfBoundsExceptionpublic long getId()
PixelBuffergetId in interface PixelBufferpublic java.lang.String getPath()
PixelBuffergetPath in interface PixelBufferpublic PixelData getPlane(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffergetPlane in interface PixelBufferz - 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).public byte[] getPlaneDirect(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
throws java.io.IOException,
DimensionsOutOfBoundsException
PixelBuffergetPlaneDirect in interface PixelBufferz - 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).public java.lang.Long getPlaneOffset(java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws DimensionsOutOfBoundsException
PixelBuffergetPlaneOffset in interface PixelBufferz - 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).public 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
PixelBuffergetPlaneRegion in interface PixelBufferx - 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).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
PixelBuffergetPlaneRegionDirect in interface PixelBufferz - 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.DimensionsOutOfBoundsExceptionPixelBuffer.getRegionDirect(Integer, Long, byte[])public java.lang.Long getPlaneSize()
PixelBuffergetPlaneSize in interface PixelBufferpublic PixelData getRegion(java.lang.Integer size, java.lang.Long offset) throws java.io.IOException
PixelBuffergetRegion in interface PixelBuffersize - 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.getRegionDirect(Integer, Long, byte[])public byte[] getRegionDirect(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
throws java.io.IOException
PixelBuffergetRegionDirect in interface PixelBuffersize - 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.getRegion(Integer, Long)public PixelData getRow(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffergetRow in interface PixelBuffery - 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.getRowDirect(Integer, Integer, Integer, Integer, byte[])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
PixelBuffergetRowDirect in interface PixelBuffery - 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.getRow(Integer, Integer, Integer, Integer)public java.lang.Long getRowOffset(java.lang.Integer y,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws DimensionsOutOfBoundsException
PixelBuffergetRowOffset in interface PixelBuffery - 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).public java.lang.Integer getRowSize()
PixelBuffergetRowSize in interface PixelBufferpublic int getSizeC()
PixelBuffergetSizeC in interface PixelBufferpublic int getSizeT()
PixelBuffergetSizeT in interface PixelBufferpublic int getSizeX()
PixelBuffergetSizeX in interface PixelBufferpublic int getSizeY()
PixelBuffergetSizeY in interface PixelBufferpublic int getSizeZ()
PixelBuffergetSizeZ in interface PixelBufferpublic PixelData getStack(java.lang.Integer c, java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffergetStack in interface PixelBufferc - 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).public byte[] getStackDirect(java.lang.Integer c,
java.lang.Integer t,
byte[] buffer)
throws java.io.IOException,
DimensionsOutOfBoundsException
PixelBuffergetStackDirect in interface PixelBufferc - 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).public java.lang.Long getStackOffset(java.lang.Integer c,
java.lang.Integer t)
throws DimensionsOutOfBoundsException
PixelBuffergetStackOffset in interface PixelBufferc - 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).public java.lang.Long getStackSize()
PixelBuffergetStackSize in interface PixelBufferpublic 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
PixelBuffergetTile in interface PixelBufferz - 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
PixelBuffergetTileDirect in interface PixelBufferz - 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 PixelData getTimepoint(java.lang.Integer t) throws java.io.IOException, DimensionsOutOfBoundsException
PixelBuffergetTimepoint in interface PixelBuffert - 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).public byte[] getTimepointDirect(java.lang.Integer t,
byte[] buffer)
throws java.io.IOException,
DimensionsOutOfBoundsException
PixelBuffergetTimepointDirect in interface PixelBuffert - 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).public java.lang.Long getTimepointOffset(java.lang.Integer t)
throws DimensionsOutOfBoundsException
PixelBuffergetTimepointOffset in interface PixelBuffert - 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).public java.lang.Long getTimepointSize()
PixelBuffergetTimepointSize in interface PixelBufferpublic java.lang.Long getTotalSize()
PixelBuffergetTotalSize in interface PixelBufferpublic boolean isFloat()
PixelBufferisFloat in interface PixelBuffertrue if the pixel buffer as floating point,
false otherwisepublic boolean isSigned()
PixelBufferisSigned in interface PixelBufferpublic boolean isLittleEndian()
public void setPlane(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetPlane in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getPlaneSize().public void setPlane(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetPlane in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getPlaneSize().public void setRegion(java.lang.Integer size,
java.lang.Long offset,
byte[] buffer)
throws java.io.IOException,
java.nio.BufferOverflowException
PixelBuffersetRegion in interface PixelBuffersize - 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.java.nio.BufferOverflowException - if buffer.length > size.public void setRegion(java.lang.Integer size,
java.lang.Long offset,
java.nio.ByteBuffer buffer)
throws java.io.IOException,
java.nio.BufferOverflowException
PixelBuffersetRegion in interface PixelBuffersize - 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.java.nio.BufferOverflowException - if buffer.length > size.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,
java.nio.BufferOverflowException
PixelBuffersetRow in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getRowSize().public void setStack(java.nio.ByteBuffer buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetStack in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getStackSize().public void setStack(byte[] buffer,
java.lang.Integer z,
java.lang.Integer c,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetStack in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getStackSize()().public void setTimepoint(java.nio.ByteBuffer buffer,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetTimepoint in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getTimepointSize().public void setTimepoint(byte[] buffer,
java.lang.Integer t)
throws java.io.IOException,
DimensionsOutOfBoundsException,
java.nio.BufferOverflowException
PixelBuffersetTimepoint in interface PixelBufferbuffer - 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).java.nio.BufferOverflowException - if
buffer.length > PixelBuffer.getTimepointSize().public int getResolutionLevel()
PixelBuffergetResolutionLevel in interface PixelBufferpublic int getResolutionLevels()
PixelBuffergetResolutionLevels in interface PixelBufferpublic java.util.List<java.util.List<java.lang.Integer>> getResolutionDescriptions()
PixelBuffergetResolutionDescriptions in interface PixelBufferpublic java.awt.Dimension getTileSize()
PixelBuffergetTileSize in interface PixelBuffernull if the pixel
buffer is not tiled.public void setResolutionLevel(int resolutionLevel)
PixelBuffersetResolutionLevel in interface PixelBufferresolutionLevel - The resolution level to be used by
the pixel buffer.
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.