public class ICSReader extends FormatReader
Modifier and Type | Field and Description |
---|---|
private Vector<Integer> |
channelLengths
The length of each channel axis.
|
private Vector<String> |
channelTypes
The type of each channel axis.
|
private String |
currentIcsId
Current filename.
|
private String |
currentIdsId |
private byte[] |
data
Image data.
|
static String[] |
DATE_FORMATS |
private static String[][] |
DOCUMENT_KEYS |
private boolean |
gzip
Whether or not the pixels are GZIP-compressed.
|
private GZIPInputStream |
gzipStream |
private boolean |
hasInstrumentData |
private static String[][] |
HISTORY_KEYS |
private boolean |
invertY
Whether or not the image is inverted along the Y axis.
|
private String |
labels
Dimensional reordering for lifetime data
|
private static String[][] |
LAYOUT_KEYS |
private boolean |
lifetime
Whether or not the channels represent lifetime histogram bins.
|
static String |
NL
Newline characters.
|
private long |
offset
Offset to pixel data.
|
private static String[][] |
OTHER_KEYS |
private static String[][] |
PARAMETER_KEYS |
private int |
prevImage |
private static String[][] |
REPRESENTATION_KEYS |
private static String[][] |
SENSOR_KEYS |
private boolean |
storedRGB |
private boolean |
versionTwo
Flag indicating whether current file is v2.0.
|
private static String[][] |
VIEW_KEYS |
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataOptions, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, LOGGER, suffixes
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
ICSReader()
Constructs a new ICSReader.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
checkUnit(String actual,
String... expected)
Verifies that a unit matches the expected value.
|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private boolean |
compareTokens(String[] tokens,
int tokenIndex,
String[] regexes,
int regexesIndex) |
private String |
concatenateTokens(String[] tokens,
int start,
int stop) |
int |
fileGroupOption(String id)
Returns an int indicating that we cannot, must, or might group the files
in a given dataset.
|
(package private) String[] |
findKeyValue(String[] tokens,
String[][] regexesArray) |
private String[] |
findKeyValueForCategory(String[] tokens,
String[][] regexesArray) |
private String[] |
findKeyValueOther(String[] tokens,
String[][] regexesArray) |
String[] |
getDomains()
Returns the list of domains represented by the current file.
|
String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
protected void |
initFile(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(String id)
Returns true if this is a single-file format.
|
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 Double[] |
splitDoubles(String v)
Splits the given string into a list of
Double s. |
private String[] |
tokenize(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, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getLineCap, getMarker, getMedium, getMetadataOptions, 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, getSupportedMetadataLevels, 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, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries
checkSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
public static final String NL
public static final String[] DATE_FORMATS
private static final String[][] DOCUMENT_KEYS
private static final String[][] HISTORY_KEYS
private static final String[][] LAYOUT_KEYS
private static final String[][] PARAMETER_KEYS
private static final String[][] REPRESENTATION_KEYS
private static final String[][] SENSOR_KEYS
private static final String[][] VIEW_KEYS
private static String[][] OTHER_KEYS
private String currentIcsId
private String currentIdsId
private boolean versionTwo
private byte[] data
private long offset
private boolean gzip
private GZIPInputStream gzipStream
private boolean invertY
private boolean lifetime
private String labels
private int prevImage
private boolean hasInstrumentData
private boolean storedRGB
public boolean isSingleFile(String id) throws FormatException, IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
IOException
public 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(String id) throws FormatException, IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
FormatException
IOException
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, 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.IOException
- if there was a problem reading the file.IFormatReader.openBytes(int, byte[], int, int, int, int)
public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
getSeriesUsedFiles
in class FormatReader
public void close(boolean fileOnly) throws IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
IOException
public void reopenFile() throws 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
IOException
protected void initFile(String id) throws FormatException, IOException
FormatReader
initFile
in class FormatReader
FormatException
- if a parsing error occurs processing the file.IOException
- if an I/O error occurs processing the fileprivate String[] findKeyValueForCategory(String[] tokens, String[][] regexesArray)
private boolean compareTokens(String[] tokens, int tokenIndex, String[] regexes, int regexesIndex)
private Double[] splitDoubles(String v)
Double
s.Copyright © 2016 Open Microscopy Environment