public class ICSReader extends FormatReader
Modifier and Type | Field and Description |
---|---|
private java.util.Vector<java.lang.Integer> |
channelLengths
The length of each channel axis.
|
private java.util.Vector<java.lang.String> |
channelTypes
The type of each channel axis.
|
private java.lang.String |
currentIcsId
Current filename.
|
private java.lang.String |
currentIdsId |
private byte[] |
data
Image data.
|
static java.lang.String[] |
DATE_FORMATS |
private static java.lang.String[][] |
DOCUMENT_KEYS |
private boolean |
gzip
Whether or not the pixels are GZIP-compressed.
|
private java.util.zip.GZIPInputStream |
gzipStream |
private boolean |
hasInstrumentData |
private static java.lang.String[][] |
HISTORY_KEYS |
private boolean |
invertY
Whether or not the image is inverted along the Y axis.
|
private java.lang.String |
labels
Dimensional reordering for lifetime data
|
private static java.lang.String[][] |
LAYOUT_KEYS |
private boolean |
lifetime
Whether or not the channels represent lifetime histogram bins.
|
static java.lang.String |
NL
Newline characters.
|
private long |
offset
Offset to pixel data.
|
private static java.lang.String[][] |
OTHER_KEYS |
private static java.lang.String[][] |
PARAMETER_KEYS |
private int |
prevImage |
private static java.lang.String[][] |
REPRESENTATION_KEYS |
private static java.lang.String[][] |
SENSOR_KEYS |
private boolean |
storedRGB |
private boolean |
versionTwo
Flag indicating whether current file is v2.0.
|
private static java.lang.String[][] |
VIEW_KEYS |
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 |
---|
ICSReader()
Constructs a new ICSReader.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
checkUnit(java.lang.String actual,
java.lang.String... expected)
Verifies that a unit matches the expected value.
|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private boolean |
compareTokens(java.lang.String[] tokens,
int tokenIndex,
java.lang.String[] regexes,
int regexesIndex) |
private java.lang.String |
concatenateTokens(java.lang.String[] tokens,
int start,
int stop) |
int |
fileGroupOption(java.lang.String id)
Returns an indication of whether the files in a multi-file dataset can
be handled individually.
|
(package private) java.lang.String[] |
findKeyValue(java.lang.String[] tokens,
java.lang.String[][] regexesArray) |
private java.lang.String[] |
findKeyValueForCategory(java.lang.String[] tokens,
java.lang.String[][] regexesArray) |
private java.lang.String[] |
findKeyValueOther(java.lang.String[] tokens,
java.lang.String[][] regexesArray) |
java.lang.String[] |
getDomains()
Returns the list of domains represented by the current file.
|
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 |
isInterleaved(int subC)
Gets whether or not the given sub-channel is interleaved.
|
boolean |
isSingleFile(java.lang.String id)
Returns true if the named file is expected to be the only
file in the dataset.
|
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.
|
private java.lang.Double[] |
splitDoubles(java.lang.String v)
Splits the given string into a list of
Double s. |
private java.lang.String[] |
tokenize(java.lang.String line) |
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, 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, getOptimalTileHeight, 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, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, 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
public static final java.lang.String NL
public static final java.lang.String[] DATE_FORMATS
private static final java.lang.String[][] DOCUMENT_KEYS
private static final java.lang.String[][] HISTORY_KEYS
private static final java.lang.String[][] LAYOUT_KEYS
private static final java.lang.String[][] PARAMETER_KEYS
private static final java.lang.String[][] REPRESENTATION_KEYS
private static final java.lang.String[][] SENSOR_KEYS
private static final java.lang.String[][] VIEW_KEYS
private static java.lang.String[][] OTHER_KEYS
private java.lang.String currentIcsId
private java.lang.String currentIdsId
private boolean versionTwo
private byte[] data
private long offset
private boolean gzip
private java.util.zip.GZIPInputStream gzipStream
private boolean invertY
private boolean lifetime
private java.lang.String labels
private java.util.Vector<java.lang.Integer> channelLengths
private java.util.Vector<java.lang.String> channelTypes
private int prevImage
private boolean hasInstrumentData
private boolean storedRGB
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 java.lang.String[] getDomains()
IFormatReader
getDomains
in interface IFormatReader
getDomains
in class FormatReader
public boolean isInterleaved(int subC)
IFormatReader
SDTReader
handles spectral-lifetime data with
interleaved lifetime bins and non-interleaved spectral channels.isInterleaved
in interface IFormatReader
isInterleaved
in class FormatReader
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[] 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 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.IFormatReader.openBytes(int, byte[], int, int, int, int)
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 void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
java.io.IOException
public void reopenFile() throws java.io.IOException
IFormatReader
IFormatHandler.setId(java.lang.String)
has been
called, but close(false) has not been called.reopenFile
in interface IFormatReader
reopenFile
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 java.lang.String[] tokenize(java.lang.String line)
java.lang.String[] findKeyValue(java.lang.String[] tokens, java.lang.String[][] regexesArray)
private java.lang.String concatenateTokens(java.lang.String[] tokens, int start, int stop)
private java.lang.String[] findKeyValueForCategory(java.lang.String[] tokens, java.lang.String[][] regexesArray)
private java.lang.String[] findKeyValueOther(java.lang.String[] tokens, java.lang.String[][] regexesArray)
private boolean compareTokens(java.lang.String[] tokens, int tokenIndex, java.lang.String[] regexes, int regexesIndex)
private java.lang.Double[] splitDoubles(java.lang.String v)
Double
s.private boolean checkUnit(java.lang.String actual, java.lang.String... expected)
Copyright © 2020 Open Microscopy Environment