public class ZeissCZIReader extends FormatReader
Modifier and Type | Class and Description |
---|---|
(package private) class |
ZeissCZIReader.Attachment
Segment with ID "ZISRAWATTACH".
|
(package private) class |
ZeissCZIReader.AttachmentDirectory
Segment with ID "ZISRAWATTDIR".
|
(package private) static class |
ZeissCZIReader.AttachmentEntry |
(package private) static class |
ZeissCZIReader.Channel |
(package private) static class |
ZeissCZIReader.Coordinate |
(package private) static class |
ZeissCZIReader.DimensionEntry |
(package private) class |
ZeissCZIReader.Directory
Segment with ID "ZISRAWDIRECTORY".
|
(package private) class |
ZeissCZIReader.DirectoryEntry |
(package private) class |
ZeissCZIReader.FileHeader
Segment with ID "ZISRAWFILE".
|
(package private) class |
ZeissCZIReader.Metadata
Segment with ID "ZISRAWMETADATA".
|
(package private) class |
ZeissCZIReader.Segment
Top-level class that implements logic common to all types of Segment.
|
(package private) class |
ZeissCZIReader.SubBlock
Segment with ID "ZISRAWSUBBLOCK".
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
acquiredDate |
private int |
acquisitions |
private java.lang.String |
airPressure |
private static int |
ALIGNMENT |
static boolean |
ALLOW_AUTOSTITCHING_DEFAULT |
static java.lang.String |
ALLOW_AUTOSTITCHING_KEY |
private int |
angles |
private static int |
BGR_24 |
private static int |
BGR_48 |
private static int |
BGR_FLOAT |
private static int |
BGRA_8 |
private java.util.ArrayList<java.lang.String> |
binnings |
private static int |
BUFFER_SIZE |
private java.util.ArrayList<ZeissCZIReader.Channel> |
channels |
private java.lang.String |
co2Percent |
private static int |
COMPLEX |
private static int |
COMPLEX_FLOAT |
private java.lang.String |
correctionCollar |
private static java.lang.String |
CZI_MAGIC_STRING |
private java.lang.String |
description |
private java.util.ArrayList<java.lang.String> |
detectorRefs |
private java.util.ArrayList<ZeissCZIReader.Attachment> |
extraImages |
private java.lang.String |
gain |
private java.util.ArrayList<java.lang.String> |
gains |
private static int |
GRAY_DOUBLE |
private static int |
GRAY_FLOAT |
private static int |
GRAY16 |
private static int |
GRAY32 |
private static int |
GRAY8
Pixel type constants.
|
private boolean |
hasDetectorSettings |
private static int |
HEADER_SIZE |
private java.lang.String |
humidity |
private java.lang.String[] |
illuminationLabels |
private int |
illuminations |
private java.lang.String |
imageName |
static boolean |
INCLUDE_ATTACHMENTS_DEFAULT |
static java.lang.String |
INCLUDE_ATTACHMENTS_KEY |
private java.util.HashMap<ZeissCZIReader.Coordinate,java.util.ArrayList<java.lang.Integer>> |
indexIntoPlanes |
private static int |
JPEG |
private static int |
JPEGXR |
private static int |
LZW |
private int |
maxResolution |
private java.lang.String |
medium |
private int |
mosaics |
private java.lang.String |
objectiveSettingsID |
private javax.xml.parsers.DocumentBuilder |
parser |
private java.lang.String[] |
phaseLabels |
private int |
phases |
private java.util.HashMap<java.lang.Integer,java.lang.String> |
pixels |
private java.util.ArrayList<ZeissCZIReader.SubBlock> |
planes |
private int |
plateColumns |
private java.util.ArrayList<java.lang.String> |
platePositions |
private int |
plateRows |
private int |
positions |
private ome.units.quantity.Length[] |
positionsX |
private ome.units.quantity.Length[] |
positionsY |
private ome.units.quantity.Length[] |
positionsZ |
private java.lang.Boolean |
prestitched |
private int |
previousChannel |
private java.lang.String |
refractiveIndex |
static boolean |
RELATIVE_POSITIONS_DEFAULT |
static java.lang.String |
RELATIVE_POSITIONS_KEY |
private java.lang.String[] |
rotationLabels |
private int |
rotations |
private int |
scaleFactor |
private int |
scanDim |
private java.util.ArrayList<ZeissCZIReader.Segment> |
segments |
private MetadataStore |
store |
private java.lang.String |
temperature |
private int[] |
tileHeight |
private int[] |
tileWidth |
private ome.units.quantity.Time |
timeIncrement |
private java.util.ArrayList<java.lang.Double> |
timestamps |
static boolean |
TRIM_DIMENSIONS_DEFAULT |
static java.lang.String |
TRIM_DIMENSIONS_KEY |
private static int |
UNCOMPRESSED
Compression constants.
|
private java.lang.String |
userDisplayName |
private java.lang.String |
userEmail |
private java.lang.String |
userFirstName |
private java.lang.String |
userInstitution |
private java.lang.String |
userLastName |
private java.lang.String |
userMiddleName |
private java.lang.String |
userName |
private java.lang.String |
zoom |
private ome.units.quantity.Length |
zStep |
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 |
---|
ZeissCZIReader()
Constructs a new Zeiss .czi reader.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowAutostitching() |
private void |
assignPlaneIndices() |
private void |
calculateDimensions() |
private void |
calculateDimensions(int coreIndex,
boolean xyOnly) |
boolean |
canReadAttachments() |
private boolean |
checkPALM(java.lang.String xml) |
void |
close(boolean fileOnly)
Closes the currently open file.
|
private void |
convertPixelType(CoreMetadata ms0,
int pixelType) |
private void |
convertPixelType(int pixelType) |
private byte[] |
decode12BitCamera(byte[] data,
int maxBytes) |
short[][] |
get16BitLookupTable()
Gets the 16-bit color lookup table associated with
the most recently opened image.
|
byte[][] |
get8BitLookupTable()
Gets the 8-bit color lookup table associated with
the most recently opened image.
|
protected java.util.ArrayList<java.lang.String> |
getAvailableOptions()
Returns the list of available metadata options.
|
private org.w3c.dom.Element |
getFirstNode(org.w3c.dom.Element root,
java.lang.String name) |
private java.lang.String |
getFirstNodeValue(org.w3c.dom.Element root,
java.lang.String name) |
private org.w3c.dom.NodeList |
getGrandchildren(org.w3c.dom.Element root,
java.lang.String name) |
private org.w3c.dom.NodeList |
getGrandchildren(org.w3c.dom.Element root,
java.lang.String child,
java.lang.String name) |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width 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 |
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 |
parseObjectives(org.w3c.dom.NodeList objectives) |
private int |
populateCircles(org.w3c.dom.NodeList circles,
int roi,
int shape) |
private int |
populateLines(org.w3c.dom.NodeList lines,
int roi,
int shape) |
private void |
populateOriginalMetadata(org.w3c.dom.Element root,
java.util.Deque<java.lang.String> nameStack) |
private int |
populatePolylines(org.w3c.dom.NodeList polylines,
int roi,
int shape,
boolean closed) |
private int |
populateRectangles(org.w3c.dom.NodeList rectangles,
int roi,
int shape) |
private void |
readAttachments() |
private ZeissCZIReader.Segment |
readSegment(java.lang.String filename) |
private void |
readSegments(java.lang.String id) |
boolean |
storeRelativePositions() |
private void |
translateDisplaySettings(org.w3c.dom.Element root) |
private void |
translateExperiment(org.w3c.dom.Element root) |
private void |
translateHardwareSettings(org.w3c.dom.Element root) |
private void |
translateInformation(org.w3c.dom.Element root) |
private void |
translateLayers(org.w3c.dom.Element root) |
private void |
translateMetadata(java.lang.String xml) |
private void |
translateScaling(org.w3c.dom.Element root) |
boolean |
trimDimensions() |
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, 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, 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, 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, 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 ALLOW_AUTOSTITCHING_KEY
public static final boolean ALLOW_AUTOSTITCHING_DEFAULT
public static final java.lang.String INCLUDE_ATTACHMENTS_KEY
public static final boolean INCLUDE_ATTACHMENTS_DEFAULT
public static final java.lang.String TRIM_DIMENSIONS_KEY
public static final boolean TRIM_DIMENSIONS_DEFAULT
public static final java.lang.String RELATIVE_POSITIONS_KEY
public static final boolean RELATIVE_POSITIONS_DEFAULT
private static final int ALIGNMENT
private static final int HEADER_SIZE
private static final java.lang.String CZI_MAGIC_STRING
private static final int BUFFER_SIZE
private static final int UNCOMPRESSED
private static final int JPEG
private static final int LZW
private static final int JPEGXR
private static final int GRAY8
private static final int GRAY16
private static final int GRAY_FLOAT
private static final int BGR_24
private static final int BGR_48
private static final int BGR_FLOAT
private static final int BGRA_8
private static final int COMPLEX
private static final int COMPLEX_FLOAT
private static final int GRAY32
private static final int GRAY_DOUBLE
private MetadataStore store
private java.util.HashMap<java.lang.Integer,java.lang.String> pixels
private java.util.ArrayList<ZeissCZIReader.Segment> segments
private java.util.ArrayList<ZeissCZIReader.SubBlock> planes
private java.util.HashMap<ZeissCZIReader.Coordinate,java.util.ArrayList<java.lang.Integer>> indexIntoPlanes
private int rotations
private int positions
private int illuminations
private int acquisitions
private int mosaics
private int phases
private int angles
private int maxResolution
private java.lang.String imageName
private java.lang.String acquiredDate
private java.lang.String description
private java.lang.String userDisplayName
private java.lang.String userName
private java.lang.String userFirstName
private java.lang.String userLastName
private java.lang.String userMiddleName
private java.lang.String userEmail
private java.lang.String userInstitution
private java.lang.String temperature
private java.lang.String airPressure
private java.lang.String humidity
private java.lang.String co2Percent
private java.lang.String correctionCollar
private java.lang.String medium
private java.lang.String refractiveIndex
private transient ome.units.quantity.Time timeIncrement
private java.lang.String zoom
private java.lang.String gain
private java.util.ArrayList<ZeissCZIReader.Channel> channels
private java.util.ArrayList<java.lang.String> binnings
private java.util.ArrayList<java.lang.String> detectorRefs
private java.util.ArrayList<java.lang.Double> timestamps
private transient java.util.ArrayList<java.lang.String> gains
private ome.units.quantity.Length[] positionsX
private ome.units.quantity.Length[] positionsY
private ome.units.quantity.Length[] positionsZ
private int previousChannel
private java.lang.Boolean prestitched
private java.lang.String objectiveSettingsID
private boolean hasDetectorSettings
private int scanDim
private java.lang.String[] rotationLabels
private java.lang.String[] phaseLabels
private java.lang.String[] illuminationLabels
private transient javax.xml.parsers.DocumentBuilder parser
private java.util.ArrayList<ZeissCZIReader.Attachment> extraImages
private int[] tileWidth
private int[] tileHeight
private int scaleFactor
private transient ome.units.quantity.Length zStep
private transient int plateRows
private transient int plateColumns
private transient java.util.ArrayList<java.lang.String> platePositions
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
IFormatReader.isThisType(RandomAccessInputStream)
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
IFormatReader.getSeriesUsedFiles(boolean)
public byte[][] get8BitLookupTable() throws FormatException, java.io.IOException
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
FormatException
java.io.IOException
public short[][] get16BitLookupTable() throws FormatException, java.io.IOException
IFormatReader
IFormatReader.isIndexed()
returns
false, then this may return null. Also, if IFormatReader.getPixelType()
returns
anything other than FormatTools.INT16
or FormatTools.UINT16
, this method will return null.get16BitLookupTable
in interface IFormatReader
get16BitLookupTable
in class FormatReader
FormatException
java.io.IOException
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 void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
java.io.IOException
public int getOptimalTileWidth()
IFormatReader
getOptimalTileWidth
in interface IFormatReader
getOptimalTileWidth
in class FormatReader
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
protected java.util.ArrayList<java.lang.String> getAvailableOptions()
FormatReader
getAvailableOptions
in class FormatReader
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 filepublic boolean allowAutostitching()
public boolean canReadAttachments()
public boolean trimDimensions()
public boolean storeRelativePositions()
private void readSegments(java.lang.String id) throws java.io.IOException
java.io.IOException
private void readAttachments() throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void calculateDimensions()
private void calculateDimensions(int coreIndex, boolean xyOnly)
private void assignPlaneIndices()
private void translateMetadata(java.lang.String xml) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private boolean checkPALM(java.lang.String xml) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void translateInformation(org.w3c.dom.Element root) throws FormatException
FormatException
private void translateScaling(org.w3c.dom.Element root)
private void translateDisplaySettings(org.w3c.dom.Element root) throws FormatException
FormatException
private void translateLayers(org.w3c.dom.Element root)
private void translateHardwareSettings(org.w3c.dom.Element root) throws FormatException
FormatException
private int populateRectangles(org.w3c.dom.NodeList rectangles, int roi, int shape)
private int populatePolylines(org.w3c.dom.NodeList polylines, int roi, int shape, boolean closed)
private int populateLines(org.w3c.dom.NodeList lines, int roi, int shape)
private int populateCircles(org.w3c.dom.NodeList circles, int roi, int shape)
private void translateExperiment(org.w3c.dom.Element root) throws FormatException
FormatException
private org.w3c.dom.Element getFirstNode(org.w3c.dom.Element root, java.lang.String name)
private org.w3c.dom.NodeList getGrandchildren(org.w3c.dom.Element root, java.lang.String name)
private org.w3c.dom.NodeList getGrandchildren(org.w3c.dom.Element root, java.lang.String child, java.lang.String name)
private java.lang.String getFirstNodeValue(org.w3c.dom.Element root, java.lang.String name)
private void populateOriginalMetadata(org.w3c.dom.Element root, java.util.Deque<java.lang.String> nameStack)
private ZeissCZIReader.Segment readSegment(java.lang.String filename) throws java.io.IOException
java.io.IOException
private void convertPixelType(int pixelType) throws FormatException
FormatException
private void convertPixelType(CoreMetadata ms0, int pixelType) throws FormatException
FormatException
private void parseObjectives(org.w3c.dom.NodeList objectives) throws FormatException
FormatException
private byte[] decode12BitCamera(byte[] data, int maxBytes) throws java.io.IOException
java.io.IOException
Copyright © 2021 Open Microscopy Environment