Overview
4d Tools is a set of macros/plugin for (1) import of legacy 4d datasets as movies (.MOV, .MP4, .AVI); (2) simplified import of Imaris .IMS and Micro-manager 1.4/2.0 datasets into Fiji; and (3) experimental playback of maximum-intensity projections on the fly as a crude attempt to recaptiulate legacy Perkin-Elmer UltraView software.
Rationale
-
Import of legacy datasets is useful for many long-established C. elegans laboratories, for example, which have large numbers of legacy 4d DIC datasets as movies in xytc format. For this vintage approach, see, for example: doi:10.1126/science.273.5275.603
-
Micro-Manager has an integrated playback mechanisms built on top of ImageJ, and a free multi-platform Imaris player is avaialble, but in some cases direct import into Fiji is useful, and these macros simplify this process for routine work.
-
Oddly, there doesn’t seem to be a stratighforward way to display a “range” of Z slices as a maximium intensity projection in ImageJ/Fiji. Old Perkin-Elmer Ultraview software had this functionality.
Installation in Fiji
Add the 4d-Tools update site using the Fiji update sites manager. After updating, five new menu itms will be aqdded to Fiji:
4d Import options
A “4d” submenu will be added to the “Import” menu in Fiji. Four items will be avaialble in this submenu:
- Classic 4d AVI to Hyperstack: Imports a 4d AVI video as a Virtual Hyperstack. It looks for a plain text file with the same root name as video. If none is found the macro will ask for the number of focal planes.
- Classic 4d Movie to Hyperstack: Imports a 4d Quicktime .MOV or an MPEG4 .MP4 video as a 4d Virtual Hyperstack using FFMpeg. It looks for a plain text file with the same root name as the video. If none is found the macro will ask for the number of focal planes. FFmpeg is very versatile in terms of video formats; particularly valuable for classic QWuicktime movies, both MPEG will accept
- Classic 4d Movie to Hyperstack Bio-Formats: Imports a 4d Quicktime .MOV or an MPEG4 .MP4 video as a 4d Virtual Hyperstack using the Bio-Formats Importer built into Fiji. It looks for a plain text file with the same root name as the video. If none is found the macro will ask for the number of focal planes. NOTE #1: due to an issue with Bio-Formats virtual hyperstacks, the data is loaded into RAM. A warning dialog asks if this is OK. NOTE #2: For historical reasons, Bio-Formats focused on the Motion JPEG B codec (compression.decompression) format. Attempting to import MPEG A formatted video will throw an error.
- Classic 4d Viewer to Hyperstack: Imports classic 4d Viewer data (a folder of .MOV or .mov files) as a 4d Virtual Hyperstack using the Bio-Formats Importer built into Fiji. Rather than using the 4d Viewer info file, it simply counts the number of movie files, which are assumed to be the indivual focal planes. NOTE: this script only displays the movie data; displaying annotation/overlay information is not supported.
- PE AVIs to Hyperstack: Imports a series of AVIs exported from the old Perkin-Elmer UltraView LCI software into Fiji. The PE software doidn’t pad the numbers in filenames with leading zeroes. Unless this is done prior to impoort misordering of images will occur. There ar emay platform-specific file renaming applications that will do this. For PE AVIs one easy way to pad filenames in Fiji is the Pad Image Names macro tool.
- PE TIFFs to Hyperstack: Imports a TIFF data series geenrated using the old Perkin-Elmer UltraView LCI software into Fiji. This is actually just a wrapper for the Bio-Formats Importer plugin with a couple of paramaters set via script.
- Imaris to Hyperstack: Imports the highest-resolution dataset in an Imaris .IMS file (a variant of the HDF5 format) as a Virtual Hyperstack using the Bio-Formats Importer built into Fiji.
- MM Images to Hyperstack: Imports a Micro-Manager 1.4 or 2.0 dataset as a Virtual Hyperstack, using the metadata in the dataset.
- Movie to Hyperstack macro toolbar An ImageJ macro toolbar with easy access to the script in this package, as well as toolbar navigation buttons for 4d Hyperstacks.
Hyperstack Projector
A new “Hyperstack Projector” item will be added to the Image › Hyperstacks submenu. Running this plugin will attempt to recaptiulate the functionality of the old Perkin-Elmer Ultraview software, which performed a maximum-intensity projection on a specified range of images on the fly. The plugin assumes a 4d Hyperstack is open, and temporarily replaces the stack window with a custom window that allows specificaiton of the number of focal planes to be projected. CLosing the window restores the original stack window.
NOTE: This plugin is extremely experimental. The code in the installed .JAR file can likely be massively improved.
Usage
Classic 4d AVI to Hyperstack
- Select menu Import › 4d › Classic 4d AVI to Hyperstack.
- Specify the video file.
- If no text file with focal plane information is found, specify the number of focal planes.
- The dataset will be loaded as a Virtual Hyperstack.
- A window with the focal plane and time point information should be visible.
Classic 4d Movie to Hyperstack/Classic 4d Movie to Hyperstack Bio-Formats
- Select menu Import › 4d › Classic 4d Movie to Hyperstack or Import › 4d › Classic 4d Movie to Hyperstack Bio-Formats.
- Specify the video file.
- If no text file with focal plane information is found, specify the number of focal planes.
- The dataset will be loaded as a Virtual Hyperstack.
- A window with the focal plane and time point information should be visible.
Classic 4d Viewer to Hyperstack
- Select menu Import › 4d › Classic 4d Viewer to Hyperstack.
- Specify the directory containing the focal plane movies.
- The dataset will be loaded as a Virtual Hyperstack.
- A window with the focal plane and time point information should be visible. NOTE: this script only loads the movie data; annotation/overlay information is not supported.
PE AVIs to Hyperstack
- Running the script will warn the user that the filenames must be numerically padded (…001.avi - …010.avi, etc. vs. ..1.avi - …010.avi). The PE software did not pad filenames. For PE AVIs one easy way to pad filenames in Fiji is the Pad Image Names macro tool.
- Specify the first AVI.
- The script will examine filenames to guess if each AVI is a single focal plane over time or if it is a Z stack of a single time point and populate a dialog allowing the user to confirm the data structure.
- The dataset will be loaded as a Virtual Hyperstack.
PE TIFFs to Hyperstack
- Specify the first TIFF in the dataset.
- The dataset will be loaded as a Virtual Hyperstack.
MM Images to Hyperstack
- Select menu Import › 4d › MM Images to Hyperstack.
- Specify the data directory.
- The dataset will be loaded as a Virtual Hyperstack.
Imaris to Hyperstack
- Select menu Import › 4d › Imaris to Hyperstack.
- Specify the data file.
- The dataset will be loaded as a Virtual Hyperstack.
Movie to Hyperstack macro tool
- The Movie to Hypersrtack macro tool will be available as an option in the ImageJ toolbar (click the » button to see a list of available toolbars).
- Selecting “Movie to Hyperstack” will load the toolbar. Clicking the leftmost button provides easy selection of the scripts in the Import › 4d submenu.
- Mousing over the other buttons provides a description of the other buttons, which allow standard navigation through Hyperstacks from the toolbar.
Hyperstack Projector
- With a 4d Hyperstack in the frontmost window, select menu Import › Hyperstacks › Hyperstack Projector.
- The Hyperstack window will be replaced with a custom window.
- Enter the number of focal planes to be projected centered on the current focal plane in the “d” text field.
- A running projection will be displayed centered on the current z plane and time point.
- Navigate up and down in space using the “z” slider and forward and backward in time using the “>” slider. Clicking the “v” button will play the movie, which will loop if the “loop” checkbox is selected.
Additional information and support
Sample data can be downloaded from the Hardin Lab microscopy page.