public class MultipleImagesReader extends LMSFileReader
LMSFileReader.ImageFormat| Modifier and Type | Field and Description |
|---|---|
private boolean |
dimensionsSwapped |
private LMSFileReader.ImageFormat |
imageFormat |
private int |
imageIndex |
private java.util.List<FormatReader> |
readers |
private int |
series |
private int |
tileCount |
associatedXmlDoc, log, metaTemp, OLD_PHYSICAL_SIZE_DEFAULT, OLD_PHYSICAL_SIZE_KEYcore, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
MultipleImagesReader(XlifDocument xlif,
int imageIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
int |
getBitsPerPixel()
Gets the number of valid bits per pixel.
|
LMSFileReader.ImageFormat |
getImageFormat()
Returns the file format in which actual image bytes are stored
|
int |
getPixelType()
Gets the pixel type.
|
int |
getRGBChannelCount()
Gets the number of channels returned with each call to openBytes.
|
int |
getSizeC()
Gets the size of the C dimension.
|
private void |
initReaders(java.util.List<java.lang.String> ids)
Creates an internal reader for each image file
|
boolean |
isRGB()
Checks if the image planes in the file have more than one channel per
IFormatReader.openBytes(int) call. |
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.
|
void |
reopenFile()
Reopen any files that were closed, and which are expected to be open
while the reader is open.
|
void |
setCoreMetadata(CoreMetadata cmd) |
void |
setMetadataTempBuffer(MetadataTempBuffer metaTemp) |
void |
setSeries(int no)
Sets the field MultipleImagesReader.series.
|
void |
swapDimensions()
Rearranges frame order from ZSTC order (used in XLIFs) to desired CoreMetadata.dimensionOrder
|
addSeriesMeta, addSeriesMetaList, fileExists, getCore, makeFilterMetadata, setCore, translateMetadata, translateMetadata, useOldPhysicalSizeCalculationaddGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, close, coreIndexToSeries, fileGroupOption, flattenHashtables, get16BitLookupTable, get8BitLookupTable, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, initFile, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsgetTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytesprivate java.util.List<FormatReader> readers
private LMSFileReader.ImageFormat imageFormat
private int tileCount
private boolean dimensionsSwapped
private int series
private int imageIndex
public MultipleImagesReader(XlifDocument xlif, int imageIndex) throws FormatException, java.io.IOException
FormatExceptionjava.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 FormatReaderno - 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 setSeries(int no)
setSeries in interface IFormatReadersetSeries in class FormatReaderpublic int getRGBChannelCount()
IFormatReadergetRGBChannelCount in interface IFormatReadergetRGBChannelCount in class FormatReaderpublic int getBitsPerPixel()
IFormatReaderIFormatReader.getPixelType().getBitsPerPixel in interface IFormatReadergetBitsPerPixel in class FormatReaderpublic int getPixelType()
IFormatReadergetPixelType in interface IFormatReadergetPixelType in class FormatReaderFormatTools
static pixel types such as FormatTools.INT8.public int getSizeC()
IFormatReadergetSizeC in interface IFormatReadergetSizeC in class FormatReaderpublic boolean isRGB()
IFormatReaderIFormatReader.openBytes(int) call.
This method returns true if and only if IFormatReader.getRGBChannelCount()
returns a value greater than 1.isRGB in interface IFormatReaderisRGB in class FormatReaderpublic void close(boolean fileOnly)
throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class LMSFileReaderjava.io.IOExceptionprivate void initReaders(java.util.List<java.lang.String> ids)
throws FormatException,
java.io.IOException
ids - list of file idsFormatExceptionjava.io.IOExceptionpublic LMSFileReader.ImageFormat getImageFormat()
LMSFileReadergetImageFormat in class LMSFileReaderpublic void setMetadataTempBuffer(MetadataTempBuffer metaTemp)
public void setCoreMetadata(CoreMetadata cmd)
public void swapDimensions()
throws FormatException
cmd - corresponding CoreMetadata (expecting that all tiles have the same dimension sizes)FormatExceptionpublic void reopenFile()
throws java.io.IOException
IFormatReaderIFormatHandler.setId(java.lang.String) has been
called, but close(false) has not been called.reopenFile in interface IFormatReaderreopenFile in class FormatReaderjava.io.IOExceptionCopyright © 2024 Open Microscopy Environment