AVI Splitter

Authors: Marco Caimi
Advanced Light and Electron Microscopy Bio-Imaging Centre
San Raffaele Scientific Institute
Milan Italy
History: 2004/08/02: First version
Limitations:Only works with uncompressed AVIs
Source: ALEMBIC_AVISplitter.java
Installation: Download ALEMBIC_AVISplitter.java to the plugins folder and compile it with the "Compile and Run" command. Restartng ImageJ will add an "ALEMBIC AVISplitter" command to the Plugins menu.
Description:

ALEMBIC AVI Splitter is an ImageJ plug-in for viewing and importing AVI files by reading frame data directly from the file. It is based on the AVI reader plug-in and accepts grayscale or 24-bit, uncompressed AVI files. The current version is 0.2.

Quick instructions: start the AVI Splitter plug-in by selecting it in the ImageJ Plugins menu. Choose the AVI file in the Select AVI file dialog. An AVI Preview Window is then displayed.

[AVISplitter]

The Preview window consists of two main work areas: the frame preview area and the remote control area.

The frame preview area displays, from left to right, the current frame, the start frame and the end frame. At any time, the start and stop frames identify a section of the source file that can be exported to an ImageJ stack window. The current frame can be used to examine the AVI file and/or as a reference to set start and stop frames. Initially the current frame is set to the first frame of the AVI file, the start frame to the first frame and the end frame to the last frame of the file. The Preview Window title can be used to check the frame number of current, start and end frame.

The remote control area can be used to scan the AVI file, to set current/start/end frames, to export one or more sections of the file and to exit the plugin. A description of each remote control interface component follows.

Remote control interface component Function
Slider control Used to scan the AVI file. Moving the slider causes the current frame preview image and frame number text field to change.
<< button Sets current frame to first frame
< button Sets current frame to previous frame
Frame number text field Displays current frame number. To quickly go to a frame in the file, enter a frame number and press ENTER. The current frame preview window will be updated to reflect the new position in file.
> button Sets current frame to next frame
>> button Sets current frame to last frame
Play button Replays the AVI filr from disk. To stop the replay press this button again.
Constrain check-box Limits the replay to the currently selected section instead of the whole file. In other words, selecting the constrain control before pressing the Play button causes the AVI file segment contained within the start and stop frames to be played.
Repeat check-box Causes the file or segment to be replayed repeatedly.
Ping-pong check-box Causes the file or segment to be replayed in a ping-pong fashion.
Delay text box Delay in milliseconds between frames when the replay function is active. Higher values produce slower replay. To set the delay, make sure the file is not playing, enter a value in the text box, then press the ENTER button. Then press the play button. While the replay is active, entering values in the text box does not have any effect.
Set Curr button Sets current frame preview to the frame number displayed in the frame number text field. To quickly access a frame in the file, enter aframe number in frame number text box, then press the Set Curr button.
Set Start button Sets the start frame to the frame number displayed in the frame number text box.
Set End button Sets the end frame to the frame number displayed in the frame number text box.
Segment text box Specifies the segment or segments that will be exported upon pressing the Export button. See Exporting sections below for more details.
Export button Exports frames indicated in the segment text box to an ImageJ stack window for later processing or saving
Exit button Closes the preview window and exits the plugin.

Exporting sections: this plug-in allows export of one or more non-contiguous segments of the AVI file to a new stack. To export one or more segments, in the segment text box enter segment boundaries according to the following format:

min1-max1, min2-max2, ...

Note that segments are identified by their first and last frame numbers, separated by a dash. Different segments are separated by a comma. The following picture displays how the segment text box should be filled to export two segments to a stack.

[segmenttbox]

After pressing the Export button, segments from frame 5 to 10 and from frame 14 to 19 will be exported to a stack window. The window title will bear the avi file name followed by the segment list composing its frames as showed by the following picture.

[quasiediting]

Quick start: to extract a portion of an avi file, follow these instructions

  1. Start the AVI Splitter plugin from the ImageJ plugin menu.
  2. Choose an uncompressed grayscale-color AVI file in the file dialog.
  3. Examine the AVI file frames pressing the slider bar, <<, <, >>, >, Play buttons. If you want, enter a frame number in the frame number text box, then press ENTER or the Set Curr button to quickly access that frame.
  4. When you have located the initial frame of the file portion to export, press the Set Start button. The start frame is set to the current frame number and the preview image is changed accordingly. Note that the segment text box is updated to reflect the start frame.
  5. Repeat step 3 to locate the end frame, then press the Set End button to set the end frame. Note that the segment text box is updated to reflect the stop frame.
  6. If you want press the constrain check-box and the Play button to play the selected segment.
  7. Export the file portion to an ImageJ stack pressing Export. A new stack window called <filename>_<startframenumber>_<endframenumber> is displayed. You can process or save the exported stack by selecting its window then using the processing or save commands of ImageJ.
  8. Repeat steps 3-6 to export another file section.
  9. If you want, export more than one file section in the same stack by following instructions detailed in Exporting Sections. A new stack window called <filename>: <min1>-<max1>, <min2>-<max2>, ... is displayed. You can process or save the exported stack by selecting its window then using the processing or save commands of ImageJ.
  10. Close the plugin pressing the Exit button.

|Plugins | Home |