ImageJ Macros

Description

Count bacterial colonies on agar plates and measure the occupied surfaces. The user has to provide a selection (roi) of the area that will be analyzed. He can than run the segmentation and if necessary correct the results. In a third step he can run the counting and measurement.

has function
Description

Normalize the orientation of the images of the Zebrafish embryos.

In the documentation webpage, the aim of the workflow is to normalize the orientation of the images of the Zebrafish embryos, find the point of injection of tumor cells and measure the distribution of Cy3 stained tumor foci.

ImageJ macro implementation of the Workflow described in Ghotra et al (2012). Note that currently only the angle and orientation normalization is implemented in this version.

Sample images are linked in the documentation webpage. 

has function
Description

The workflow measures the growth of cells in 3D, combining an ImageJ macro for preprocessing and successive tracking using Imaris.  

The sample dataset (available in the github repository) contains 2-Photon images of neurons. The neurons were imaged in 3D at two time frames.To allow measuring significant differences in cell volume, the time gap between the frames is large (ca. 30 min) and the animal was removed in the waiting phase. For this reason, there is a considerable shift in sample position between the frames that has to be corrected before cell detection and tracking.

The workflow consists of following steps:

1. Import of single tiff slices [imageJ macro]

2. Organizing the data in a 4D time series with 2 time frames [imageJ macro]

3. Correction of shift between the time frames by rigid registration [imagJ macro]

4. Bleaching correction [imageJ macro]

5. Export of preprocessed image data in ics/ids format [imageJ macro]

6. Import of ics/ids data to Imaris [Imaris]

7. Cell object detection as "Imaris Surface Object" [Imaris]

8. Tracking cell objects over time [Imaris]

9. Split Tracks (use Imaris XT extension "Split Tracks") to generate single cell objects [Imaris]

10. Export the statistics: Select the complete folder, go to the statistics tab and use ‚Full Export’ [Imaris]

The preprocessing macro can be referenced here.

The sample images were acquired by Cordula Ulbrich (Petzold Group at German Center of Neurodegenerative Disesases (DZNE), Bonn, Germany).

Input data type: tiff

Output data type: data table

has function
Description

The linked webpage presents a collection of ImageJ macros for Intelligent Imaging (Feedback to microscope system for the secondary scan). 

An ImageJ macro able to control some microscopes (Micro-manager or Leica CAM controlled) to acquire high resolution images of only some structures (e.g. isolated cells) or events (e.g. mitosis) within a sample. The scan is sequenced as a primary (low resolution monitoring) scan and a secondary (high resolution, multi-dimensional) scan.

has function
Description

This macro is a plugin macro to the "Intelligent Imaging" workflow. It detects the Cytoo patterns (specific fluorsecence channel) and computes the occupancy (number of cells) of each pattern by analyzing the images of the DAPI channel. The analysis function can be easily extended to, for instance, only select the cells that are well spread on the patterns (by analyzing a third channel with a properly chosen marker of the cytoplasm).

need a thumbnail
Description

An example macro introduced in the documentation page of the ImageJ plugin Trainable Weka Segmentation (in Fiji, it's bundled). A segmentation protocol based on machine learning. Full macro is available in the "Download" Link. 

This plugin can be trained to learn from the user input and perform later the same task in unknown (test) data. Weka: it makes use of all the powerful tools and classifiers from the latest version of Weka. Segmentation: it provides a labeled result based on the training of a chosen classifier. Trainable Weka Segmentation Complete macro example is at the end of the page.

has topic
has function
Description

This tool adds to ImageJ functions to build and organize montages. It comes with the ImageJ installer but can also be downloaded from the ImageJ wiki. A video tutorial is available.

has topic
has function
need a thumbnail
Description

This macro recognizes wells in a picture from a multi-well plate (it works also on a picture of a single well). It is used to segment a picture to determine the number of "Colony Forming Units" in each individual well of a plate.

The steps are the following:

  1. Makes a 8-bit B&W picture, inverts it (=> borders will look white instead of black), resizes it (optional, this is to speed-up convolution thereafter) and find edges.
  2. Convolves the obtained picture with a kernel corresponding to a thick white circle of the size of the wells. The resulting image has big "blobs" or "particles" corresponding roughly to the centers of the well.
  3. The image is thresholded to remove particles not corresponding to strong hits and "Analyze particle" is run.
  4. The measured parameter is the center of mass of the particles which gives the center of the well. These are saved in an array.
  5. Circles are drawn and added to the ROI manager. The centers of the circles are the identified centers of mass of the particles and their radius is the expected radius of the wells in the original image.
has function
Description

A utility macro for the specified use of BioFormats plugin. Takes a folder of proprietary images formats (Zeiss zvi, lsm, czi or Nikon nd2) and extracts them to .tif images

The extracted images are located in a folder defined in the menu. Other options: reset spatial scales, reads ROIs, split channels, add stage position in the name.

<!-- [previous text] This macro allows to batch convert .zvi multichannel time-lapse movies into .tif stacks. There are several options for processing and filtering. In particular, you can register the jitter due to small stage movements during acquisition. For this option to work you need to install Kang Li's Image Stabilizer plugin. -->

note: The old name of the macro was "ZVI Extractor" and the data format was limited to ZVI, but the upgraded version includes more formats.

Requires Bio-Formats plugin

Description

This macro is similar to the LIF_Extractor, but it will output Z-projection of each Z-stack. You can choose the type of projection in addition to the other options. Requires Bio-Formats plugin

has function
Description

This macro extracts .lei and .lif multichannel Z-stacks into multiple .tif stacks, splitting the channels into different stacks. Several options are possible such as background substraction, various filters, or optional reset of spatial scale. Requires Bio-Formats plugin

Description

This macro allows to interact with a large, single channel, z-stack (possibly exceeding the main memory of the computer) and to extract a volume of interest by marking several reference points.

has function
The extracted Volume of Interest  (3D rendering)
Description

Task

Quantify the length of microtubules (MT) and the MT average density per cell.

Workflow descriptions

Simple two step workflow, allowing visual & manual correction of microtubule between the 2 steps. Batch measurement of microtubule lengths for multiple images is achieved by segmenting the MTs and then their skeletonizations. The number of pixels in the microtubule is proportional to their length, so the length can be estimated.

Script

Workflow is written as an ImageJ macro (Fiji) with following steps:

1. The enhancement of tubular structure by computing eigenvalues of the hessian matrix on a Gaussian filtered version of the image ( sigma 1 pixel), as implemented in the tubeness plugin.

2. The tubules were then thresholded , and structures containing less than 3 pixels were discarded.

3. If needed, a visual check and correction of segmented microtubule is then performed.

4. After correction, segmented MTs were then reduced to a 1-pixel thick line using the skeletonize plugin of Fiji. The length of the skeletonized microtubules was then directly proportional to their length.

5. Data were grouped by condition and converted back to micrometers units under Matlab for the statistical tests.

Pitfalls

Commented but not that general without editing some fields in the macros.

Sample Data

Sample data and workflow (see above URL) can be accessed by - login: biii - password Biii!

Misc

3D version also available here. Use of components Skeletonize and Tubeness Filter

need a thumbnail
Description

This macro can stitch a (Z,T,C) data set with virtually no limit on the number of Z slices and time frames. The input to the macro is a folder with the raw tiff images (one image per file) as typically exported by motorized microscopes. These files must all be stores in the same folder and the file naming should ideally comply to OME-TIFF. The macro is however quite flexible: Only --X, --Y and --Z fields with user defined number of digits are compulsory. --T, --C and --L fields with user defined number of digits are necessary for multiple time frames / channels data sets. A compatible data set is provided as a .zip archive. Before processing it unzip it to a given location. The stitching is performed in a reference Z slice (and in a specific reference time frame and channel). The same displacements are applied to all the Z slices, time frames and channels. Before starting the batch processing a montage with the original images of the selected Z slice / time frame / channel is displayed together with the stitched image in this stack. If you are not satisfied with the result you can select another reference. The stitching is then performed time frame by time frame and slice by slice and the stitched images are exported to a single user defined output folder. The macro can also process a data set with multiple channels, the stitching is then computed once on a reference channel and then applied to the other channels.

has topic
has function
Description

This macro builds a stitched image from a muti-position 3D + time hyperstack. The XY positions of the montage should be coded as channels in the input hyperstack. Channel ordering can be configured in the dialog box to adapt to Column/Row and Meander/Comb configurations: The images should appear in this order when browsing the hyperstack with the channel slider. Fine stitching is supported (requires sufficient overlap between the views). The XY displacements of each field of view for stitching are computed for a single reference (Z,T) slice (user configurable) and applied to all slices (Z and T).

Description

This macro can be used to un-wide a tubular structure and flatten its surface (like peeling of and flattening the skin of a banana). The macro can only process a single channel 3D stack but it is easy to process multiple channels by exporting and importing ROI manager selections. Technically the macro computes the radial average intensity projection inside a ring centred on the radial symmetry axis of the object. The final image is a radial mapping of the intensity (radial angle along X, axial length along Y).

The example image is available in the documentation link. 

has function
Description

This macro implements a filter that is meant to attenuate close to parallel intensity stripes in an image, such as often happening in light sheet microscopy. The results are usually decent even when the stripes show a large angular spread due to light sheet refraction at the sample surface. The filter can process a 3D stack but the processing is performed slice by slice.

Example image is available in the documentation link. 

Description

This macro batch processes all the 2D images (tif and jpg files) located in a user defined folder by calling Fiji Weka trainable segmentation to classify each pixel, and reports the areas of each class in a human readable results table. The classifier to be applied to each image should be previously trained on a representative image by an expert and exported to file (Save classifier) into the image folder to be processed.

has function
Description

This macro segments blood vessels in a 3D stack. It is suited for well-contrasted images (low background) and works better if the width of the vessels of interest is reasonably uniform.

 

Sample image: 1

sample image: 2

has function
Description

Autofocus hyperstack macro:

Select the in focus frame from each slice of a hyperstack and create a new stack of just the in focus frames. Based on algorithm F-11 "Normalized Variance".

Original macro by Andy Weller.

need a thumbnail
Description

This macro performs measurements of average and standard deviation intensity inside wells of a protein microarray (the number of wells is limited to 250, the image should be cropped for larger arrays). The macro requires the "ImageJ plugins toolkit". To ensure compatibility with Fiji you should download the version 1.6.1The installation instructions can be found here, it only consists in un-compressing the .jar file from the previous archive to Fiji plugins folder.

 

sample image: link

has function
Description

The macro segments and classifies human spermatozoids nuclei (DAPI) based on the number of FISH signals (spots) they contain. It reports the percentage of occurrences of user defined classes (combinations of spot multiplicity in the FISH channels) as well as the position (point selections) of the detected nuclei falling in these classes. The input image should be an hyperstack with 4 channels: DAPI (first channel) and three FISH channels. The images are typically obtained as a maximum intensity projection of few channels (confocal) or a single z slice acquisition (widefield).

Example image available in the linked page. 

has function
Description

This macro and plugins suite for ImageJ (and Fiji) serves to measure the velocity of moving structures and visualize them, from image time series (2D over time).

The module can be installed in ImageJ as a Macro Menu and each function/component can be called separately. The full workflow consists in calling some, or all, the functions sequentially in order to get from the image preparation (e.g. filtering and visualization of tracks) to the production of the kymographs (time vs. distance plot) and their analysis (retrieving the velocities).

Here is the full workflow sequence:

  • Load image sequence
  • Crop and time-filter the image sequence ("Walking average" plugin)
  • Generate tracks by z-projection ("Stack difference" plugin)
  • Select tracks and restore them in the original stack.
  • execute plugin "multiple kymograph"
  • Analyse: select edges of moving tracks graphically and quantify movement in a table.

input: 8-bit, 16-bit stacks, 2D in time. Calibrated is better for meaningful velocity measurements.

ouput: the kymograph image, the velocity measurements tables.

Requires ImageJ version: 1.33.n minimum.

Example of applications:

  • velocity of moving objects/ structures with sharp edges, incl. the velocity of microtubules (and their plus ends),
  • the velocity of vesicles or particles along a 2D path
  • the velocity of migration of the edge of a cell or a multicellular group
  • retraction velocity of contractile bundles (e.g. actin fibers) or multicellular tissues after mechanical disruption (e.g. laser surgery)
Description

This macro is meant to segment the cells of a multicellular tissue. It is written for images showing highly contrasted and uniformly stained cell membranes. The geometry of the cells and their organization is automatically extracted and exported to an ImageJ results table. This includes: Cell area, major, minor fitted ellipse radii + major axis orientation and number of neighbors of the cells. Manual correction of the automatic segmentation is supported (merge split cells, split merged cells).

Sample image data is available in the documentation page. 

Description

Simple macro to separates blobs.

  • Load the ImageJ sample image "Blobs"
  • Run the plugin Morphological Segmentation
  • Display the overlaid

This macro depends on "Morphological Segmentation" component of the MorphoLibJ library, which should be installed via update sites.

has function
need a thumbnail
Description

This macro was designed to measure the size of the scratch wound in a wound scratch assay. It uses an edge-detection and thresholding technique.

It will batch process all images in a directory. Images captured by time-lapse should be compiled into stacks using a tool similar to "Metamorph nd & ROI files importer (nd stack builder)" by Fabrice P. Cordelières. Images to be analyzed should be placed in one directory (Source Directory). A second directory should be created to save results files and images (Destination Directory). Setting correct Lower and Upper thresholds is important to obtain a good result. Two macros are available, one using edge detection, the second one using background subtraction.

Description

A workflow combining ImageJ macro and manually using Trainable Weka Segmentation plugin for counting clumped cells.

Description

An ImageJ macro for calculating empty surfaces on histological slices (ex: tubules in a kidney).

has topic
Description
<p>Particle detection is based on "Analyze Particles" in ImageJ. It probably could also be used in spot detection, not limited to centromere. &gt;This macro is described in Bodor et al. (2012). The macro recognizes centromere or kinetochore foci in Delta Vision or TIFF images and determines their centroid position. Fluorescent intensities are then measured for each centromere by placing a small box around the centroid position of the centromere. The peak intensity value within the box is corrected for local background by subtraction of the minimum pixel value. This process results in an accurate measurement of large numbers of centromere or kinetochore-specific signals. Following papers uses CRaQ (picked up, maybe more): - [Fachinetti et al. (2017)](https://www.cell.com/developmental-cell/pdf/S1534-5807(16)30909-1.pdf), Developmental Cell 40, 104–113, - [Guo et al. (2017)](https://www.nature.com/articles/ncomms15775) Nature Communications volume 8, Article number: 15775 (2017) doi:10.1038/ncomms15775 - [Lgosdon et. al. (2015)](http://jcb.rupress.org/content/208/5/521) J Cell Biol Mar 2015, 208 (5) 521-531; DOI: 10.1083/jcb.201412011 - [Bodor et al. (2014)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4091408/), eLife. 2014; 3: e02137</p>
has function
Description

The Arabidopsis Seedlings Tool allows to analyze the germination and seedling growth of Arabidopsis (Arabidopsis thaliana) in liquid culture. It measures the surface of green pixels per well in images containing multiple wells. It can be run in batch mode on a series of images. It writes a spreadsheet file with the measured area per well and saves a control image showing the green surface that has been detected per well. 

See http://dev.mri.cnrs.fr/projects/imagej-macros/wiki/Arabidopsis_Seedlings_Tool

Test images can be found here.

has function
ImageJ toolbar of the arabidopsis seedlings tool
Description

An ImageJ macro for correcting frame drift occurred during image acquisition.

It often happens that you have an image sequence that shows problematic drifting of image frame and at the same time you have some landmarks that could be used for correcting the drift. This ImageJ macro allows you to Manually track the landmark using ImageJ Manual Tracking Plugin. Using the coordinates recorded in the Result window, each frame is shifted back so that the landmark stays in a single place.

Description

Dithering is a type of half tone thresholding where greyscale (or RGB channel) intensity is converted into a local density of binary pixels. This is ideal for rendering images in devices with a binary output such as printers (greyscale) or with a small number of colours (colour dithering). The following methods have been implemented (there are several more):

  • Floyd-Steinberg
  • Atkinson
  • Jarvis-Judice-Ninke
  • Stucki
  • Bayer_2x2
  • Bayer_4x4
  • Bayer_8x8
  • Clustered_4x4
  • Random

Here is a good text explaining various dithering algorithm.

has function