The retina is a thin layer of tissue located at the back of the eye. Its purpose is to receive light focused from the lens, and to convert the light into neural signals to be sent onto the brain (Figure 1A). The cells that transport these neural signals are known as retinal ganglion cells (RGCs). Injuries to RGCs occur in a variety of ocular disorders that can lead to blindness, and there is a large research community investigating ways to protect these cells from damage.
Retinal wholemounts, the intact removal of the retina from the eye, are the favoured technique to quantify RGC number and to assess the impact of protective treatments, such as gene-therapies (Figure 1B). However, these studies require the processing of hundreds of images, each containing hundreds of cells (Figure 1C). Manual quantification is labour-intensive, time-consuming and prone to user variation. It is clear that automated quantification improves productivity, accuracy, and reproducibility in research.
There are expensive image processing software that can count and measure co-localisation (e.g. Zen, LAX, Volocity, Imaris). Open-source computational tools for automated image analysis are also becoming increasingly available. For instance, several software packages that count the number of RGCs in naive and injured tissues have been developed in the last five years [1, 2, 3, 4]. There are also freely available co-localisation programs [5, 6, 7, 8, 9], but none are optimised for determining viral transduction efficiencies of RGCs in retinal wholemounts. Furthermore, only a few of the above mentioned programmes have the option to batch-process a large number of images.
ImageJ [10, 11, 12, 13] is an open-source program that is commonly used for image analysis in biomedical sciences. ImageJ has a variety of built-in tools to aid image analysis and enables users to create and run their own plugins. However, many ImageJ plugins still require a level of manual analysis with a repetitive workflow. We have therefore developed three ImageJ plugins to automate image analysis from retinal wholemount images.
(1) RGC Counter: this plugin detects and outlines individual RGCs, providing a quick and accurate method to quantify the total number of cells from a single-colour image.
(2) RGC Transduction: this plugin calculates the co-localisation between two colour channels and generates the following output per image: (a) total number of RGCs; (b) number of transduced RGCs (co-localised RGCs); (c) viral transduction efficiency (percentage co-localisation); (d) fluorescence intensity measurement of the transgene for each transduced RGC. In addition to being able to specify cell size and reduce noise, this plugin makes use of an optional feature that subtracts transduced axons to avoid false positives.
(3) RGC Batch: this plugin is a batch image processor compatible with both ‘RGC Counter’ and ‘RGC Transduction’ to improve workflow.
The automated analysis of the first two ImageJ plugins can be previewed in real-time to assist in establishing the parameters. The plugin results can be viewed in ImageJ or exported as CSV and XLSX files.
Taken together, we have created a set of precise, freely available and user-friendly ImageJ plugins for the retinal research community. These plugins will be particularly useful for researchers investigating neuroprotective strategies or assessing the suitability of their gene therapy vectors for inner retina transduction.
ImageJ supports a wide variety of languages for its application-programming interface (API), including Java and Python (Jython). These languages are used to produce a JAR plugin file for users to load into ImageJ. The ‘Simple RGC’ plugins are written in Kotlin , a statically typed programming language designed to fully inter-operate with Java . With ImageJ being developed in Java, its Java API documentation is much more thorough compared to its other supported languages. Kotlin allowed us to leverage this whilst gaining concise syntax and the addition of powerful functional programming constructs.
The code for ‘Simple RGC’ is split into an abstraction provided by the ImageJ API: commands and services. Commands are designed to be used for one-off operations, while services are intended to be re-used across images. As a result, the code to handle the user interfaces (UIs) of ‘Simple RGC’ is provided by commands and the image segmentation steps are encapsulated within services. This structure reduced the amount of duplicated code in our plugins and increases its maintainability.
‘Simple RGC’ requires the user to download ImageJ prior to installation. ImageJ, and associated-bundles with pre-installed plugins such as Fiji, can be downloaded at: https://imagej.net/Fiji/Downloads. It is recommended that current ImageJ users upgrade to the latest software version by selecting ‘Help > Update ImageJ…’ from the ImageJ menu. The ImageJ plugins that are part of ‘Simple RGC’ become accessible by adding our ImageJ update site http://sites.imagej.net/Sonjoonho/ to the install of ImageJ. A detailed description on how to follow an update site can be found on the ImageJ wiki page: https://imagej.net/Following_an_update_site. In brief, select ‘Help > Update… > Manage update sites > Add update site’. Next, insert ‘http://sites.imagej.net/Sonjoonho/’ into the URL box and tick the corresponding box. Afterwards, click ‘Update URLs > Apply changes > OK’ and restart ImageJ. The ‘Simple RGC’ plugins are now installed and will be accessible from the ‘Plugins’ menu in ImageJ.
We chose to use the ImageJ graphical user interface and API for ‘RGC Counter’ and ‘RGC Transduction’, as opposed to implementing a new UI. This was done to ensure that we developed a UI with a similar style and convention to other ImageJ plugins, reducing the learning curve for ImageJ users. This allows for a straightforward and friendly user experience.
All plugins are designed to be compatible with TIFF, PNG and proprietary formats such as Leica Image Files (LIFs). This allows direct export of native images from a microscope to the plugin.
‘RGC Counter’ quantifies the total number of cells in an image. The identified cells become highlighted in ImageJ and the cell counts are presented.
Following ImageJ convention, ‘RGC Counter’ operates on an image that has already been opened. To run the plugin, the user should select ‘Plugins > Simple RGC > RGC Counter’ from the ImageJ menu. The user then has the option to manually tune parameters based on cell size and image quality (Figure 2 – User Interface). It is recommended to use the preview button during the initial setup to optimise parameters for the most accurate detection of cells. The plugin will remember the most recently used parameters to improve workflow.
After the user clicks “OK” on the UI, the plugin begins to run. ‘RGC Counter’ runs a series of steps in order to successfully segment and identify each cell in the selected morphology channel of a fluorescence microscopy image. The steps of the image processing are shown in Figure 2 – Image processing and they are as follows:
The results output of ‘RGC Counter’ can be view in ImageJ’s ROI Manager. The results output can also be directly saved as XLSX or CSV file. These saved output files capture the total cell count (Figure 2 – Plugin output) as well as the user-set parameters for enhanced documentation.
Note 1: The cell diameter range in pixels can be manually determined in two simple steps: 1) Remove the scale from the open image by selecting ‘Analyze > Set Scale… > Click to Remove Scale > OK’ in the ImageJ menu; 2) Determine the cell diameter range by drawing a straight line on top of individual cells of interest by selecting ‘Straight Line Selection Tool’ in the ImageJ toolbar and afterwards measure by clicking ‘Analyze > Measure’. Alternatively, the user can estimate the cell diameter range in pixels by opening the image and using the ‘preview’ button from the UI of the plugin.
‘RGC Transduction’ identifies the co-localisation between two colour channels with the rationale to identify cells that have been transduced by a viral vector. Moreover, fluorescence intensity measurements are recorded in all channels of an open image. The cells classified as co-localised are highlighted on the image, and the results are tabulated.
‘RGC Transduction’ requires that an image is opened in ImageJ in order to run the plugin. To run the plugin, the user should select ‘Plugins > Simple RGC > RGC Transduction’ from the ImageJ menu. The user is required to select the channels for co-localisation analysis, and to specify the image-processing parameters (Figure 3 – User Interface). It is recommended to use the preview button during the initial setup to optimise parameters for the most accurate measurements of transduced cells. The plugin will remember the most recently used parameters to improve workflow.
‘RGC transduction’ runs a series of steps that are highlighted in Figure 3 – Image processing. Initially, the image is split into two separate single-channel images, corresponding to the channels for morphology and transduction selected by the user. With the need to identify individual cells across the morphology and transduced channels, the same pre-processing and segmentation pipeline as ‘RGC Counter’ is applied separately to both channels. Afterwards, co-localisation between the two channels is calculated. A cell is classified as transduced if at least 50% of the pixels in the morphology channel are also covered by pixels in the transduction channel. This threshold of co-localisation achieved the best performance on the investigated images containing RGCs and the transgene eGFP.
The results output of ‘RGC Transduction’ can be view in ImageJ’s ROI Manager or can be directly saved as XLSX or CSV files. We recommended saving the results in the XLSX format because it will generate one organised file with multiple tables, in contrast to multiple CSV files. Highlights of measurements performed by ‘RGC Transduction’ are shown in Figure 3 – Plugin output. The tab called ‘summary’ will show key measurements for the image, including ‘total number of cells’, ‘number of transduced cells’, ‘transduction efficiency (%)’, ‘average morphology area’, and various fluorescence intensities. The tab entitled ‘transduced cell analysis’ will show all the metrics for each individually transduced cell. The tab named ‘Parameters’ contains the image-processing parameters that were selected for image analysis.
‘RGC Batch’ is a batch-image processor that allows the user to run multiple image files through ‘RGC Counter’ or ‘RGC Transduction’ with minimal user interaction or repetition.
The UI is not built using ImageJ’s command interface as done for ‘RGC Counter’ and ‘RGC Transduction’. Instead, we built our own custom UI using the Java Swing framework to circumvent ImageJ UI restrictions. This allowed us to make separate tables for both ‘RGC Counter’ and ‘RGC Transduction’. The user interface of RGC Batch is shown in Figure 4 – User Interface.
From a technical perspective, ‘RGC Batch’ simply acts as a wrapper to both ‘RGC Counter’ and ‘RGC Transduction’ making it capable of running a collection of images from a selected folder as illustrated in Figure 4 – Workflow.
The results generated by ‘RGC Batch’ can be saved in one XLSX file (recommended) or multiple CSV files. Highlights of measurements performed by ‘RGC Batch’ are shown in XLSX format in Figure 4 – Plugin output. The output of ‘RGC Batch’ when running ‘RGC Counter’ is largely similar to that of ‘RGC Counter’, only adding additional rows for each image processed. The output of ‘RGC Batch’ when running ‘RGC Transduction’ has notable differences to that of ‘RGC Transduction’. The main reason for this is to ensure that the metrics for each cell are clearly organised per individual image. The output of ‘RGC Batch’ when running ‘RGC Transduction’ consists of tables for each measurement and the individual metrics are shown for each cell per image.
Note 2: Before running ‘RGC Batch’, ensure that all images have the same channel ordering and that microscope settings are consistent across all images.
Note 3: The generation of an output file is more time consuming when one of the following image processing parameters are selected: ‘Exclude axons’, ‘Exclude axons in morphology channel’, ‘Exclude axons in transduction channel’.
The Simple RGC ImageJ plugins were validated by comparing the output of each plugin to manual quantification performed by six investigators. The time required to manually process each image was also measured.
RGCs from mouse retinal wholemounts were immunolabelled with the RGC marker RBPMS, and images were captured using an epifluorescent microscope at 20x magnification. The number of RGCs per image was manually counted in six images from uninjured- and injured retinal wholemounts by six independent investigators.
ImageJ plugin ‘RGC Counter’ detects and highlights RBPMS-positive cells from the image file and separates overlapping cells (Figure 5A and C). Pearson product-moment correlation analysis demonstrated a strong positive linear correlation between automated- and manual quantifications (Figure 5B and D). The Pearson correlation coefficient (r) was 0.961 for the quantifications of both uninjured- and injured retinal wholemounts images. The time required to manually quantify one image ranged from 2 to 16 minutes, depending on the investigator and number of RGCs per image (Figure 5E and F). In contrast, the automated quantification via ‘RGC counter’ took less than 20 seconds (Figure 5E and F). Taken together, the ImageJ plugin ‘RGC Counter’ quantifies the number of RGCs accurately and rapidly.
The retina had been transduced with a viral vector encoding enhanced green fluorescent protein (eGFP). RGCs from a mouse retinal wholemount were immunolabelled with the RGC marker Brn3A, and images were captured using a confocal microscope at 40x magnification. Twelve images (3 images per retinal quadrant) were captured to provide a global overview of the gene therapy effectiveness.
ImageJ plugin ‘RGC Transduction’ measures the co-localisation between the transduction (eGFP-positive cells) and morphology channel (Brn3a-positive cells) and then highlights and measures the number of transduced RGCs (Figure 6A). Pearson product-moment correlation analysis demonstrated a positive linear correlation between automated- and manual quantification (Figure 6B and 6C). The Pearson correlation coefficient (r) was 0.712 between the two quantification methods to determine the number of transduced RGCs (Figure 6B). Expectedly, the correlation is not as high as ‘RGC Counter’ due to the need to overlay two channels, and variability in transduction levels and morphology. Consistent with plugin ‘RGC Counter’, quantification of the total number of RGCs in the morphology channel was highly accurate and resulted in a Pearson correlation coefficient (r) of 0.995 (Figure 6C). The transduction efficiency of a viral vector is calculated by dividing the number of transduced RGCs by the total number RGCs – displayed in the output table of the ImageJ plugin. The automated quantification resulted in an average transduction efficiency of 40.2 ± 3.0 % for the viral vector across all images (Figure 6D). This outcome was not statistically significantly different from manual measurements calculated by the six investigators (Figure 6D). This result demonstrates that ‘RGC Transduction’ is sensitive enough to accurately determine the viral transduction efficiency of RGCs in retinal wholemounts.
As an added benefit, we also programmed the plugin to measure the transgene fluorescence intensity from each of the transduced RGCs (see Figure 2 – Plugin output and Figure 4 – Plugin output). This provides the user with a wider range of information, such as strength of transgene expression in addition to transduction percentage. This is a key advantage of using a plugin to enhance research output. When investigators were asked to determine the transgene fluorescence intensity of 15 transduced RGCs per image, cells chosen at random, the results varied greatly between the six investigators (Supplementary figure 1) also highlighting difficulties with reproducibility when completing image analysis manually.
Furthermore, the plugin vastly improved workflow speed. The automated quantifications via ‘RGC Transduction’ quantified the number of transduced RGCs, the total number of RGCs and the fluorescence intensity per cell within 25 seconds for each image. In contrast, it took investigators between 4 and 17 minutes per image to perform this task (Figure 6E).
Taken together, the ImageJ plugin ‘RGC Transduction’ reduces the amount of time needed for image analysis, accurately determines the number of transduced RGCs, the total RGC population, percentage viral transduction efficiency, and the individual transduction strength for each RGC.
The functionality of ImageJ plugin ‘RGC Batch’ was validated by comparing the output of this batch image processor to the results of ‘RGC Counter’ and ‘RGC Transduction’.
The results generated by ‘RGC Batch’ were identical to ‘RGC Counter’ (Figure 7A) and ‘RGC Transduction’ (Figure 7B). This demonstrates that ‘RGC Batch’ can process multiple images with the same high level of accuracy as the stand-alone plugins. This third plugin makes automated quantification of large data sets more user-friendly by avoiding a repetitive workflow when all images are taken using identical microscope settings.
Any operating system compatible with ImageJ or Fiji (http://imagej.net).
The ‘Simple RGC’ plugins are written in Kotlin (Version 1.3.50) and ImageJ is written in Java (Version 8 update 251 or later).
No further requirements.
The plugins are reliant on ImageJ (version 1.53b or later) and the following plugins: Auto Threshold (version 1.10.0 or later), fastcsv (version 1.0.3 or later), Apache POI (version 3.17 or later), Apache XmlBeans (version 3.1.0 or later), Bio Formats (Version 6.1.1. or later).
Code repository name: GitHub
Licence: GNU General Public Licence version 3
Date published: 10/08/2020
Although the ‘Simple RGC’ plugins have been optimised for inner retinal research, the plugins should also be able to quantify cell types other than RGCs within tissue sections. For instance, ‘RGC Counter’ would be suitable for quantifying neuronal populations within the brain or dorsal root ganglia. Likewise, ‘RGC Counter’ could be used to quantify cells in vitro. ‘RGC Transduction’ could be re-used for non-RGC studies where a user may want to quantify the proportion of one particular cell type within a mixed cell population. The plugins should allow most cell types with a relatively round-like morphology to be investigated. Although this paper highlights usage of the plugins with mouse retinal tissue at 20x and 40x magnification, we have confirmed the plugins work over an extended range of microscope settings, and works on other species of animal. To increase the re-use potential, and allow other users to examine transduction in greater details, we have also enabled the plugin to measure fluorescence intensity of transduced cells in other channels. ‘RGC Transduction’ therefore can quantify expression of proteins tagged to a fluorescent marker which may be applicable to drug discovery platforms – measuring protein synthesis, activation, signalling or inhibition following treatment.
The authors of this manuscript are responsible for maintaining the plugins of ‘Simple RGC’. We would encourage that potential bugs are reported by creating an issue on the GitHub account (by using the link: https://github.com/sonjoonho/SimpleRGC/issues), or alternatively by contacting the corresponding authors by e-mail.
This work was funded by the Sight Research UK (SAC 041), Fight For Sight UK, an ERA-NET NEURON grant AxonRepair by the Medical Research Council (MR/R004544/1) and the Department of Computing of Imperial College London via the Corporate Partnership Programme (CPP).
The authors have no competing interests to declare.
Tiger Cross, Rasika Navarange, Joon-Ho Son, William Burr, Arjun Singh and Kelvin Zhang have contributed equally to this work. Andrew Osborne and Bart Nieuwenhuis share senior authorship.
Dordea AC, Bray M-A, Allen K, Logan DJ, Fei F, Malhotra R, Gregory MS, Carpenter AE, Buys ES. An open-source computational tool to automatically quantify immunolabeled retinal ganglion cells. Experimental Eye Research. 2016; 147: 50–56. DOI: https://doi.org/10.1016/j.exer.2016.04.012
Geeraerts E, Dekeyster E, Gaublomme D, Salinas-Navarro M, De Groef L, Moons L. A freely available semi-automated method for quantifying retinal ganglion cells in entire retinal flatmounts. Experimental Eye Research. 2016; 147: 105–113. DOI: https://doi.org/10.1016/j.exer.2016.04.010
Guymer C, Damp L, Chidlow G, Wood J, Tang YF, Casson R. Software for Quantifying and Batch Processing Images of Brn3a and RBPMS Immunolabelled Retinal Ganglion Cells in Retinal Wholemounts. Translational Vision Science & Technology. 2020; 9(6): 28–28. DOI: https://doi.org/10.1167/tvst.9.6.28
Masin L, Claes M, Bergmans S, Cools L, Andries L, Davis BM, Moons L, De Groef L A novel retinal ganglion cell quantification tool based on deep learning. Scientific Reports. 2021; 11(1): 702. DOI: https://doi.org/10.1038/s41598-020-80308-y
French AP, Mills S, Swarup R, Bennett MJ, Pridmore TP. Colocalization of fluorescent markers in confocal microscope images of plant cells. Nature Protocols. 2008; 3(4): 619–628. DOI: https://doi.org/10.1038/nprot.2008.31
Stauffer W, Sheng H, Lim HN. EzColocalization: An ImageJ plugin for visualizing and measuring colocalization in cells and organisms. Scientific Reports. 2018; 8(1): 15764. DOI: https://doi.org/10.1038/s41598-018-33592-8
Zhang H, Ericsson M, Virtanen M, Weström S, Wählby C, Vahlquist A, Törmä H. Quantitative image analysis of protein expression and colocalisation in skin sections. Experimental Dermatology. 2018; 27(2): 196–199. DOI: https://doi.org/10.1111/exd.13457
Lunde A, Glover JC. A versatile toolbox for semi-automatic cell-by-cell object-based colocalization analysis. Scientific Reports. 2020; 10(1): 19027. DOI: https://doi.org/10.1038/s41598-020-75835-7
Nieuwenhuis B, Haenzi B, Hilton S, Carnicer-Lombarte A, Hobo B, Verhaagen J, Fawcett JW. Optimization of adeno-associated viral vector-mediated transduction of the corticospinal tract: comparison of four promoters. Gene Therapy. 2021; 28(1): 56–74. DOI: https://doi.org/10.1038/s41434-020-0169-1
Abramoff MD, Magalhães PJ, Ram SJ. Image processing with ImageJ. Biophotonics international. 2004; 11(7): 36–42. URL https://dspace.library.uu.nl/handle/1874/204900. [Online; accessed 25-March-2021].
Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B, Tinevez J-Y, White DJ, Hartenstein V, Eliceiri K, Tomancak P, Cardona A. Fiji: an open-source platform for biological-image analysis. Nature Methods. 2012; 9(7): 676–682. DOI: https://doi.org/10.1038/nmeth.2019
Schneider CA, Rasband WS, Eliceiri KW. NIH Image to ImageJ: 25 years of image analysis. Nature Methods. 2012; 9(7): 671–675. DOI: https://doi.org/10.1038/nmeth.2089
Rueden CT, Schindelin J, Hiner MC, DeZonia BE, Walter AE, Arena ET, Eliceiri KW. ImageJ2: ImageJ for the next generation of scientific image data. BMC Bioinformatics. 2017; 18. DOI: https://doi.org/10.1186/s12859-017-1934-z
Kotlin Programming Language. URL https://kotlinlang.org/. [Online; accessed 25-March-2021].
Otsu N. A Threshold Selection Method from Gray-Level Histograms. IEEE Transactions on Systems, Man, and Cybernetics. 1979; 9(1): 62–66. DOI: https://doi.org/10.1109/TSMC.1979.4310076
Steger C. An unbiased detector of curvilinear structures. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1998; 20(2): 113–125. DOI: https://doi.org/10.1109/34.659930
Schmid M. Accurate Gaussian Blur. URL https://imagej.nih.gov/ij/plugins/gaussian-blur.html. [Online; accessed 12-April-2021].
Tsai W-H. Moment-preserving thresolding: A new approach. Computer Vision, Graphics, and Image Processing. 1985; 29(3): 377–393. DOI: https://doi.org/10.1016/0734-189X(85)90133-1
Shanbhag AG. Utilization of Information Measure as a Means of Image Thresholding. CVGIP: Graphical Models and Image Processing. 1994; 56(5): 414–419. DOI: https://doi.org/10.1006/cgip.1994.1037
Soille P, Vincent LM. Determining watersheds in digital pictures via flooding simulations. In: Visual Communications and Image Processing ’90: Fifth in a Series. International Society for Optics and Photonics; 1990. DOI: https://doi.org/10.1117/12.24211