public class QTWriter extends FormatWriter
Modifier and Type | Field and Description |
---|---|
private static long |
BYTE_COUNT_OFFSET
Seek to this offset to update the total number of pixel bytes.
|
protected int |
codec
The codec to use.
|
static int |
CODEC_ANIMATION
Value indicating Animation codec.
|
static int |
CODEC_CINEPAK
Value indicating Cinepak codec.
|
static int |
CODEC_H_263
Value indicating H.263 codec.
|
static int |
CODEC_MOTION_JPEG_B
Value indicating Motion JPEG-B codec.
|
static int |
CODEC_MPEG_4
Value indicating MPEG-4 codec.
|
static int |
CODEC_RAW
Value indicating Raw codec.
|
static int |
CODEC_SORENSON
Value indicating Sorenson codec.
|
static int |
CODEC_SORENSON_3
Value indicating Sorenson 3 codec.
|
protected int |
created
Time the file was created.
|
protected LegacyQTWriter |
legacy
Legacy QuickTime writer.
|
protected boolean |
needLegacy
Whether we need the legacy writer.
|
protected int |
numBytes
Total number of pixel bytes.
|
private int |
numWritten |
protected java.util.List<java.lang.Integer> |
offsets
Vector of plane offsets.
|
protected int |
pad
Number of padding bytes in each row.
|
protected int |
quality
The quality to use.
|
static int |
QUALITY_HIGH
Value indicating High quality.
|
static int |
QUALITY_LOW
Value indicating Low quality.
|
static int |
QUALITY_MAXIMUM
Value indicating Maximum quality.
|
static int |
QUALITY_NORMAL
Value indicating Normal quality.
|
cm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, sequential, series, validBits
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes
Constructor and Description |
---|
QTWriter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canDoStacks()
Reports whether the writer can save multiple images to a single file.
|
void |
close() |
int[] |
getPixelTypes(java.lang.String codec)
Gets the supported pixel types for the given codec.
|
void |
saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Saves the given image tile to the current series in the current file.
|
private void |
setCodec() |
void |
setCodec(int codec)
Sets the encoded movie's codec.
|
void |
setId(java.lang.String id)
Initializes a writer from the input file name.
|
void |
setQuality(int quality)
Sets the quality of the encoded movie.
|
private void |
writeAtom(int length,
java.lang.String type)
Write the atom length and type.
|
private void |
writeFooter() |
private void |
writeRotationMatrix()
Write the 3x3 matrix that describes how to rotate the image.
|
changeOutputFile, checkParams, createOutputStream, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPlaneCount, getPlaneCount, getSamplesPerPixel, getSamplesPerPixel, getSeries, getTileSizeX, getTileSizeY, isFullPlane, isInterleaved, isSupportedType, saveBytes, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, setSeries, setTileSizeX, setTileSizeY, setValidBitsPerPixel, setWriteSequentially
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes, isThisType
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
public static final int CODEC_MOTION_JPEG_B
public static final int CODEC_CINEPAK
public static final int CODEC_ANIMATION
public static final int CODEC_H_263
public static final int CODEC_SORENSON
public static final int CODEC_SORENSON_3
public static final int CODEC_MPEG_4
public static final int CODEC_RAW
public static final int QUALITY_LOW
public static final int QUALITY_NORMAL
public static final int QUALITY_HIGH
public static final int QUALITY_MAXIMUM
private static final long BYTE_COUNT_OFFSET
protected int codec
protected int quality
protected int numBytes
protected java.util.List<java.lang.Integer> offsets
protected int created
protected int pad
protected boolean needLegacy
protected LegacyQTWriter legacy
private int numWritten
public void setCodec(int codec)
codec
- Codec value:public void setQuality(int quality)
quality
- Quality value:public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatWriter
no
- the image index within the current file, starting from 0.buf
- the byte array that represents the image tile.x
- the X coordinate of the upper-left corner of the image tile.y
- the Y coordinate of the upper-left corner of the image tile.w
- the width (in pixels) of the image tile.h
- the height (in pixels) of the image tile.FormatException
- if one of the parameters is invalid.java.io.IOException
- if there was a problem writing to the file.IFormatWriter.saveBytes(int, byte[], int, int, int, int)
public boolean canDoStacks()
IFormatWriter
canDoStacks
in interface IFormatWriter
canDoStacks
in class FormatWriter
public int[] getPixelTypes(java.lang.String codec)
IFormatWriter
getPixelTypes
in interface IFormatWriter
getPixelTypes
in class FormatWriter
public void setId(java.lang.String id) throws FormatException, java.io.IOException
FormatWriter
RandomAccessOutputStream
for the output
file and initializes the metadata for all the series using
FormatWriter.setSeries(int)
.setId
in interface IFormatHandler
setId
in class FormatWriter
id
- a String
specifying the path to the fileFormatException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class FormatWriter
java.io.IOException
private void setCodec()
private void writeFooter() throws java.io.IOException
java.io.IOException
private void writeRotationMatrix() throws java.io.IOException
java.io.IOException
private void writeAtom(int length, java.lang.String type) throws java.io.IOException
java.io.IOException
Copyright © 2017 Open Microscopy Environment