java.lang.Object
ij.plugin.filter.AVI_Writer
- All Implemented Interfaces:
PlugInFilter
This plugin implements the File/Save As/AVI command.
Supported formats:
Uncompressed 8-bit (gray or indexed color), 24-bit (RGB),
JPEG and PNG compression of individual frames
16-bit and 32-bit (float) images are converted to 8-bit
The plugin is based on the FileAvi class written by William Gandler,
part of Matthew J. McAuliffe's MIPAV program, available from
http://mipav.cit.nih.gov/.
2008-06-05: Support for jpeg and png-compressed output and
composite images by Michael Schmid.
2015-09-28: Writes AVI 2.0 if the file size would be above approx. 0.9 GB
The AVI format written looks like this:
RIFF AVI RIFF HEADER, AVI CHUNK
| LIST hdrl MAIN AVI HEADER
| | avih AVI HEADER
| | LIST strl STREAM LIST(s) (One per stream)
| | | strh STREAM HEADER (Required after above; fourcc type is 'vids' for video stream)
| | | strf STREAM FORMAT (for video: BitMapInfo; may also contain palette)
| | | strn STREAM NAME
| | | indx MAIN 'AVI 2.0' INDEX of 'ix00' indices
| LIST movi MOVIE DATA (maximum approx. 0.95 GB)
| | 00db or 00dc FRAME (b=uncompressed, c=compressed)
| | 00db or 00dc FRAME
| | ...
| | ix00 AVI 2.0-style index of frames within this 'movi' list
RIFF AVIX Only if required by size (this is AVI 2.0 extension)
| LIST movi MOVIE DATA (maximum approx. 0.95 GB)
| | 00db or 00dc FRAME
| | ...
| | ix00 AVI 2.0-style index of frames within this 'movi' list
RIFF AVIX further chunks, each approx 0.95 GB (AVI 2.0)
...
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun(ImageProcessor ip) Asks for the compression type and filename; then saves as AVI fileintThis method is called once when the filter is loaded.voidwriteImage(ImagePlus imp, String path, int compression, int jpegQuality) Writes an ImagePlus (stack) as AVI file.
-
Field Details
-
NO_COMPRESSION
public static final int NO_COMPRESSION- See Also:
-
JPEG_COMPRESSION
public static final int JPEG_COMPRESSION- See Also:
-
PNG_COMPRESSION
public static final int PNG_COMPRESSION- See Also:
-
-
Constructor Details
-
AVI_Writer
public AVI_Writer()
-
-
Method Details
-
setup
Description copied from interface:PlugInFilterThis method is called once when the filter is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt or in the plugins.config file of a jar archive containing the plugin. 'imp' is the currently active image. This method should return a flag word that specifies the filters capabilities.For Plugin-filters specifying the
PlugInFilter.FINAL_PROCESSINGflag, the setup method will be called again, this time with arg = "final" after all other processing is done.- Specified by:
setupin interfacePlugInFilter
-
run
Asks for the compression type and filename; then saves as AVI file- Specified by:
runin interfacePlugInFilter
-
writeImage
public void writeImage(ImagePlus imp, String path, int compression, int jpegQuality) throws IOException Writes an ImagePlus (stack) as AVI file.- Throws:
IOException
-