public class OpenlabReader extends FormatReader
Modifier and Type | Class and Description |
---|---|
protected class |
OpenlabReader.PlaneInfo
Helper class for storing plane info.
|
Modifier and Type | Field and Description |
---|---|
private static int |
CALIBRATION |
private static int |
DEEP_GREY_10 |
private static int |
DEEP_GREY_11 |
private static int |
DEEP_GREY_12 |
private static int |
DEEP_GREY_13 |
private static int |
DEEP_GREY_14 |
private static int |
DEEP_GREY_15 |
private static int |
DEEP_GREY_16 |
private static int |
DEEP_GREY_9 |
private String |
detectorOffset |
private String |
fmt |
private String |
gain |
private static int |
IMAGE_TYPE_1
Tag types.
|
private static int |
IMAGE_TYPE_2 |
private int |
lastPlane |
static long |
LIFF_MAGIC_BYTES |
private List<byte[][]> |
luts |
private static int |
MAC_1_BIT
Image types.
|
private static int |
MAC_16_BIT_COLOR |
private static int |
MAC_16_COLORS |
private static int |
MAC_16_GREYS |
private static int |
MAC_24_BIT_COLOR |
private static int |
MAC_256_COLORS |
private static int |
MAC_256_GREYS |
private static int |
MAC_4_GREYS |
private long |
nextTag |
private int |
numSeries
Number of series.
|
private PictReader |
pict
Helper reader to read PICT data.
|
private int[][] |
planeOffsets |
private OpenlabReader.PlaneInfo[] |
planes |
private boolean |
specialPlateNames |
private int |
subTag |
private int |
tag |
private static int |
USER |
private int |
version
LIFF version (should be 2 or 5).
|
private float |
xcal |
private String |
xPos |
private float |
ycal |
private String |
yPos |
private String |
zPos |
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 |
---|
OpenlabReader()
Constructs a new OpenlabReader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private void |
findNextBlock() |
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.
|
private OpenlabReader.PlaneInfo |
getPlane(int[] zct) |
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this 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.
|
private void |
parseImageNames(int s) |
private String |
readCString() |
private void |
readTagHeader()
Read the next tag.
|
private void |
readVariable() |
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, fileGroupOption, flattenHashtables, get16BitLookupTable, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, 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, 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, isSingleFile, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries
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 long LIFF_MAGIC_BYTES
private static final int MAC_1_BIT
private static final int MAC_4_GREYS
private static final int MAC_16_GREYS
private static final int MAC_16_COLORS
private static final int MAC_256_GREYS
private static final int MAC_256_COLORS
private static final int MAC_16_BIT_COLOR
private static final int MAC_24_BIT_COLOR
private static final int DEEP_GREY_9
private static final int DEEP_GREY_10
private static final int DEEP_GREY_11
private static final int DEEP_GREY_12
private static final int DEEP_GREY_13
private static final int DEEP_GREY_14
private static final int DEEP_GREY_15
private static final int DEEP_GREY_16
private static final int IMAGE_TYPE_1
private static final int IMAGE_TYPE_2
private static final int CALIBRATION
private static final int USER
private PictReader pict
private int version
private int numSeries
private OpenlabReader.PlaneInfo[] planes
private float xcal
private float ycal
private long nextTag
private int tag
private int subTag
private String fmt
private int[][] planeOffsets
private List<byte[][]> luts
private int lastPlane
private String gain
private String detectorOffset
private String xPos
private String yPos
private String zPos
private boolean specialPlateNames
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
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 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 void close(boolean fileOnly) throws IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
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 void readTagHeader() throws IOException
IOException
private void readVariable() throws FormatException, IOException
FormatException
IOException
private void parseImageNames(int s)
private OpenlabReader.PlaneInfo getPlane(int[] zct)
private void findNextBlock() throws IOException
IOException
private String readCString() throws IOException
IOException
Copyright © 2017 Open Microscopy Environment