MICROSCOPY

4d_playerA 4d dataset within ImageJ. [Original footage - Mark Sheffield; software development: Jeff Hardin]

I (Jeff) have developed plugins that run within the public domain program, ImageJ, to acquire, process, and play back 4d microscopy data as an outgrowth of our own imaging needs. The advantage of this software suite is that it is free(!), and that it allows 4d datasets to be viewed without special, proprietary software. Please recognize that I am a professor, and program in my "spare" time, so support for these plugins is limited and bound to be sporadic.

Click on the links below to go to various sections of this page...
FFmpeg-based plugins and macros for ImageJ
MicroManager plugins for ImageJ
PerkinElmer plugins for ImageJ
FRAP plugin for ImageJ
Hyperstack Projector plugin (experimental)
4d video plugins
ImageJ Macro toolsets

Ffmpeg-based plugin and macrosFFmpeg_logo1
Reading data from movies
QuickTime for Java (QTJ) has been deprecated for many years by Apple. Due to its 32-bit architecture, it will not work under 64-bit only operating systems like OS X Catalina. It is possible to use virtualization software to run OS X Mojave or earlier, to retain support for QTJ. I (Jeff) have successfully tested Mojave with VMWare Fusion. Instead, it may be easier to use plugins under ImageJ to import QuickTime movies as virtual stacks using Ffmpeg, which will work on 64-bit operating systems and under newer, 64-bit versions of ImageJ.

Writing data to movies
ImageJ has major limitations writing to modern video formats such as H264 using the H264 codec and convenient wrappers (.MOV, .MP4, .AVI), One approach is to write to uncompressed AVIs, within ImageJ which is supported natively in ImageJ/Fiji, then use your favorite app of choice (Adobe Media Converter, VirtualDub on Windows, or Ffmpeg or wrapper apps that make calls to Ffmpeg on Linux/Mac/Windows) to convert to MP4. [In the last category, HandBrake is free and easy. An elegant commercial example for Mac I like is FFworks.] A downside is that uncompressed AVIs can be huge (often an order of magnitude larger than movies saved using some codecs). For Nomarski data this means a major storage hit. For fluorescence data one normally wouldn't compress primary data using a lossy compressor.

A complete solution: Ffmpeg FrameReader and Ffmpeg FrameRecorder plugins
Fortunately, Stanislav Chizhik (Institute of Solid Chemistry and Mechanochemistry SB RAS, Novosibirsk, Russia) has provided both Ffmpeg-based read and write functionality using JavaCV and Ffmpeg. He has kindly allowed me to post the Java code for his plugins here.
ffmpeg_import
Download this plugin as a JAR file: Ffmpeg_Importer_Exporter.jar
Directions: To use these plugins, place the JAR file somewhere in the ->plugins folder hierarchy in your ImageJ home directory to enable this functionality. With Mac OS X, right-click on the ImageJ or Fiji application and execute "Show package contents…" to navigate to the correct folder. Restart ImageJ/Fiji, and a new options should appear in the Plugins folder called "Ffmpeg Video". Run the "Install JavaCV…" plugin and the necessary library files will be downloaded to your Image or Fiji installation. Restart ImageJ, and then you should able to run the Import and Export plugins. I have tested these plugins under Mac OS X 10.15 (Catalina), Windows 10 (64-bit) and Ubuntu Linux 20 (64-bit).

Some really old flattened (i.e., non-resource fork-based .MOV files) work if the JPEG image codec was used. More importantly, files saved in widely used AVI and H264/MP4 formats can be imported this way. This means that files can be resaved into one of these formats from legacy datasets, salvaging old, non-raw 4d data.

Movie to Hyperstacks toolset macro [source]
movie_to_hyperstackI have written simple macros that read legacy text files with 4d information using Stanislav's routines for use with legacy 4d movies in xyctz format (typically single-channel movies). To use these plugins, place the toolset file somewhere in the —>macros->toolsets folder hierarchy in your ImageJ home directory to enable this functionality. With Mac OS X, right-click on the ImageJ or Fiji application and execute "Show package contents…" to navigate to the correct folder.
Note: the AVI importer that uses direct ImageJ calls requires ImageJ 1.53c or later to allow xyctz as well as the default xyczt arrangement of 4d data.

To see how these work in practice, here is a small sample 4d movie with 8000 frames (20 focal planes, 400 time points) in xyctz format. Download sample dataset and info file as a ZIP archive (33.6 Mb)

Micro-Manager scripts/plugins
mm_logo
Micro-Manager to Hyperstack
Description: Updated Oct. 21, 2020
This plugin automates the creation of a Hyperstack from the Metadata.txt file of a Micro-Manager dataset.and loads into a Virtual HyperStack window in ImageJ 1.53c and later.

MM_Images_to_Hyperstack [source] [plugin]

Micro-Manager 4d Beanshell script
Description: This Beanshell script runs in Micro-Manager, and replicates the basic functionality of our old 4d acquisition plugin running under ImageJ. Note: Due to extensive enhancements in Micro-Manager, we use the Multi-Dimensional Acquisition functionality built-in to Micro-Manager now instead pif this older script. However, it prides a nice example of integrating ImageJ calls into a M-Manager script, and how to save out files with custom naming and location.

Download the source Beanshell script file [source]
Directions: Place in the ->scripts folder in your Micro-Manager installation. Open from the Micro-Manager Script panel, and click the "Run" button.

Perkin-Elmer plugins for ImageJpe_logo
PE to Hyperstack plugin
Description: This plugin imports files from PerkinElmer Ultraview software into IMageJ as Hyperstacks. Due to limitations in ImageJ, only single channel datasets can be imported as virtual hyper stacks (much faster, almost no RAM load).

Download this plugin as a JAR file: PE_to_Hyperstack.jar
Directions: Place the JAR file anywhere in the "Plugins" folder in your ImageJ installation. Restart ImageJ, and the plugins will appear under the "File/Import/PerkinElmer" menu and in the "Plugins/PerkimElmer/" menu in ImageJ. Source is contained in the JAR file, which can be read using many archiving/unarchiving programs. We like Zipeg on Mac OS X.

Rename PerkinElmer Ultraview AVIs [source] [plugin]
Description: This plugin adds leading zeros to the names of Perkin-Elmer AVIs produced from Perkin-Elmer's UltraView temporal module software for the Perkin-Elmer LCI spinning disc confocal microscope. This allows them to be concatenated alphabetically into 4D movies using the Concatenator plugin.

Rename PerkinElmer Ultraview TIFFs [source] [plugin]
Description: This plugin renames TIFF stacks for use with the Linux-based program Priism. This is a really unintelligent plugin, but could be modified for other naming conventions.

Concatenate Movies [source] [plugin]
Description: This plugin reads movies from a specified folder and concatenates them in alphabetical order into one large movie. After using the Rename Perkin-Elmer AVIs plugin to rename them, this plugin is useful for concatenating .AVIs generated using Perkin-Elmer's UltraView software into a single 4d movie that can then be read using the QT4D Player plugin.
top

FRAP plugins
frap_graph
FRAP profiler
Description: This plugin operates on a FRAP dataset (open in ImageJ as a TIFF stack). Normalizes for overall bleaching, and permits one- and two-component exponential curve fitting (thanks to additions to ImageJ by Wayne Rasband; thanks Wayne!). Code written by Jeff Hardin, adapted from Tony Collins' Macbiophotonics plugins.
Plugin is available here: [source] [plugin]
Sample TIFF stack (ZIP archive; 53 Mb): sample data

Hyperstack Projector plugin
Screen Shot 2018-08-08 at 4.12.23 PM
Hyperstack Projector
  • Description: This is a crude attempt to imitate functionality in the old PerkinElmer Ultraview software. Adds a new menu option under the Hyperstacks submenu. This plugin operates on an ImageJ Hyperstack or Micro-Manager multi-dimensional dataset window (which is based on the Hyperstack format), replacing the Hyperstack window with a new window in which a range of focal planes is projected on the fly. The original window is restored upon closing the projector window. Space bar toggles playback on/off, and arrow keys allow navigation in t and z (right/left and up/down, respectively). Holding down the option key and using the right/left arrow keys switches channels. Space bar toggles playing of the movie. Requires ImageJ 1.5 or higher. Under Micro-Manager 2.0 beta the hyperstack window cannot be hidden for reason I don't understand.
  • Code written by Jeff Hardin. Source is in the JAR file. Suggestions for improvements are welcome!
Download this plugin as a JAR file: Hyperstack_Projector.jar
top

quicktime QuickTime plugins
Note 1:
This software is legacy software, since Apple has deprecated QuickTime for Java. Other even older legacy software is available on the Legacy software page.
Note 2: Many of these plugins were commented, streamlined, and nicely formatted years ago by my son, Jon Hardin (hardin@hardindd.com). He is President and CEO of his own company, Hardin Design and Development. Source code is freely available in the JAR file for all plugins.

Changelog:
• November 2014: OS X Yosemite (10.10) and greater no longer installs key files needed for QuickTime for Java. Fortunately, these can be manually added to the correct locations to maintain the functionality of QTJ-dependent plugins under 32-bit ImageJ for OS X. Instructions and files can be found here.
• May 2014: New versioning of the JVM and QuickTime necessitated an update for newest Mavericks (Mac OS X 10.9) machines.

Download all plugins as a JAR file: 4d_Plugins.jar
Directions:
Place the JAR file anywhere in the "Plugins" folder in your ImageJ installation. Restart ImageJ, and the plugins will appear under various submenus in ImageJ, with names that correspond to the toolset macros provided on this page.

Documentation
Download "Installation Tips" [PDF]
Download the "Getting Started" guide with screen shots (2.7 Mb) [PDF]

Individual plugins
QT4D Player [source] [plugin]
Description: This plugin displays 4d data saved as a QuickTime movie in a resizable ImageJ window. If present, this plugin can read information from a text file with the same root name as the 4d movie. The plugin allows export of images/stacks, and rudimentary processing of movies using standard QuickTIme filters (color, brightness/contrast, etc.). Works under OS X and JVM 1.4+ and QuickTime for Java 6.1+. A Mac OS 9 version is available here: [source] [plugin]

QT4D Writer [source] [plugin]
Description: This plugin uses the same basic functionality as the QuickTime Stack Writer plugin to compile a 4d movie from a folder containing 4d data as single images. Works under OS X and JVM 1.4+ and QuickTime for Java 6.1+. A Mac OS 9 version is available here: [source] [plugin]

Browse4D [source] [plugin]
Description: This plugin allows browsing of 4d datasets created as single images in a folder. Does not require reading the data into RAM or as a virtual stack, speeding initial access times compared to the Image5D plugin or the Virtual Stack opener plugin.
A Mac OS 9 version is available here: [source] [plugin]
Update Dec. 2008: A bug in the info file reader routines was fixed.
Update July 2009: Fixed focus problem; changed shortcut keys to correspond to changes in ImageJ code base. Shift + left arrow = down; shift + right arrow = up;

top

Image Macros/Toolsets
4d Tools toolset macro [source]
4d_toolset
Description: This toolset macro installs a toolset for ImageJ that provides convenient button access to Jeff's QuickTime, 4d and rotation plugins. Place in the ->macros->toolsets folder in your ImageJ home directory to enable this functionality. Requires ImageJ 1.37t or higher.

Hyperstack 4d toolset for ImageJ
hyperstack_toolset
Description: This toolset macro installs a toolset for ImageJ that provides convenient button access to controlling Hyperstacks, and to the MM Images to Hyperstack plugin. Works under ImageJ 1.45s and later (and likely somewhat earlier, but it hasn't been tested).Toolset assumes you've installed the MM_4d_Utilities.jar. To do: figure out how to get a clicked button in the macro toolset to repeatedly send commands (like stepping up/down, forward/back).

Download the Hyperstack Tools toolset macro [source]
Directions: Place in the ->macros->toolsets folder in your ImageJ home directory to enable this functionality.

XY project macro [source]
Description: Performs 3d projection, stereo pair, and anaglyph projection on a stack. Combines the functionality of the standard ImageJ 3d projection dialog with the stereo pair/anaglyph functions of Tony Collins' stereo pair plugin. Note: Requires that the Stack Combiner plugin is installed.

Batch project macro [source]
Description: Performs batch 3d projection on a folder of TIFF stacks, and outputs the results as single images to another directory. The resulting images can then be compiled into a 4d QuickTime movies using the QT4D Writer plugin. Note: Requires that the Stack Combiner plugin is installed.
top

Support for development of some of these plugins was provided through the National Institutes of Health and National Science Foundation
NIGMSLogo_lrg nsf_badge