Make chromatic calibration - UU-cellbiology/DoM_Utrecht GitHub Wiki

This page contains a step-by-step description of Chromatic correction(read it first) calibration. Usually, this procedure is iterative, meaning that you'll probably need to try it a couple of times, before getting optimal results (especially on the very first try), but additional output generated by the plugin will help you to validate it.

Input calibration data

Before running this wizard, you'll need to prepare two separate images/stacks of the same field of view containing a set of sub-diffraction objects in two channels: one channel would be considered REFERENCE and the other one WARPED. For example, one is an image in GFP channel (green, REFERENCE) and the other mCherry (red, WARPED, to be registered).

For this purpose we usually use photomask (glass covered with a non-transparent layer of silver) with small holes with regular spacing (from this supplier, for example):

photomask_green photomask_red

Alternatively, one can use multi-color Tetraspeck beads or two-color single molecules or even some non-specific small bright dirt spots on the coverslip, as soon as they are visible in both channels. The input data should not necessarily be only one image per channel, it can be a stack (but frames between channels should correspond to the same field of view).
If there is only one bead/subdiffraction spot in the field of view, the calibration data can be made by scanning the stage in X and Y and making pictures in both channels. The important thing is to cover a whole field of view, so chromatic aberration can be properly mapped across the whole area. Here is an example of a stack with beads using a stage scan:

beads_scan

Just be sure that you cover the whole image area, for example, here is the maximum intensity projection of these two beads scanning stacks. This image is mostly for verification, use original stacks for calibration!

beads_max

Once you have this data, open both images or stacks in ImageJ/FIJI and go to

Analyse -> DoM vX.X.X -> Chromatic correction -> Make chromatic calibration

Chromatic calibration parameters

The following dialog should be displayed:

General parameters

If the first parameter, "Perform pre-registration based on images" is checked, the plugin will try to align reference and warped images (find the best overlap using translation) before points detections. This step is based on cross-correlation. Sometimes this procedure fails, especially if you use a regularly spaced grid. In this case, it is better to uncheck it.

The second parameter "Max distance between particle images in both channels" defines, well, the maximum distance (in pixels) between particle images (centers) in both channels. For each detected particle in REFERENCE channel, the plugin will search for the closest detected particle in WARPED within a circle of this radius.

The value of "SNR threshold filter" allows to filter out dim particles (dirt, false detections, etc) used for calibration by providing a threshold for particles' SNR. The brighter the particle, the better localization precision and calibration. You can estimate threshold SNR value by first detecting particles on your images and checking Results table, which ones to keep, which ones to ignore.

The remaining checkboxes define the generation of additional information/images (described below) used for the calibration verification. It is strongly recommended to check them, explore the outcome and re-do calibration with adjusted parameters' values.

Click OK to proceed.

Choose REFERENCE channel

The following window should appear:

ref_channel

First of all, this window is "non-blocking", i.e. allows you to operate ImageJ and while it just hangs in the background, waiting for its buttons to be clicked. So if you didn't load your calibration images yet, you can still do it easily now.

What this dialog asks you to do is to make a REFERENCE image "active" or "currently chosen". You can do it by just clicking on the ImageJ window containing the corresponding image/stack.

In addition, if there is a ROI selected in the "active" image, the plugin will automatically crop the image to this ROI for analysis. So if you want to use the whole image, make sure there is no selected ROI.

This "ROI selection" feature is added for cases when you simultaneously project both channels on different areas of the same camera's chip using a channel splitter (for example, OptoSplit). As a result, just a single calibration stack/image file can be used as input. It is convenient for in vitro single molecule experiments (no need to split calibration data). Be aware, that in this case, the origin of coordinates moves to the left top corner of the selected ROI (for each channel). This means that for the later usage of Results Table/Image correction you would need to crop images to the same ROIs first, before detection. Also, if particles brightness/background differs considerably in both channels, it can affect detection and so it can be a good idea to split the image to two separate images/stacks and proceed without any ROI selection.

Click OK and Detect Molecules dialog will appear. Adjust detection parameters (SD of PSF) for this specific channel (it is recommended to check "Mark detected particles" option for visual inspection) and click OK. The plugin will detect reference particles in REFERENCE channel.

Choose WARPED channel

Another non-blocking dialog will appear, asking you now to make an active window with WARPED image/stack:

dialog_warped

As in the previous step, the detection parameter window will appear and the plugin will detect corresponding particles in WARPED channel.

Final dialog

In the end, the plugin will generate a set of verification images/data and the last final dialog should appear:

final_dialog

If you choose to store calibration, it will be preserved at the ImageJ registry and will become the current active calibration. So whenever you will need to correct image/table, the plugin will not ask you for the calibration, it will just use the one that is currently stored (and it can be only one that is stored). If you restart ImageJ/FIJI (as well as computer), this calibration will still be there.

Also you can save calibration as a text file for future use. But before using it for image/table registration, you will need to load it to ImageJ registry first.

To help you decide, if the generated transformation is good enough to be stored or saved, a set of additional outputs can be generated.

Additional output

Depending on what checkboxes are ticked at the initial parameters dialog, the plugin will generate some images/tables for verification and quantification of color registration. To understand them, it is important to know that the performed registration happens in two steps:

  • first, optimal rigid translation is performed on images (or on max intensity projections in case of stacks) using cross-correlation;
  • second, smooth B-spline grid transformation is applied.

Here is a description of the generated data to help you decide on the quality of the calibration.

Show points used for calibration

If this option is selected (which is recommended), the plugin will generate a composite image with an overlay that marks the final particle pairs (found in both channels) used as a reference for registration. If stacks are provided then maximum intensity images are shown at the background:

points

In this image, the REFERENCE channel will use green LUT and the WARPED channel will use red LUT. Pairs of "found in both channels" particles are marked in reference channel with circles that are connected by lines with their corresponding image in warped image (marked by crosses). Only particles higher than provided SNR threshold are considered (and displayed).

If you see that some particle pairs are missing (that should be included), it is a good idea to run the whole calibration procedure again and try to:

  1. Lower SNR threshold
  2. Increase the maximum distance for search in the parameters section.

Adjusting these parameters often can fix the "wrong" linking of particle detections in different channels.
But be aware, that lowering of SNR threshold will deteriorate registration precision. This means that for a better final accuracy one can consider a new acquisition of calibration images/experimental data.

The absence of detected pairs in some areas or field of view will lead to poorer registration at these locations.

Show final distortion map

If this option is checked, the illustration of a vector map of displacements should appear:

vectormap

It is generated purely for illustration. First of all, this is a map of displacements after whole image rigid translation registration, which accounts for the overall image shift in X and Y. The length of arrows (vectors) is relative, i.e. it is not equal to real displacements (arrows are longer). Second, to get absolute values, one needs to refer/check the option to display the following table:

Provide reference points coordinates in Results

If this option is checked, the following Results table is generated: results_table

Here is a description of the columns (everything is in nm):

  • (1-2) X and Y coordinates of points in REFERENCE channel
  • (3-4) X and Y coordinates of corresponding points in WARPED channel (before registration)
  • (5-6) X and Y coordinates of corresponding points in WARPED channel after rigid translation
  • (7-8) X and Y coordinates of corresponding points in WARPED channel after rigid translation and B-spline grid transform
  • (9) distance between points (1-2) and (3-4)
  • (10) distance between points (1-2) and (5-6)
  • (11) distance between points (1-2) and (7-8)

in addition, the plugin outputs some results to Log window:

Log window results

log_window

As can be seen from this example, the plugin reports the results of rigid translation registration (in pixels), the number of particles used for calibration and their density. The higher the density, the more precise is the registration. In addition, it reports the results of iterative refinement of the B-spline grid (it becomes x2 denser/more detailed at each step).

Verification

As a very last step, it is recommended to register the WARPED image (or maximum projection of the stack) and compare it with the REFERENCE, to make visual confirmation of calibration quality.


If you have any feedback, question, or suggestion (on how to improve this description), write me an email to katpyxa (at) gmail.com

⚠️ **GitHub.com Fallback** ⚠️