public class NativeQTReader extends FormatReader
Modifier and Type | Field and Description |
---|---|
private String |
altCodec
Some movies use two video codecs -- this is the second codec.
|
private int |
altPlanes
Number of frames that use the alternate codec.
|
private int |
bitsPerPixel
Pixel depth.
|
private boolean |
canUsePrevious
Flag indicating whether we can safely use prevPixels.
|
private Vector<Integer> |
chunkSizes
Number of bytes in each plane.
|
private String |
codec
Video codec used by this movie.
|
private static String[] |
CONTAINER_TYPES
List of identifiers for each container atom.
|
private boolean |
flip |
private String |
forkFile |
private boolean |
interlaced
Set to true if the scanlines in a plane are interlaced (mjpb only).
|
private Vector<Integer> |
offsets
Offsets to each plane's pixel data.
|
private long |
pixelBytes
Total number of bytes of pixel data.
|
private long |
pixelOffset
Offset to start of pixel data.
|
private byte[] |
prevPixels
Pixel data for the previous image plane.
|
private int |
prevPlane
Previous plane number.
|
private int |
rawSize
Raw plane size, in bytes.
|
private int |
scale
Amount to subtract from each offset.
|
private boolean |
separatedFork
Flag indicating whether the resource and data fork are separated.
|
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 |
---|
NativeQTReader()
Constructs a new QuickTime reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open 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.).
|
private boolean |
isContainer(String type)
Checks if the given String is a container atom type.
|
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 |
parse(int depth,
long offset,
long length)
Parse all of the atoms in the file.
|
private void |
print(int depth,
long size,
String type)
Debugging method; prints information on an atom.
|
private void |
stripHeader()
Cut off header bytes from a resource fork file.
|
private byte[] |
uncompress(byte[] pixs,
String code)
Uncompresses an image plane according to the the codec identifier.
|
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, get8BitLookupTable, 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, getOptimalTileHeight, getOptimalTileWidth, 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
private static final String[] CONTAINER_TYPES
private long pixelOffset
private long pixelBytes
private int bitsPerPixel
private int rawSize
private byte[] prevPixels
private int prevPlane
private boolean canUsePrevious
private String codec
private String altCodec
private int altPlanes
private int scale
private boolean interlaced
private boolean separatedFork
private String forkFile
private boolean flip
public boolean isThisType(RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
getSeriesUsedFiles
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 parse(int depth, long offset, long length) throws FormatException, IOException
FormatException
IOException
private boolean isContainer(String type)
private void print(int depth, long size, String type)
private byte[] uncompress(byte[] pixs, String code) throws FormatException, IOException
FormatException
IOException
private void stripHeader() throws IOException
IOException
Copyright © 2016 Open Microscopy Environment