Package loci.formats.out
Class AVIWriter
java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatWriter
loci.formats.out.AVIWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,ICompressedTileWriter,IFormatHandler,IFormatWriter,IMetadataConfigurable,IPyramidHandler
AVIWriter is the file format writer for AVI files.
Much of this writer's code was adapted from Wayne Rasband's
AVI Movie Writer plugin for ImageJ
(available at http://rsb.info.nih.gov/ij/).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final Stringprivate longprivate static final longprivate static final longprivate longprivate intprivate static final longprivate intprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate longprivate intprivate intprivate intprivate intprivate intFields inherited from class loci.formats.FormatWriter
cm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, resolution, resolutionData, sequential, series, validBitsFields inherited from class loci.formats.FormatHandler
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReports whether the writer can save multiple images to a single file.voidclose()int[]getPixelTypes(String codec) Gets the supported pixel types for the given codec.voidsaveBytes(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.voidInitializes a writer from the input file name.Methods inherited from class loci.formats.FormatWriter
changeOutputFile, checkParams, createOutputStream, getCodecOptions, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPlaneCount, getPlaneCount, getResolution, getResolutionCount, getResolutions, getSamplesPerPixel, getSamplesPerPixel, getSeries, getSizeX, getSizeY, getTileSizeX, getTileSizeY, hasResolutions, isFullPlane, isInterleaved, isSupportedType, saveBytes, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, setResolution, setResolutions, setSeries, setTileSizeX, setTileSizeY, setValidBitsPerPixel, setWriteSequentiallyMethods inherited from class loci.formats.FormatHandler
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.ICompressedTileWriter
getCodec, saveCompressedBytesMethods inherited from interface loci.formats.IFormatHandler
getFormat, getNativeDataType, getSuffixes, isThisTypeMethods inherited from interface loci.formats.IMetadataConfigurable
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
-
Field Details
-
SAVE_MOVI
private static final long SAVE_MOVI- See Also:
-
SAVE_FILE_SIZE
private static final long SAVE_FILE_SIZE- See Also:
-
SAVE_STRF_SIZE
private static final long SAVE_STRF_SIZE- See Also:
-
SAVE_STRN_POS
private static final long SAVE_STRN_POS- See Also:
-
SAVE_JUNK_SIG
private static final long SAVE_JUNK_SIG- See Also:
-
SAVE_LIST1_SIZE
private static final long SAVE_LIST1_SIZE- See Also:
-
SAVE_LIST1_SUBSIZE
private static final long SAVE_LIST1_SUBSIZE- See Also:
-
FRAME_OFFSET
private static final long FRAME_OFFSET- See Also:
-
FRAME_OFFSET_2
private static final long FRAME_OFFSET_2- See Also:
-
PADDING_BYTES
private static final long PADDING_BYTES- See Also:
-
SAVE_LIST2_SIZE
private static final long SAVE_LIST2_SIZE- See Also:
-
DATA_SIGNATURE
- See Also:
-
planesWritten
private int planesWritten -
bytesPerPixel
private int bytesPerPixel -
xDim
private int xDim -
yDim
private int yDim -
zDim
private int zDim -
tDim
private int tDim -
xPad
private int xPad -
microSecPerFrame
private int microSecPerFrame -
savedbLength
-
idx1Pos
private long idx1Pos -
endPos
private long endPos -
saveidx1Length
private long saveidx1Length
-
-
Constructor Details
-
AVIWriter
public AVIWriter()
-
-
Method Details
-
saveBytes
public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException Description copied from interface:IFormatWriterSaves the given image tile to the current series in the current file.- Parameters:
no- the plane index within the series.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.- Throws:
FormatException- if one of the parameters is invalid.IOException- if there was a problem writing to the file.- See Also:
-
canDoStacks
public boolean canDoStacks()Description copied from interface:IFormatWriterReports whether the writer can save multiple images to a single file.- Specified by:
canDoStacksin interfaceIFormatWriter- Overrides:
canDoStacksin classFormatWriter
-
getPixelTypes
Description copied from interface:IFormatWriterGets the supported pixel types for the given codec.- Specified by:
getPixelTypesin interfaceIFormatWriter- Overrides:
getPixelTypesin classFormatWriter
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFormatWriter- Throws:
IOException
-
setId
Description copied from class:FormatWriterInitializes a writer from the input file name. Initializes aRandomAccessOutputStreamfor the output file and initializes the metadata for all the series usingFormatWriter.setSeries(int).- Specified by:
setIdin interfaceIFormatHandler- Overrides:
setIdin classFormatWriter- Parameters:
id- aStringspecifying the path to the file- Throws:
FormatExceptionIOException
-