public class PrairieReader extends FormatReader
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String[] | CFG_SUFFIX | 
| private java.lang.String | cfgFileThe associated XML files. | 
| private int[] | channelsList of active channels. | 
| private static java.lang.String | DATE_FORMAT | 
| static java.lang.String[] | ENV_SUFFIX | 
| private java.lang.String | envFileThe associated XML files. | 
| private boolean[] | framesAreTimeWhether a series uses  Frames as time points rather than focal
 planes (i.e., sizeZ and sizeT values inverted). | 
| private PrairieMetadata | metaFormat-specific metadata. | 
| static java.lang.String[] | PRAIRIE_SUFFIXES | 
| private static int | PRAIRIE_TAG_1 | 
| private static int | PRAIRIE_TAG_2 | 
| private static int | PRAIRIE_TAG_3 | 
| private java.util.ArrayList<PrairieMetadata.Sequence> | sequencesList of Prairie metadata  Sequences, ordered by cycle. | 
| private boolean | singleTiffModeFlag indicating that the reader is operating in a mode where grouping of
 files is disallowed. | 
| private TiffReader | tiffHelper reader for opening images. | 
| static java.lang.String[] | XML_SUFFIX | 
| private java.lang.String | xmlFileThe associated XML files. | 
core, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description | 
|---|
| PrairieReader()Constructs a new Prairie TIFF reader. | 
| Modifier and Type | Method and Description | 
|---|---|
| private byte[] | blank(byte[] buf)Blanks out and returns the given buffer. | 
| void | close(boolean fileOnly)Closes the currently open file. | 
| private int | computeSizeT(int sequenceCount)Scans the parsed metadata to determine the number of actual time points
 versus the number of actual stage positions. | 
| private static boolean | equal(ome.units.quantity.Length xPos,
     ome.units.quantity.Length xInitial)Determines whether the two  Lengthvalues are equal. | 
| int | fileGroupOption(java.lang.String id)Returns an indication of whether the files in a multi-file dataset can
 be handled individually. | 
| private loci.common.Location | find(java.lang.String[] suffix)Finds the first file with one of the given suffixes. | 
| private void | findMetadataFiles() | 
| private int | frameIndex(PrairieMetadata.Sequence sequence,
          int z,
          int t,
          int s)Gets the frame index associated with the given (Z, T) position of the
 specified series. | 
| int | getOptimalTileHeight()Returns the optimal sub-image height for use with openBytes. | 
| int | getOptimalTileWidth()Returns the optimal sub-image width for use with openBytes. | 
| private java.lang.String | getPath(PrairieMetadata.PFile file)Gets the absolute path to the filename of the given  PrairieMetadata.PFile. | 
| java.lang.String[] | getSeriesUsedFiles(boolean noPixels)Returns an array of filenames needed to open the current series. | 
| protected void | initFile(java.lang.String id)Initializes the given file (parsing header information, etc.). | 
| private boolean | isMinimumMetadata()Gets whether to populate only the minimum required metadata. | 
| boolean | isSingleFile(java.lang.String id)Returns true if the named file is expected to be the only
 file in the dataset. | 
| boolean | isThisType(loci.common.RandomAccessInputStream stream)Checks if the given stream is a valid stream for this file format. | 
| boolean | isThisType(java.lang.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. | 
| private org.w3c.dom.Document | parseDOM(loci.common.Location file)Parses a  Documentfrom the data in the given file. | 
| private void | parsePrairieMetadata()This step parses the Prairie metadata files into the Prairie-specific
 metadata structure,  meta. | 
| private ome.xml.model.primitives.PositiveFloat | pf(java.lang.Double value,
  java.lang.String name)Converts the given  doubleto aPositiveFloat, ornullif incompatible. | 
| private void | populateCoreMetadata()This step populates the  CoreMetadataby extracting relevant values
 from the parsedmetastructure. | 
| private void | populateOMEMetadata()This step populates the OME  MetadataStoreby extracting relevant
 values from the parsedmetastructure. | 
| private void | populateOriginalMetadata()This steps populates the original metadata table (the tables returned by
  FormatReader.getGlobalMetadata()andFormatReader.getSeriesMetadata()). | 
| private boolean | positionsMatch(int sizeT,
              int sizeP)Verifies that stage coordinates match for all (P, Z) across time. | 
| private PrairieMetadata.Sequence | sequence(int s)Gets the first sequence associated with the given series. | 
| private PrairieMetadata.Sequence | sequence(int t,
        int s)Gets the sequence associated with the given series and time point. | 
| private PrairieMetadata.Sequence | sequence(int t,
        int p,
        int sizeP)Gets the sequence associated with the given time point and stage position. | 
| private void | warnFile(PrairieMetadata.Sequence sequence,
        int index,
        int channel)Emits a warning about a missing  <File>. | 
| private void | warnFilename(PrairieMetadata.Sequence sequence,
            int index,
            int channel)Emits a warning about a  <File>'s missingfilename. | 
| private void | warnFrame(PrairieMetadata.Sequence sequence,
         int index)Emits a warning about a missing  <Frame>. | 
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, flattenHashtables, get16BitLookupTable, get8BitLookupTable, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, 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, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsgetTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytespublic static final java.lang.String[] CFG_SUFFIX
public static final java.lang.String[] ENV_SUFFIX
public static final java.lang.String[] XML_SUFFIX
public static final java.lang.String[] PRAIRIE_SUFFIXES
private static final int PRAIRIE_TAG_1
private static final int PRAIRIE_TAG_2
private static final int PRAIRIE_TAG_3
private static final java.lang.String DATE_FORMAT
private TiffReader tiff
private java.lang.String xmlFile
private java.lang.String cfgFile
private java.lang.String envFile
private PrairieMetadata meta
private java.util.ArrayList<PrairieMetadata.Sequence> sequences
Sequences, ordered by cycle.private int[] channels
private boolean[] framesAreTime
Frames as time points rather than focal
 planes (i.e., sizeZ and sizeT values inverted).
 
 This situation occurs when the series's first Sequence is labeled
 as a "TSeries" (i.e., PrairieMetadata.Sequence.isTimeSeries() returns true), but
 there is only one Sequence.
 
 The array length equals the number of series; i.e., it is a parallel array
 to FormatReader.core.
 
private boolean singleTiffMode
FormatReader.setId(java.lang.String) while FormatReader.isGroupFiles() is false.public boolean isSingleFile(java.lang.String id)
                     throws FormatException,
                            java.io.IOException
IFormatReaderisSingleFile in interface IFormatReaderisSingleFile in class FormatReaderFormatExceptionjava.io.IOExceptionpublic boolean isThisType(java.lang.String name,
                          boolean open)
FormatReaderFormatReader.isThisType(RandomAccessInputStream).isThisType in interface IFormatReaderisThisType in class FormatReaderopen - If true, and the file extension is insufficient to determine
   the file type, the (existing) file is opened for further analysis.public boolean isThisType(loci.common.RandomAccessInputStream stream)
                   throws java.io.IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderstream - A RandomAccessInputStream representing the file to check.
    The first byte in the stream is assumed to be the first byte
    in the file.java.io.IOExceptionpublic int fileGroupOption(java.lang.String id)
                    throws FormatException,
                           java.io.IOException
IFormatReaderfileGroupOption in interface IFormatReaderfileGroupOption in class FormatReaderid - a file in the multi-file datasetFormatTools.MUST_GROUP indicates that the
    files cannot be handled separately; the reader will always detect and
    read all files in the dataset.  FormatTools.CAN_GROUP indicates
    that the files may be handled separately, but file grouping must then
    be disabled via IFormatReader.setGroupFiles(boolean).
    FormatTools.CANNOT_GROUP indicates that the files must be handled
    separately; the reader will not attempt to read all files in the dataset
    (this is rare).FormatExceptionjava.io.IOExceptionFormatTools.MUST_GROUP, 
FormatTools.CAN_GROUP, 
FormatTools.CANNOT_GROUPpublic java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReaderIFormatHandler.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.getSeriesUsedFiles in interface IFormatReadergetSeriesUsedFiles in class FormatReaderpublic int getOptimalTileWidth()
IFormatReadergetOptimalTileWidth in interface IFormatReadergetOptimalTileWidth in class FormatReaderpublic int getOptimalTileHeight()
IFormatReadergetOptimalTileHeight in interface IFormatReadergetOptimalTileHeight in class FormatReaderpublic 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 close(boolean fileOnly)
           throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class FormatReaderjava.io.IOExceptionprotected void initFile(java.lang.String id)
                 throws FormatException,
                        java.io.IOException
FormatReaderinitFile in class FormatReaderFormatException - if a parsing error occurs processing the file.java.io.IOException - if an I/O error occurs processing the fileprivate void findMetadataFiles()
private void parsePrairieMetadata()
                           throws FormatException,
                                  java.io.IOException
meta.FormatExceptionjava.io.IOExceptionprivate void populateCoreMetadata()
                           throws FormatException,
                                  java.io.IOException
CoreMetadata by extracting relevant values
 from the parsed meta structure.FormatExceptionjava.io.IOExceptionprivate void populateOriginalMetadata()
FormatReader.getGlobalMetadata() and FormatReader.getSeriesMetadata()).private void populateOMEMetadata()
                          throws FormatException
MetadataStore by extracting relevant
 values from the parsed meta structure.FormatExceptionprivate boolean isMinimumMetadata()
private org.w3c.dom.Document parseDOM(loci.common.Location file)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      org.xml.sax.SAXException,
                                      java.io.IOException
Document from the data in the given file.javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionprivate void warnFrame(PrairieMetadata.Sequence sequence, int index)
<Frame>.private void warnFile(PrairieMetadata.Sequence sequence, int index, int channel)
<File>.private void warnFilename(PrairieMetadata.Sequence sequence, int index, int channel)
<File>'s missing filename.private java.lang.String getPath(PrairieMetadata.PFile file)
PrairieMetadata.PFile.private byte[] blank(byte[] buf)
private ome.xml.model.primitives.PositiveFloat pf(java.lang.Double value,
                                                  java.lang.String name)
double to a PositiveFloat, or
 null if incompatible.private loci.common.Location find(java.lang.String[] suffix)
private int computeSizeT(int sequenceCount)
private boolean positionsMatch(int sizeT,
                               int sizeP)
private PrairieMetadata.Sequence sequence(int s)
s - The series (i.e., stage position).Sequence.private PrairieMetadata.Sequence sequence(int t, int s)
t - The time point.s - The series (i.e., stage position).Sequence.private PrairieMetadata.Sequence sequence(int t, int p, int sizeP)
t - The time point.p - The stage position.sizeP - The number of stage positions.Sequence.private int frameIndex(PrairieMetadata.Sequence sequence, int z, int t, int s)
sequence - The sequence from which to extract the frame.z - The focal plane.t - The time point.s - The series (i.e., stage position).PrairieMetadata.Sequence.getFrame(int).private static boolean equal(ome.units.quantity.Length xPos,
                             ome.units.quantity.Length xInitial)
Length values are equal.Copyright © 2023 Open Microscopy Environment