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 |
reader
CAN_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.
|
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).
|
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, 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, setFlattenedResolutions, setGroupFiles, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrap
private 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()
IFormatReader
getSizeX
in interface IFormatReader
getSizeX
in class ReaderWrapper
public int getSizeY()
IFormatReader
getSizeY
in interface IFormatReader
getSizeY
in class ReaderWrapper
public int getSeriesCount()
IFormatReader
getSeriesCount
in interface IFormatReader
getSeriesCount
in class ReaderWrapper
public byte[] openBytes(int no) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
FormatException
java.io.IOException
IFormatReader.openBytes(int, byte[])
public byte[] openBytes(int no, byte[] buf) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
no
- the image index within the file.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
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
FormatException
java.io.IOException
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
no
- the image index within the file.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
IFormatHandler
setId
in interface IFormatHandler
setId
in class ReaderWrapper
FormatException
java.io.IOException
public java.lang.Class<?> getNativeDataType()
IFormatHandler
IFormatReader.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 IFormatHandler
getNativeDataType
in class ReaderWrapper
Copyright © 2019 Open Microscopy Environment