Package loci.formats.in
Class VectraReader
- All Implemented Interfaces:
Closeable,AutoCloseable,ICompressedTileReader,IFormatHandler,IFormatReader,IMetadataConfigurable,IPyramidHandler
VectraReader is the reader for PerkinElmer Vectra QPTIFF data
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final org.slf4j.LoggerLogger for this class.private Stringprivate intprivate static final StringTIFF image description prefix for PerkinElmer Vectra/QPTIFF files.Fields inherited from class loci.formats.in.BaseTiffReader
DATE_FORMATSFields inherited from class loci.formats.in.MinimalTiffReader
canSeparateSeries, equalStrips, ifds, lastPlane, mergeSubIFDs, noSubresolutions, seriesToIFD, subResolutionIFDs, thumbnailIFDs, tiffParser, use64BitFields inherited from class loci.formats.SubResolutionFormatReader
coreFields inherited from class loci.formats.FormatReader
coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONFields inherited from class loci.formats.FormatHandler
COMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixesFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean fileOnly) Closes the currently open file.private StringgetIFDComment(int ifdIndex) private intgetIFDIndex(int coreIndex, int no) Returns the index of the IFD to be used for the given core index and image number.private StringgetImageName(int coreIndex) private StringgetImageType(int ifdIndex) intReturns the optimal sub-image height for use with openBytes.intReturns the optimal sub-image width for use with openBytes.Returns an XML string corresponding to the ScanProfile node.String[]getSeriesUsedFiles(boolean noPixels) Returns an array of filenames needed to open the current series.private voidhandleFilter(Element filter, int channel) protected voidPopulates the metadata store using the data parsed inBaseTiffReader.initStandardMetadata()along with some further parsing done in the method itself.protected voidParses standard metadata.booleanisThisType(String name, boolean open) Checks if a file matches the type of this format reader.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[]openThumbBytes(int no) Obtains a thumbnail for the specified image plane from the current file, as a byte array.private voidprocessParentNode(Node parent, String prefix) Methods inherited from class loci.formats.in.BaseTiffReader
getExifTagName, getImageCreationDate, initFile, initMetadata, put, put, put, put, put, put, put, put, put, put, putDouble, putInt, putStringMethods inherited from class loci.formats.in.MinimalTiffReader
copyTile, get16BitLookupTable, get8BitLookupTable, getCompressedByteCount, getIFDs, getThumbnailIFDs, getThumbSizeX, getThumbSizeY, getTileIndex, initTiffParser, isThisType, reopenFile, setResolutionLevelMethods inherited from class loci.formats.SubResolutionFormatReader
coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution, setSeriesMethods inherited from class loci.formats.FormatReader
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, 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, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, readPlane, readPlane, readPlane, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataListsMethods inherited from class loci.formats.FormatHandler
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.ICompressedTileReader
getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytesMethods inherited from interface loci.formats.IFormatHandler
getFormat, getNativeDataType, getSuffixesMethods inherited from interface loci.formats.IMetadataConfigurable
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERLogger for this class. -
SOFTWARE_CHECK
TIFF image description prefix for PerkinElmer Vectra/QPTIFF files.- See Also:
-
ANNOTATION_SUFFIX
- See Also:
-
EXTRA_FILES
-
pyramidDepth
private int pyramidDepth -
profileXML
-
allFiles
-
-
Constructor Details
-
VectraReader
public VectraReader()Constructs a new Vectra reader.
-
-
Method Details
-
isThisType
Description copied from class:FormatReaderChecks if a file matches the type of this format reader. Checks filename suffixes against those known for this format. If the suffix check is inconclusive and the open parameter is true, the file is opened and tested withFormatReader.isThisType(RandomAccessInputStream).- Specified by:
isThisTypein interfaceIFormatReader- Overrides:
isThisTypein classFormatReader- Parameters:
open- If true, and the file extension is insufficient to determine the file type, the (existing) file is opened for further analysis.
-
getSeriesUsedFiles
Description copied from interface:IFormatReaderReturns an array of filenames needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned. The first element in the array is expected to be the path passed toIFormatHandler.setId(String), if appropriate based upon 'noPixels'. The remaining elements are expected to be in a consistent order; if a directory listing is necessary to build the list then it should be sorted first.- Specified by:
getSeriesUsedFilesin interfaceIFormatReader- Overrides:
getSeriesUsedFilesin classFormatReader
-
openBytes
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException Description copied from interface:IFormatReaderObtains a sub-image of the specified image plane into a pre-allocated byte array.- Specified by:
openBytesin interfaceIFormatReader- Overrides:
openBytesin classMinimalTiffReader- Parameters:
no- 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-image- Returns:
- the pre-allocated buffer
buffor convenience. - Throws:
FormatException- if there was a problem parsing the metadata of the file.IOException- if there was a problem reading the file.- See Also:
-
openThumbBytes
Description copied from interface:IFormatReaderObtains a thumbnail for the specified image plane from the current file, as a byte array.- Specified by:
openThumbBytesin interfaceIFormatReader- Overrides:
openThumbBytesin classMinimalTiffReader- Throws:
FormatExceptionIOException
-
close
Description copied from interface:IFormatReaderCloses the currently open file. If the flag is set, this is all that happens; if unset, it is equivalent to callingCloseable.close().- Specified by:
closein interfaceIFormatReader- Overrides:
closein classMinimalTiffReader- Throws:
IOException
-
getOptimalTileWidth
public int getOptimalTileWidth()Description copied from interface:IFormatReaderReturns the optimal sub-image width for use with openBytes.- Specified by:
getOptimalTileWidthin interfaceIFormatReader- Overrides:
getOptimalTileWidthin classMinimalTiffReader
-
getOptimalTileHeight
public int getOptimalTileHeight()Description copied from interface:IFormatReaderReturns the optimal sub-image height for use with openBytes.- Specified by:
getOptimalTileHeightin interfaceIFormatReader- Overrides:
getOptimalTileHeightin classMinimalTiffReader
-
initStandardMetadata
Description copied from class:BaseTiffReaderParses standard metadata. NOTE: Absolutely no calls to the metadata store should be made in this method or methods that override this method. Data will be overwritten if you do so.- Overrides:
initStandardMetadatain classBaseTiffReader- Throws:
FormatExceptionIOException
-
initMetadataStore
Description copied from class:BaseTiffReaderPopulates the metadata store using the data parsed inBaseTiffReader.initStandardMetadata()along with some further parsing done in the method itself. All calls to the activeMetadataStoreshould be made in this method and only in this method. This is especially important for sub-classes that override the getters for pixel set array size, etc.- Overrides:
initMetadataStorein classBaseTiffReader- Throws:
FormatException
-
handleFilter
-
processParentNode
-
getScanProfileXML
Returns an XML string corresponding to the ScanProfile node. The QPTIFF specification indicates that the ScanProfile is XML, but in practice it may be XML or JSON. -
getImageName
-
getIFDComment
-
getImageType
-
getIFDIndex
private int getIFDIndex(int coreIndex, int no) Returns the index of the IFD to be used for the given core index and image number. The IFD order in general is: - IFD #0 to n-1: full resolution images (1 RGB for BF data, n grayscale for FL) - IFD #n: RGB thumbnail - IFD #n+1 to (n*2)-1: 50% resolution images (optional) - IFD #n*2 to (n*3)-1: 25% resolution images (optional) ... - macro/overview image (optional) - label image (optional)
-