OPS>SOFTWARE>DOWNLOADS>OTHER MICRO-MANAGER PLUGINS>FRAME AVERAGER
Frame Averager Plugin for MicroManager
FrameAverager is a MicroManager plugin that provides multiple exposure/frame averaging during acquisition. We offer this both as a plugin that is useful in its own right, and as an example/demonstration of using attachedRunnables and DataProcessors as part of the acquisition process.
Plugin (compatible with 1.4.15): Download Link. Recommended version 1.4.15
Plugin (compatible with 1.4.16 to 1.4.17): Download Link. Recommended version 1.4.16 or 1.4.17
Plugin (compatible with 1.4.18 nightly May-14-2014 Upwards): Download Link. Recommended version 1.4.18 May-14-2014
Plugin (compatible with 1.4.22 Aug-14-2015 Upwards): Download Link. Recommended version 1.4.22 Aug-14-2015
FrameProcessor Plugin (A FrameAverager fork by Hadrien Mary for Micro-Manager 2.xx): Source & download page
- FrameAverager now supports all acquisition methods (Snap, Live and Multi-D acquisition)
- FrameAverager compatible with Micro-Manager 1.4.18 now supports Micro-Manager's Image Pipeline. Apply to Multi-D Image Acquisition has also been implemented as an option in this version.
Download the FrameAverager.jar file to Micro-Manager’s mmplugins folder.
Using the Plugin
Start it from the plugins menu.
Set the number of frames to average (N) and click the enabled checkbox.
Channels to avoid can be specified so that they are not multi-frame averaged.
How it works
For each hardware setting (channel), multiple exposures/frames are acquired and an image containing the averaged image is ‘produced’ into the DataProcessor chain. This is achieved by utilizing 2 extension points in the AcquisitionEngine which allow you to add functionality to the image processing chain: Attached Runnables and DataProcessors.
The FrameAverager class instantiates the runnable and the DataProcessor, manages enabling and disabling, and maintains a shared array of TaggedImages.
Note: For Snap and Live mode instead of using a Runnable we continue to capture (for Live) the image stream or in the case of Snap initiate a (N-1) acquisition without producing an image until the required N images for averaging are acquired and then produce the averaged image. This also lets Micro-Manager display the fps correctly.
Attached Runnable
An instance of a Runnable class can be attached to the AcqEngine by calling attachRunnable (t, p, s, c, runnable), where t, p, s, c specify the timepoints, positions, slices and channels for which it will be invoked. (Passing a value of -1 results in the runnable being attached at all values of that index.) It is invoked after the hardware/devices have been set to the states required for the current setting and before an image is acquired/snapped by the AcqEngine.
FrameAverageRunnable extends java.lang.Runnable and is attached to the AcquisitionEngine. When FrameAveragerRunnable is invoked, it pauses the AcqEngine, acquires (N-1) exposures/frames (N is the number of frames to average) and puts them in the shared array of TaggedImages. It then releases/un-pauses the AcqEngine.
At this point, the AcqEngine acquires the image (as usual) and pushes it into the image queue/pipeline (DefaultTaggedImagePipeline) The DataProcessor (FrameAverageProcessor) then receives this image and continues the process.
DataProcessor
A DataProcessor<TaggedImage> can be added to the image processing chain using AcquisitionEngine.addImageProcessor(). The inputs and outputs of the DataProcessors are connected together in the ProcessorStack. The output of the ProcessorStack is input to the LiveAcq which put the image into the ImageCache where its is saved. The display is notified and updated to show the last image.
The FrameAverageProcessor extends DataProcessor<TaggedImage>. An instance is added to the processing pipeline with a call to addImageProcessor(). FrameAverageProcessor receives the image from the image pipeline which it uses as the the Nth frame. This image is added to the shared TaggedImages array and the average for each pixel is computed. The resulting image is then produced (i.e. passed to the next DataProcessor in the ProcessorStack).
The plugin can be used as an API for customized acquisitions as in the case of OpenPolScope Pol-Acquisition plugin.
The Micro-Manager Image Pipeline - new in 1.4.18
Note: Ideally for most cases you would want Frame Averager to be the first plugin in your pipeline except in cases where you may want to apply background corrections before averaging using a plugin like Multi-Channel Shading.
The Micro-Manager Image Acquisition, Processing and Display Pipeline
See also, Multi-Dimensional Acquisition Programming,
(http://valelab.ucsf.edu/~MM/MMwiki/index.php/Multi-Dimensional_Acquisition_Programming)