public class BioRadReader extends FormatReader
Modifier and Type | Class and Description |
---|---|
(package private) class |
BioRadReader.BioRadHandler
SAX handler for parsing XML.
|
(package private) class |
BioRadReader.Note |
Modifier and Type | Field and Description |
---|---|
private boolean |
brokenNotes |
private java.util.List<java.lang.Double> |
gain |
private int |
lastChannel |
private static boolean |
LITTLE_ENDIAN
Always little endian.
|
private byte[][][] |
lut |
static int |
LUT_LENGTH |
private static java.lang.String[] |
MERGE_NAMES
List of merge types.
|
static java.lang.String[] |
NOTE_NAMES
List of note types.
|
static int |
NOTE_TYPE_4D_SERIES |
static int |
NOTE_TYPE_ARROW |
static int |
NOTE_TYPE_COLLECT |
static int |
NOTE_TYPE_FILE1 |
static int |
NOTE_TYPE_FILE2 |
static int |
NOTE_TYPE_LINE |
static int |
NOTE_TYPE_LIVE |
static int |
NOTE_TYPE_MERGE |
static int |
NOTE_TYPE_NUMBER |
static int |
NOTE_TYPE_SCALEBAR |
static int |
NOTE_TYPE_STRUCTURE |
static int |
NOTE_TYPE_THRUVIEW |
static int |
NOTE_TYPE_USER |
static int |
NOTE_TYPE_VARIABLE |
private java.util.List<BioRadReader.Note> |
noteStrings |
private java.util.List<java.lang.Double> |
offset |
private static int |
PIC_FILE_ID
Numerical ID of a valid Bio-Rad PIC file.
|
static java.lang.String[] |
PIC_SUFFIX |
private java.lang.String[] |
picFiles |
static java.lang.String[] |
STRUCTURE_LABELS_1
Structure labels.
|
static java.lang.String[] |
STRUCTURE_LABELS_2 |
static java.lang.String[] |
STRUCTURE_LABELS_3 |
static java.lang.String[] |
STRUCTURE_LABELS_4 |
static java.lang.String[] |
STRUCTURE_LABELS_5 |
static java.lang.String[] |
STRUCTURE_LABELS_6 |
private java.util.List<java.lang.String> |
used |
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
BioRadReader()
Constructs a new BioRadReader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
int |
fileGroupOption(java.lang.String id)
Returns an indication of whether the files in a multi-file dataset can
be handled individually.
|
byte[][] |
get8BitLookupTable()
Gets the 8-bit color lookup table associated with
the most recently opened image.
|
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
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.).
|
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 boolean |
parseNotes(MetadataStore store) |
private void |
readLookupTables(loci.common.RandomAccessInputStream s)
Read all lookup tables from the given file into the 'lut' variable.
|
private void |
readNotes(loci.common.RandomAccessInputStream s,
boolean add)
Read all of the note strings from the given file.
|
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, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, 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, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, updateMetadataLists
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
private static final int PIC_FILE_ID
private static final boolean LITTLE_ENDIAN
private static final java.lang.String[] MERGE_NAMES
public static final java.lang.String[] NOTE_NAMES
public static final int NOTE_TYPE_LIVE
public static final int NOTE_TYPE_FILE1
public static final int NOTE_TYPE_NUMBER
public static final int NOTE_TYPE_USER
public static final int NOTE_TYPE_LINE
public static final int NOTE_TYPE_COLLECT
public static final int NOTE_TYPE_FILE2
public static final int NOTE_TYPE_SCALEBAR
public static final int NOTE_TYPE_MERGE
public static final int NOTE_TYPE_THRUVIEW
public static final int NOTE_TYPE_ARROW
public static final int NOTE_TYPE_VARIABLE
public static final int NOTE_TYPE_STRUCTURE
public static final int NOTE_TYPE_4D_SERIES
public static final java.lang.String[] STRUCTURE_LABELS_1
public static final java.lang.String[] STRUCTURE_LABELS_2
public static final java.lang.String[] STRUCTURE_LABELS_3
public static final java.lang.String[] STRUCTURE_LABELS_4
public static final java.lang.String[] STRUCTURE_LABELS_5
public static final java.lang.String[] STRUCTURE_LABELS_6
public static final java.lang.String[] PIC_SUFFIX
public static final int LUT_LENGTH
private java.util.List<java.lang.String> used
private java.lang.String[] picFiles
private byte[][][] lut
private int lastChannel
private boolean brokenNotes
private java.util.List<BioRadReader.Note> noteStrings
private java.util.List<java.lang.Double> offset
private java.util.List<java.lang.Double> gain
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
public boolean isSingleFile(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
java.io.IOException
public boolean isThisType(java.lang.String name, boolean open)
FormatReader
FormatReader.isThisType(RandomAccessInputStream)
.isThisType
in interface IFormatReader
isThisType
in class FormatReader
open
- 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
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
stream
- 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.IOException
public int fileGroupOption(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
id
- 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).FormatException
java.io.IOException
FormatTools.MUST_GROUP
,
FormatTools.CAN_GROUP
,
FormatTools.CANNOT_GROUP
public byte[][] get8BitLookupTable()
IFormatReader
IFormatReader.isIndexed()
returns
false, then this may return null. Also, if IFormatReader.getPixelType()
returns
anything other than FormatTools.INT8
or FormatTools.UINT8
,
this method will return null.get8BitLookupTable
in interface IFormatReader
get8BitLookupTable
in class FormatReader
public java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
IFormatHandler.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 IFormatReader
getSeriesUsedFiles
in class FormatReader
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 FormatReader
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.IFormatReader.openBytes(int, byte[], int, int, int, int)
public void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
java.io.IOException
protected void initFile(java.lang.String id) throws FormatException, java.io.IOException
FormatReader
initFile
in class FormatReader
FormatException
- if a parsing error occurs processing the file.java.io.IOException
- if an I/O error occurs processing the fileprivate void readNotes(loci.common.RandomAccessInputStream s, boolean add) throws java.io.IOException
java.io.IOException
private boolean parseNotes(MetadataStore store) throws FormatException
FormatException
private void readLookupTables(loci.common.RandomAccessInputStream s) throws java.io.IOException
java.io.IOException
Copyright © 2019 Open Microscopy Environment