public class TileStitcher extends ReaderWrapper
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TileStitcher.TileCoordinate |
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private java.lang.Integer[][] |
tileMap |
private int |
tileX |
private int |
tileY |
readerCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
TileStitcher()
Constructs a TileStitcher around a new image reader.
|
TileStitcher(IFormatReader r)
Constructs a TileStitcher with the given reader.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
getNativeDataType()
Returns the native data type of image planes for this reader, as returned
by
IFormatReader.openPlane(int, int, int, int, int) or IFormatWriter.savePlane(int, java.lang.Object). |
int |
getSeriesCount()
Gets the number of series in this file.
|
int |
getSizeX()
Gets the size of the X dimension.
|
int |
getSizeY()
Gets the size of the Y dimension.
|
Codec |
getTileCodec(int no)
Retrieve a codec that can be used to decompress compressed tiles.
|
CodecOptions |
getTileCodecOptions(int no,
int x,
int y)
Retrieve codec options that can be used to decompressed the specified tile.
|
int |
getTileColumns(int no)
Get the number of columns of tiles in the specified plane in the current series.
|
int |
getTileRows(int no)
Get the number of rows of tiles in the specified plane in the current series.
|
static TileStitcher |
makeTileStitcher(IFormatReader r)
Converts the given reader into a TileStitcher, wrapping if needed.
|
byte[] |
openBytes(int no)
Obtains the specified image plane from the current file as a byte array.
|
byte[] |
openBytes(int no,
byte[] buf)
Obtains the specified image plane from the current file into a
pre-allocated byte array of
(sizeX * sizeY * bytesPerPixel * RGB channel count).
|
byte[] |
openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Obtains a sub-image of the specified image plane
into a pre-allocated byte array.
|
byte[] |
openBytes(int no,
int x,
int y,
int w,
int h)
Obtains a sub-image of the specified image plane,
whose upper-left corner is given by (x, y).
|
byte[] |
openCompressedBytes(int no,
byte[] buf,
int x,
int y)
Retrieve the specified tile without performing any decompression.
|
byte[] |
openCompressedBytes(int no,
int x,
int y)
Retrieve the specified tile without performing any decompression.
|
void |
setId(java.lang.String id)
Sets the current file name.
|
close, close, coreIndexToSeries, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCoreMetadataList, getCurrentFile, getDatasetStructureDescription, getDimensionOrder, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getImageCount, getIndex, getIndex, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeZ, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openPlane, openThumbBytes, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrapprivate static final org.slf4j.Logger LOGGER
private int tileX
private int tileY
private java.lang.Integer[][] tileMap
public TileStitcher()
public TileStitcher(IFormatReader r)
public static TileStitcher makeTileStitcher(IFormatReader r)
public int getSizeX()
IFormatReadergetSizeX in interface IFormatReadergetSizeX in class ReaderWrapperpublic int getSizeY()
IFormatReadergetSizeY in interface IFormatReadergetSizeY in class ReaderWrapperpublic int getSeriesCount()
IFormatReadergetSeriesCount in interface IFormatReadergetSeriesCount in class ReaderWrapperpublic byte[] openBytes(int no)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionjava.io.IOExceptionIFormatReader.openBytes(int, byte[])public byte[] openBytes(int no,
byte[] buf)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperno - the plane index within the current series.buf - a pre-allocated buffer.buf for convenience.FormatException - if there was a problem parsing the metadata of the
file.java.io.IOException - if there was a problem reading the file.public byte[] openBytes(int no,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionjava.io.IOExceptionpublic byte[] openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperno - the plane index within the current series.buf - a pre-allocated buffer.x - X coordinate of the upper-left corner of the sub-imagey - Y coordinate of the upper-left corner of the sub-imagew - width of the sub-imageh - height of the sub-imagebuf for convenience.FormatException - if there was a problem parsing the metadata of the
file.java.io.IOException - if there was a problem reading the file.public void setId(java.lang.String id)
throws FormatException,
java.io.IOException
IFormatHandlersetId in interface IFormatHandlersetId in class ReaderWrapperFormatExceptionjava.io.IOExceptionpublic int getTileRows(int no)
ICompressedTileReadergetTileRows in interface ICompressedTileReadergetTileRows in class ReaderWrapperno - plane indexpublic int getTileColumns(int no)
ICompressedTileReadergetTileColumns in interface ICompressedTileReadergetTileColumns in class ReaderWrapperno - plane indexpublic byte[] openCompressedBytes(int no,
int x,
int y)
throws FormatException,
java.io.IOException
ICompressedTileReaderopenCompressedBytes in interface ICompressedTileReaderopenCompressedBytes in class ReaderWrapperno - plane indexx - tile X index (indexed from 0, @see getTileColumns(int))y - tile Y index (indexed from 0, @see getTileRows(int))FormatExceptionjava.io.IOExceptionpublic byte[] openCompressedBytes(int no,
byte[] buf,
int x,
int y)
throws FormatException,
java.io.IOException
ICompressedTileReaderopenCompressedBytes in interface ICompressedTileReaderopenCompressedBytes in class ReaderWrapperno - plane indexbuf - pre-allocated buffer in which to store compressed bytesx - tile X index (indexed from 0, @see getTileColumns(int))y - tile Y index (indexed from 0, @see getTileRows(int))FormatExceptionjava.io.IOExceptionpublic Codec getTileCodec(int no) throws FormatException, java.io.IOException
ICompressedTileReadergetTileCodec in interface ICompressedTileReadergetTileCodec in class ReaderWrapperno - plane indexFormatExceptionjava.io.IOExceptionICompressedTileReader.openCompressedBytes(int, int, int)public CodecOptions getTileCodecOptions(int no, int x, int y) throws FormatException, java.io.IOException
ICompressedTileReadergetTileCodecOptions in interface ICompressedTileReadergetTileCodecOptions in class ReaderWrapperno - plane indexx - tile X index (indexed from 0, @see getTileColumns(int))y - tile Y index (indexed from 0, @see getTileRows(int))FormatExceptionjava.io.IOExceptionICompressedTileReader.getTileCodec(int)public java.lang.Class<?> getNativeDataType()
IFormatHandlerIFormatReader.openPlane(int, int, int, int, int) or IFormatWriter.savePlane(int, java.lang.Object).
For most readers this type will be a byte array; however, some readers
call external APIs that work with other types such as
BufferedImage.getNativeDataType in interface IFormatHandlergetNativeDataType in class ReaderWrapperCopyright © 2025 Open Microscopy Environment