Witness_based_drift_correction_Tool - MontpellierRessourcesImagerie/imagej_macros_and_scripts GitHub Wiki

The tool corrects a constant drift in a time-series. When the objects in the images move, drift-correction can be difficult. Here a second channel is provided, in which there are no moving objects, however in order to be able to acquire images fast enough, for the second channel only the images of the first and the last frame are taken. The tool calculates the overall shift with the help of these two images and applies the mean shift to each frame of the input image.

driftAndCorrected witness

The image to the left has a slow drift, which is corrected in the image in the middle. The image to the right, shows a different channel of the same image with the first frame in red and the last frame in green.

You can download a dataset here: drift_dataset.tif.

Getting started

You need to have the TurboReg-plugin and the MultiStackRegistration-plugin installed. To install TurboReg, activate the BIG-EPFL update-site and restart FIJI. Download MultiStackRegistration_-1.46.2.jar and restart FIJI. Download the macro-toolset and save it into the folder macros/toolsets.

Select the "witness based drift correction" toolset from the >> button of the ImageJ launcher.

toolset

  • the first button opens this help page
  • the c-button corrects the drift on the active image
  • the b-button runs the drift correction on all images in a folder

Options

Right-click the c-button to open the options for the drift correction.

c_options.png

  • content channel - the number of the channel, starting at 1, containing the time-series image of interest
  • witness channel - the number of the channel, starting at 1, containing the images used for the alignment in the first and last frame
  • remove witness in result - if selected the image of interest is saved without the witness-channel, which after the alignment is not needed any more

Right-click the b-button to open the options for the batch processing.

b_options.png

  • image file-extension - the file extension of the input images, without the point, for example nd.
  • output in base-folder - if selected the result images will be written into the selected folder, otherwise a folder for the results is created in each sub-folder.