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, 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(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.
|
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) |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width for use with openBytes.
|
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(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(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 void |
readAttachments() |
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, 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
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 String ALLOW_AUTOSTITCHING_KEY
public static final boolean ALLOW_AUTOSTITCHING_DEFAULT
public static final String INCLUDE_ATTACHMENTS_KEY
public static final boolean INCLUDE_ATTACHMENTS_DEFAULT
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 int maxResolution
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 transient ome.units.quantity.Time timeIncrement
private String zoom
private String gain
private ArrayList<ZeissCZIReader.Channel> channels
private ome.units.quantity.Length[] positionsX
private ome.units.quantity.Length[] positionsY
private ome.units.quantity.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
private ArrayList<ZeissCZIReader.Attachment> extraImages
private int[] tileWidth
private int[] tileHeight
private int scaleFactor
public boolean isThisType(loci.common.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
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 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 filepublic boolean allowAutostitching()
public boolean canReadAttachments()
private void readSegments(String id) throws IOException
IOException
private void readAttachments() throws FormatException, IOException
FormatException
IOException
private void calculateDimensions()
private void calculateDimensions(int coreIndex, boolean xyOnly)
private void assignPlaneIndices()
private void translateMetadata(String xml) throws FormatException, IOException
FormatException
IOException
private boolean checkPALM(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 convertPixelType(CoreMetadata ms0, int pixelType) throws FormatException
FormatException
private void parseObjectives(NodeList objectives) throws FormatException
FormatException
private byte[] decode12BitCamera(byte[] data, int maxBytes) throws IOException
IOException
Copyright © 2017 Open Microscopy Environment