MRI Retina Tool

Measure the area or thickness of a structure in retinal scan images from Optical coherence tomography (OCT). The image is always centered. It has a width of 1000 pixel and 1.4mm. There are two structures of interest one in the right half of the image and one in the left. The max x position of the right structure of interest is at 0.35mm. The length of the structure is 0.2mm. You can find test images here and here.

Getting started

To install the tool, drag the link MRI_Retina_Tool.ijm to the ImageJ launcher window, save it under macros/toolsets in the ImageJ installation and restart ImageJ.

Select the "MRI_Retina_Tool" toolset from the >> button of the ImageJ launcher.

the retina toolset

  • The m-button measures the active image
  • The b-button runs a batch job for measuring all images in a folder
  • The e-button adds the detected regions to the roi-manager so that can be edited manually
  • The r-button re-measures the regions in the roi-manager


Right-click on the m-button to access the options of the measurement tool.

options dialog of the retina-tool

  • image width - the width of the whole image in mm.
  • width of region of interest - the width of the region that will be detected in mm.
  • x of region of interest - the x-coordinate from the middle of the region that will be measured in mm.
  • nr. of measurement points - the number of points at which the borders will be detected and the length be measured
  • line width - the line width of the line from which the profile is created, the bigger the value the more the plot is smoothed
  • min. height over background - the peak in the plot corresponding to the first border must be at n times the stdDev above the background
  • window width for local max. [pixel] - when detecting the local maximum no higher maximum must be within the window
  • min. depth below max - the local minimum corresponding to the second border must be the given number of times the stdDev below the max.
  • title of measurements table - the title of the table that will contain the measurements of the tool
  • debug - when selected the plots used to detect the edges are displayed and a cross marks the points detected in each plot

Right-click on the b-button to access the options of the batch-processing.

options for the batch processing

  • file extension - the file extension of the input images
  • name of the output folder - the name of the folder into which control images will be written


At each given x-positions a vertical line with the given width is drawn across the whole image and a profile plot created. The first maximum n-times the stdDev above the background level is detected. A minimum to the right of this maximum that is at least m-times the stdDev below the maximum is detected. A horizontal line from this point to the left is drawn an the point where is crosses the plot found. The length of this line segment is considered the length of the region of interest.


  1. You can use the Pad Image Names tool to make sure that images will be opened and measured in the right order
  2. You can use the Modify Polygon Selection tool to manually correct the y-positions of selection vertices without modifying their x-positions


a result region

result measurements


  1. Jagodzinska, J., Sarzi, E., Cavalier, M., Seveno, M., Baecker, V., Hamel, C., PĂ©quignot, M., and Delettre, C. (2017). Optical Coherence Tomography: Imaging Mouse Retinal Ganglion Cells In Vivo. Journal of Visualized Experiments.

WFS1BG-744_OS_R_1_0_0000038_ReportThumb_Frame13.BMP - test image (915 KB) Volker Baecker, 03/24/2015 02:36 PM

WFS1BG-744_OD_R_1_0_0000014_ReportThumb_Frame1.BMP - test image 2 (915 KB) Volker Baecker, 03/24/2015 02:38 PM

retina_toolset.png - the retina toolset (1.33 KB) Volker Baecker, 03/24/2015 02:49 PM

batch-options.png - options for the batch processing (5.54 KB) Volker Baecker, 03/24/2015 02:59 PM

result-image.png - a result region (297 KB) Volker Baecker, 03/24/2015 03:49 PM

table.png - result measurements (2.49 KB) Volker Baecker, 03/24/2015 03:50 PM

options-measurement.png - options dialog of the retina-tool (12 KB) Volker Baecker, 04/02/2015 11:41 AM