ImageJ Macros
The UIC team is constantly developing macros to facilitate IGC researcher's interaction with their data as well as provide new capabilitities (automated measurements and data management are just a few examples).
Below you can find some of the macros we've developed internally that are of use to most researchers and publicly available. In order to use them you can either find the file and run each time, or add to the list of macros that start with ImageJ. To do that, click "Plugins > Macros > Startup macros". This will open a text file with all ImageJ macros. First you need to open the macro file with notepad and copy the text. On the end of the Startup Macros file, write the text below with the necessary changes.
macro "edit name" {
paste-here-macro
}
-
XY Grid reconstruction | Reconstruct
-
XYZ reconstruction | XYZreconstruct
-
Save orthogonal views | OrthoSaver
-
Set size scale of all images | BatchSetScale
-
Import ROI files from Andor iQ | AndorRegionImporter
-
Stitch z-stacks from Andor SpinningDisk | AndorStitcher
-
Find all pictures in a folder and save to a common folder | PictureFinder
-
Make stacks from images taken with the Screening microscope | ScreeningPositionStacker
-
Time Projection or frame-averaging Macro | TimeProjections
-
Tiff-to-movie converter for Andor files | AndorMovieConverter
Micromanager can make use of automated stages to acquire a large area in a grid pattern. It will save these pictures in a standard folder and filename structure. We've made use of this structure to make a macro that will, in seconds, reconstruct the imaged area, permitting imaging in high resolution of large samples. The macro also provides the option to perform background correction to correct for uneven illumination using either a reference picture or automatically (by performing a FFT bandpass filter). You can see an example below.
Importantly, this macro assumes no overlap for quicker reconstruction. If your data has overlap, please check the "XYZ reconstruction" macro below.
| Uncorrected | Corrected from a reference empty field |
![]() |
![]() |
Micromanager also permits multi-dimentional acquisition (Z and channels) acquisition of several overlapping points. This macro will extract the location information from the metadata and output a grid.txt file that can be used with the excelent 2D/3D stitching plugin from the FIJI package. It is useful in cases where a grid with no overlap
ImageJ's orthogonal viewer for 3D stacks doesn't let you easily save the current orthogonal view. This macro, once installed, lets users create a montage with the currently open orthogonal views and selection guides. To use it, open an image z-stack and open the orthogonal viewer. With the mouse, choose which are the sections of interest to you and without moving the mouse, press F2. You'll get a montage of the currently selected orthogonal view.
This macro batch processes a folder of images, setting the scales to a given specification. All the images must be in TIFF format. It's based on the default BatchSetScale macro, with the added advantage that the user can set their own pizel size as well as automatically add a scale bar.
This macro let's you import .rgn files created with Andor iQ. Regions are added to the ROI Manager. This is useful for users of Andor's FRAPPA system, since the default file system doesn't include the frap'ed Region of Interest (ROI). Since this Macro is oriented for FRAPPA user it only supports points, squares and polygons. It also let's you choose between adding all region types or just regions marked for FRAPPA.
This macro opens all stacks on an Andor .tif, does a maximum projection and then stitches them all together (requires FIJI).
This macro will open every .tif in a folder, including subfolders. This variant will then save all files to a new folder on the root of the chosen folder.
This macro will cycle through all Pos_ folders made by µManager and creates a hyperstack with all the channels properly set and all positions in the stack. It will then save a seperate stack for each channel.
Let's you do fractioned time-projections on stacks or hyperstacks. You can choose how many frames to project and how many to skip. That means: With a skip of 1 and average of 10 you'll project from frame 1 to 10, from frame 2 to 11, from frame 3 to 13 and so on. But with a skip of 5 you'll project from frame 1 to 10, from frame 5 to 15 and so on). When using hyperstacks it will only project the currently selected z-series. You can choose between maximum projection (retains all information) or average projection (with the same average and skip number you'll get a post-processing frame-averaging effect).
This macro will open every .tif in a folder, try to convert them to RGB and save it as an .avi.

