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".
|
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 |
---|
ZeissCZIReader()
Constructs a new Zeiss .czi reader.
|
Modifier and Type | Method and Description |
---|---|
private void |
assignPlaneIndices() |
private void |
calculateDimensions() |
void |
close(boolean fileOnly)
Closes the currently open file.
|
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.
|
private Element |
getFirstNode(Element root,
String name) |
private String |
getFirstNodeValue(Element root,
String name) |
private NodeList |
getGrandchildren(Element root,
String name) |
private NodeList |
getGrandchildren(Element root,
String child,
String name) |
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 |
isThisType(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(NodeList objectives) |
private int |
populateCircles(NodeList circles,
int roi,
int shape) |
private int |
populateLines(NodeList lines,
int roi,
int shape) |
private void |
populateOriginalMetadata(Element root,
Deque<String> nameStack) |
private int |
populatePolylines(NodeList polylines,
int roi,
int shape,
boolean closed) |
private int |
populateRectangles(NodeList rectangles,
int roi,
int shape) |
private ZeissCZIReader.Segment |
readSegment(String filename) |
private void |
readSegments(String id) |
private void |
translateDisplaySettings(Element root) |
private void |
translateExperiment(Element root) |
private void |
translateHardwareSettings(Element root) |
private void |
translateInformation(Element root) |
private void |
translateLayers(Element root) |
private void |
translateMetadata(String xml) |
private void |
translateScaling(Element root) |
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, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, 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, 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, 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
private static final int ALIGNMENT
private static final int HEADER_SIZE
private static final 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 ArrayList<ZeissCZIReader.Segment> segments
private ArrayList<ZeissCZIReader.SubBlock> planes
private HashMap<ZeissCZIReader.Coordinate,ArrayList<Integer>> indexIntoPlanes
private int rotations
private int positions
private int illuminations
private int acquisitions
private int mosaics
private int phases
private int angles
private String imageName
private String acquiredDate
private String description
private String userDisplayName
private String userName
private String userFirstName
private String userLastName
private String userMiddleName
private String userEmail
private String userInstitution
private String temperature
private String airPressure
private String humidity
private String co2Percent
private String correctionCollar
private String medium
private String refractiveIndex
private String zoom
private String gain
private ArrayList<ZeissCZIReader.Channel> channels
private Length[] positionsX
private Length[] positionsY
private Length[] positionsZ
private int previousChannel
private Boolean prestitched
private String objectiveSettingsID
private boolean hasDetectorSettings
private int scanDim
private String[] rotationLabels
private String[] phaseLabels
private String[] illuminationLabels
private transient DocumentBuilder parser
public boolean isThisType(RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
IFormatReader.isThisType(RandomAccessInputStream)
public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
getSeriesUsedFiles
in class FormatReader
IFormatReader.getSeriesUsedFiles(boolean)
public byte[][] get8BitLookupTable() throws FormatException, 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
IOException
public short[][] get16BitLookupTable() throws FormatException, 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
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 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 readSegments(String id) throws IOException
IOException
private void calculateDimensions()
private void assignPlaneIndices()
private void translateMetadata(String xml) throws FormatException, IOException
FormatException
IOException
private void translateInformation(Element root) throws FormatException
FormatException
private void translateScaling(Element root)
private void translateDisplaySettings(Element root) throws FormatException
FormatException
private void translateLayers(Element root)
private void translateHardwareSettings(Element root) throws FormatException
FormatException
private int populateRectangles(NodeList rectangles, int roi, int shape)
private int populatePolylines(NodeList polylines, int roi, int shape, boolean closed)
private int populateLines(NodeList lines, int roi, int shape)
private int populateCircles(NodeList circles, int roi, int shape)
private void translateExperiment(Element root) throws FormatException
FormatException
private void populateOriginalMetadata(Element root, Deque<String> nameStack)
private ZeissCZIReader.Segment readSegment(String filename) throws IOException
IOException
private void convertPixelType(int pixelType) throws FormatException
FormatException
private void parseObjectives(NodeList objectives) throws FormatException
FormatException
private byte[] decode12BitCamera(byte[] data, int maxBytes) throws IOException
IOException
Copyright © 2016 Open Microscopy Environment