Visual Abstract
Abstract
Measuring neurite length is crucial in neurobiology because it provides valuable insights into the growth, development, and function of neurons. In particular, neurite length is fundamental to study neuronal development and differentiation, neurons responses to drugs, neurodegenerative diseases and neuronal plasticity. Surprisingly, there is currently a lack of tools for high-throughput neurite analysis. In this article, we present CABaNe, as an open-source, high-throughput, rule-based ImageJ macro for cell analysis, including their neurite length. This macro possesses a graphical interface, metadata production, as well as verification means before and after analysis. Rule-based and machine learning-based programming have been tested for cell identification. Cell tested were N2A, a mouse neuroblastoma cell line. After testing, we had better precision and adaptability using rule-based cell identification. We challenged CABaNe with currently used techniques, which are manual or assisted. When tested on a small sample, CABaNe analyzed the dataset of interest much faster than manual measurements, while maintaining or increasing precision. When tested on a large dataset, comparing different conditions, we successfully highlighted differences between conditions, in a fully automated manner. Therefore, CABaNe is viable as a high-throughput option for cell analysis, for neurite length and other parameters. It is a base of code that can be used for other analysis or to train deep learning models. In the future, we expect this tool to be widely used in both basic and applied neurobiology research.
Significance Statement
When studying neuronal cell differentiation, an important morphological parameter is neurite length. This parameter requires measuring the protrusions length of analyzed cells. However, this analysis done manually can be long, as each individual cell must be measured independently. Currently, efficient single cell tools exist to assist the measurement, such as NeuronJ. However, there is currently no available automated tool for this analysis, and manual techniques suffer operator bias. In this paper, we present a macro to fully automatize neurite length and other parameters measurement, for each cell, in each image, in each condition.
Introduction
Measuring neurite length is crucial in neurobiology because it provides valuable insights into the growth, development, and function of neurons. Growth of neurites is essential for the establishment of neuronal networks. Neurite length is a measure of neuronal maturation, polarity, and functional potential. It can help assess how different signaling pathways, growth factors, or drugs influence neuronal development (Wiatrak et al., 2020; Rumpansuwon et al., 2022; Sánchez-Sarasúa et al., 2022) or in the field of regenerative medicine, where the aim is to differentiate cells in neurons to repair injuries (Gao et al., 2022). In addition, analyzing neurite length changes can also help the understanding of how neural circuits adapt to experiences and environmental stimuli (Crutcher and Collins, 1982; Gilbert and Man, 2017). In diseases like Alzheimer's, Parkinson's, and Huntington's, neurite shortening or atrophy can serve as biomarkers for disease progression (Schwab and Ebert, 2015; Barnat et al., 2017; Ghatak et al., 2019).
Finally, neurite length is important to study cancers such as glioblastoma and neuroblastoma (NB) where more differentiated cancers are less aggressive than their more immature counterpart (Mohlin et al., 2011; Sabelström et al., 2019). In particular, NB in particular represents 7–10% of diagnosed pediatric cancers and is responsible for 15% of childhood cancer fatalities (Gurney et al., 1997; Davidoff, 2012; Gatta et al., 2014).
Mature, differentiated NB cells usually form neurites, therefore measuring their length is often used as parameter to assess differentiation. Antibodies for fluorescent staining (e.g., anti-beta III tubulin for neurite and anti-MAP2 for dendrites) facilitate quantification or morphological analysis (dos Santos et al., 2023). We reviewed some of the work in literature on NB and cell differentiation to evaluate how the measurement of neuronal differentiation is generally performed. The methods used, including for measuring neurite length, are outlined in Table 1. We noticed that the analysis is mainly manual.
Summary of readout in NB cell lines differentiation studies
While there exist automated analysis solutions, these are either linked to a specific equipment (Ramm et al., 2003), expensive and running on outdated versions of Windows (Beier et al., 2017), or free but not adapted to simple, cell culture, and 2D images (Wang et al., 2010). An advanced, open access ImageJ macro for neurite analysis is available (Dehmelt et al., 2011), but we did not succeed in getting a satisfying segmentation of cells when tested on our images.
To test the role of different molecules, drugs, and cellular responses to external stimuli and have a statistical relevance, a large number of conditions have to be tested in parallel and multiple images per conditions have to be acquired. As illustrated in Figure 1, this could produce a large volume of data to process. With current methods, which are mainly manual (Table 1), analyzing neurite length of this dataset of images would take hundreds of hours. Manual analysis suffers from operator bias, variability in measurement and protocols, and lack of quality control. Long session can also induce mental and physical strain on the operator. Therefore, there is a need to develop automated and high-throughput means of measuring neurite length in batch analysis.
High-throughput analysis of NB differentiation, via neurite length measurement, for multiple experimental conditions studied in parallel, with approximation of the number of cells to analyze, and representation of the parameters of interest. A, Visual representation of a high-throughput experiment, with platemap and fields of view. B, Example image, composed by the merging of cell channel (Beta tubulin immunostaining, red), and a nuclei channel (DAPI, blue). C, Visual representation of main parameters extracted from each cell in each image by CABaNe, as well as an example of verification image produced during the analysis.
This paper presents and explains an open, fully automated, and free ImageJ macro able to measure neurite length of differentiating neurons in batches: Cell Analyser in Batch for Neurites (CABaNe).
Materials and Methods
What is the solution we bring?
CABaNe automatically analyzes fluorescent images of cells, extracting the length of the longest neurite for each cell on a field of view, among other parameters. The software facilitates the study of neuronal cell differentiation in high-throughput settings, using low-resolution images, but can also analyze single images at higher magnification/resolution and the protrusions of other cell types. While there is no precise definition of high throughput, it generally refers to situation were too many operations are required to be carried out manually in a reasonable manner. In our situation, the manual morphological analysis of a dataset of thousands of cells could not be carried out without spending a considerate amount of time and inducing a strain in the operator.
This macro allows analyzing large batches of images, without any operator inputs apart at the initialization step. The macro has been designed to analyze multiple conditions in succession and to save results for each condition and for each single cell. Most importantly, past initial parameter setup, it is entirely automated therefore limiting human bias, and it can be run on a computer and left for analysis.
While we implemented an option to analyze the nuclei intensity signal from a third channel, it will not be developed here: it is functional and works in single cell to link neurite length and intensity of signal, but we decided on focusing on the morphological analysis.
Overall, three main steps can be identified. The initialization, during which metadata are created and the images prepared. The processing, in which images are going through filters and operations to isolate the shapes of interest, namely, the nucleus, the body, the whole cell, and the skeleton. Finally, the analysis, in which the data is extracted and stored, in .csv tables. Verification images and metadata of parameters used are automatically provided, for each condition.
The readout provided includes, but is not limited to, single cell neurite length, total cell, nuclei, and body area, shape indicators, and number of branches (Fig. 1C). Results are produced in .csv, one for each single cell and one per condition. CABaNe analyzes a combination of the nucleus and cell images of a given condition. A graphical interface, presented in Figure 2, was created, to ease the use of CABaNe, but also to give to the user insights on the parameters used.
CABaNe graphical interface with explanation of parameters of interest. Values are either default or examples. Interface is divided in three parts. A, Initialization, in blue, to define the folders of interest, the type of operation, and the experimental conditions used. B, Processing, in orange, to change the parameter related to the image processing. C, Analysis, in green, to choose the calculus mean for neurite length. A user guide is available in Extended Data Figure 2-1, a troubleshooting guide in Extended Data Figure 2-2, and an overview of the architecture in Extended Data Figure 2-3. Sample images for testing are available in Extended Data Figure 2-4.
Figure 2-1
User guide for the use of CABaNe, guiding in more detail through its use, and giving advice and its usage, as well as giving information on data analysis and verification. Download Figure 2-1, DOCX file.
Figure 2-2
Troubleshooting guide covering some of the basic possible errors that the user can encounter. Download Figure 2-2, DOCX file.
Figure 2-3
Data architecture in macro workflow. Yellow is for folders, green for tables, blue for images and white for texts. The macro will create every folder but the Experiment, Image, and Results, and the conditions if the sorting is not used. This assures a normalisation of the architecture as well as concordance with quality standards. Download Figure 2-3, TIF file.
Figure 2-4
Sample images to test CABaNe. Open in ImageJ and, split (stack to image) and save individual images for testing. Download Figure 2-4, TIF file.
When developing this macro, we had to choose between filtering using machine learning or traditional rule-based programing. We selected Trainable Weka Segmentation tool (Arganda-Carreras et al., 2017; Wasswa et al., 2019) for its well established in ImageJ bibliography. However, machine learning in our application faced limitation: our limited computer power, problems with cells and background heterogeneity, which lead to a lack of flexibility, the lack of transparency in machine learning parameters, and overall the intricacy of machine learning for novice users. All these aspects led us to revert to what we define here as Rule-Based Programming (RBP), which can be described as a set of filters from ImageJ, using neither deep or machine learning. As such, it need not training prior to dataset analysis, but only filter tuning. This step can be done directly using the dataset, using CABaNe's options. Various sample size can be used for tuning, and during our tests, similar dataset were compatible with the same parameter setting.
The user has wide control over the parameters; however, it should be noted that the default values have been calibrated to work with our own images, such as the one displayed in Figure 1B.
The main menu is illustrated in Figure 2. The parameters have been divided into three categories: initialization (Fig. 2A), selection of the operating parameters; processing (Fig. 2B), to set the filters that will be applied during the analysis; and analysis (Fig. 2C), to select the type of measurements that will be done.
A user guide is available in Extended Data Figure 2-1, as well as basic troubleshooting in Extended Data Figure 2-2. The code itself is in Extended Data 1.
Initialization
In initialization, the operator can select the folder where the images to be tested are located and the folder to save the analyzed images. This must contain one folder per condition; we advise following the architecture displayed in Extended Data Figure 2-3. To identify which channel correspond to the nuclei or the cytoskeleton of the cells, a character string only present in the channel of interest has to be inputted. The macro will search it in the image names when they get opened. Then, the type of operation to perform can be defined under the “chose operation” drop-down” menu. The three types of operation are “Analyse,” “Sort,” and “Test_filter.” A fourth option, “Sort_then_analyse,” is the combination of “Sort,” followed by “Analyse.”
Neurite analysis is started if the “Analyze” option in “chose operation” is selected. “Sort” allows to pre-sort images using defined parameters, to remove images without analyzable cells and store them in a verification folder, and to store valid images in a specific condition folder if the image name format is compatible, or in a general folder if not. To be compatible with automated sorting, images must have a distinct condition identifier in their name, separated from the fixed part of its name by a unique character. “test_filter” allows to dynamically test filter values, in case the default parameters do not work for a set of images, e.g., images with a strong background or artifacts. This tool provides visual feedback on the filter parameters. The operator can select the number of images to test per condition. “Sort_then_analyse” is to start “sort” and “analyse” in sequence, if the operator wants to process large amounts of data without human intervention.
To guarantee optimal cell detection in defined conditions, we suggest to test images using “test_filter”. Then, using the “sort” option if some images potentially do not wield cells to analyze, then “test_filter” options to finely tune the filtering parameter and use the selected values for the analysis.
When relevant, the user may restrict the analysis to a range of continuous conditions within the list, stating the start and end conditions to be analyzed.
Processing
In processing, the operator can adjust the filter parameters for analysis. While “test_filter” is running, the macro will loop back to the menu and save the parameter used, allowing to fine-tune the macro. Unsharp mask is used to reduce noise but can sometimes produce artifacts in empty images; weight of this mask can be tuned, with values closer to 0 reducing the strength. The radius is set per analysis. It is recommended to separate touching cells using the nuclei, but separation using body identification can be used if the nuclei channel is missing. In this situation, the operator can use any channel with a good body imaging to replace the nuclei channel. Thresholds are used to detect pixel values, to differentiate “objects pixels” from the “background pixels.” “Minimum” is the most discriminating threshold, reducing noise and potentially giving the most accurate shape contours, but also the least robust. In contrast, “Default” threshold is more robust but has poor discrimination and may reduce detail or separation between cells. “Triangle” threshold is in between. Size of the different element can be slightly adjusted if during testing the operator notices the segmentation differ from the true size of the bodies, nuclei, or whole cells. The operator can also select parameters to discriminate the size and shape of cell and nuclei, mainly to remove small artifacts.
Analysis
Finally, in analysis, the operator can choose whether the macro would measure neurites from the body of the cell or from the nucleus.
Additionally, we provide a Python script (in Extended Data 2), using Panda, a data analysis library, to summarize and analyze the tables generated as results during the analysis phase.
Requirement and recommendation for running CABaNe are provided in Table 2. During acquisition of cells, it is recommended to acquire two channels: one for the cytoskeleton and one for the nuclei. They have to be separated files, not stacked. In the image folder, images for each field of view must be following each other alphabetically and have a distinctive string of characters for each channel.
Prerequisite for CABaNe optimal functioning
Imaging is done with immunofluorescent labeling for better cell segmentation. Background noise is ideally low to permit a good analysis of the neurites, even if filters are applied to reduce it. The best results were obtained at 20× magnification, numerical aperture 0.75, but we could also run the macro at 10×. At 4× the resolution may be too low and at magnifications greater than 20× the cells are likely to touch the edges.
Regarding cell contact, even if the macro separates touching cells, better results are obtained when cells do not touch. Otherwise, neurites may be shared between two or more cells. For cells that are already well differentiated and forming networks, performance is reduced for the same reason.
There is no limit to the number of images that can be analyzed at once. We were able to do hundreds of images at a time. Only time is a limit. In average, with the computer we used, which hardware is described in Table 2, we accounted for ∼30 s per image. This value depends on the number of cells on the image and the hardware used, with time values halved when we used a better computer.
Description of the macro
Workflow of the analysis loop of the macro is presented in Figure 3A. We will present the different steps occurring after running the code.
Overview of “Analyze” operation workflow, with example images. Blue is for initialization steps, orange for image processing, and green for analysis. A, Process diagram. Other letters are in the workflow. E, F, G, H, J, Images have labels in ImageJ, but we only kept them in H for visibility sake. A zoomed insert of analyzed cells is displayed on the bottom right corner of images. Images have a size of 663× 663 µm. B, Nuclei base image. C, Cell base image. D, Cleaned and binarized cell image to differentiate the cell signal from the background. E, Segmentation of the global cell structure. F, Segmentation of the nuclei. G, Segmentation of the cell bodies. H, Splitting and segmentation of single cells. I, Example of skeletonization of cells. J, Recapitulative image of overall segmentation and analysis, for the field of view. K, Verification file for segmentation, single cell.
Initialization
First, all other windows are closed, results and ROI manager are reset, to insure nothing interferes with CABaNe. Then, the parent image folder, the folder containing all the image folders, is scanned to find the first condition to analyze, as inputted in “Start condition.” Once the condition is found, a loop is started to analyze all the conditions up to the end condition. Two images of the folder are opened (Fig. 3B,C), and each image will be identified and renamed using the character string unique for each channel. The folder architecture for each condition is created for the given image (Extended Data Fig. 2-3), and if it is the first one of the conditions, a metadata file is generated. The metadata contains the values of the parameters used and the names of the folders.
Processing
The cell image is processed, first with “auto-contrast” to normalize the images, then with an “unsharp” mask, to reduce background noise, and to make cell shape more contrasting to the background. It is then binarized using a threshold, and further processings, closing and dilatation, are applied to remove artifacts and smooth the cells (Fig. 3D). The global structure of the cells is then segmented using “Analyze Particles” (Fig. 3E). A similar background cleaning process is applied to the nuclei images. Nucleus are then segmented following operator inputs values, and the ROI of their position is saved in an external file (Fig. 3F). Nucleus touching the edges of the images will not be analyzed. Nucleus will be used as references to identify cells position. An unmodified version of the cell image is then treated with minimum and median filters, using user's parameters, to segment cell bodies. A “Watershed” step is applied, using the nucleus as a seed, and applied to extract the body of each identified cell (Fig. 3G). The body ROIs are saved in a separate file. The segmented cell image is also treated with a watershed using nucleus as markers, and user's parameters on cell size and shape limits. Cells touching the edges of the image are excluded (Fig. 3H). Cells' ROIs are also saved in a separate file.
Cell ROIs are then skeletonized (Fig. 3I), and either bodies or nucleus is removed from their structure, depending on chosen parameters.
Analysis
An image is generated from the base image, cell, nuclei, body ROI, and the skeleton, both for each field of view (FOV; Fig. 3J) and for each cell (Fig. 3K), as a verification mean. Then, for each cell, data, including area, shape, and others, are extracted from each ROI and from the skeleton, from which the longest shortest path, number of branches, and other parameters will be saved into the summary .csv file, while the values for each branch is saved for the single cell analysis .csv files.
Once this field of view analysis is complete, the images are closed, and the next pair of images is opened. The summary .csv is kept and amended for each image, until the condition is over. Finally, all output (images, tables, RoiManager) are closed or reset, and the analysis for the next condition begins, until all conditions have been completed or the condition specified by the operator has been reached.
“Test_filter” description
If selected in the main menu and started, CABaNe will carry on with the “test_filter” operation. It is used to test chosen parameters on cell, nucleus, and body detection. It follows the same step as the analysis seen in Figure 3, up to step G, but without saving the ROIs. The workflow of this operation is presented in Figure 4A. After splitting the global cytoskeleton shape, nucleus, and body, an image is created by merging and coloring the base image (black and white), the nucleus (blue), as well as the detected contour of cytoskeleton (red), body (yellow) and nucleus (green). All images, with the merging, is then displayed, as in the example presented in Figure 4B. The operator can check the selected parameter and click “OK” in the explanatory window, presented in Figure 4C, at which point the macro will revert to batch mode and close all images. As many images per condition will be tested as selected, until the end of the conditions. The macro will then loop back to the main menu, for the user to change parameters if necessary, or to start the main analysis.
Workflow of “Test_Filter” operation (A), with example of visual feedback provided (B) and waiting window (C).
Code accessibility
The code is fully accessible in the Extended Data 1 and 2, or on GitHub, at this address: https://github.com/NathanThibieroz/Cell_Analyser_in_Batch_for_Neurites_-CABaNe-. Additionally, the GitHub page contains an example folder architecture, the user guide, sample images, Table 2, the template excel, and python code for data treatment. Update will be available on that page. Anyone is free to use or modify the code, as long as it is not for commercial use. Computer used ran with a i5-8265U 1.60 GHz, 8 Go RAM. Images were stored on an SSD. Macro is 41 Ko. Operating system tested were Windows 10 and 11. ImageJ version was FiJi 2.14.
Data 1
CABaNe ImageJ code, to be used as a macro. Download Data 1, TXT file.
Data 2
Python code to help with treatment of the data produced by CABaNe. Download Data 2, TXT file.
Macro output
For each condition, the “_Skeleton_analysis_summary.csv” from the last field of view will be a summary of all single cells analyses of the conditions. Each row is a cell. There are a variety of parameters extracted from the analysis, presented in Table 3.
Result variable of CABaNe found in the result .csv, with name of the parameter, unit, and a description
The main parameters of interest are as follows: the longest shortest path, which is related to neurite length; the cell, nucleus, and body area; and the number of segments, which represents the number of neurites. Note not length-based discrimination is being carried out.
WEKA-based machine learning
For our first test, in machine learning, we used Trainable Weka segmentation (Arganda-Carreras et al., 2017; Wasswa et al., 2019). A classifier was created by manually identifying the cytoskeleton, nucleus, and background, using a reference image for training, different from the analyzed images. The classifier was then saved and used in the macro, replacing the RBP filters used on the cells and nuclei channels, replacing the cleaning of nuclei and cell images, as well as their isolation. Once overall cell shape and nuclei are detected, the next steps are the same for both machine learning and RBP macro, including the “watershed” to split the cells.
Cell culture and fixation and immunostaining
In order to test CABaNe on cell images, we cultured N2A cells (male mouse NB) in 75 cm2 in DMEM (1×) + GlutaMAX (1 g/L + Pyruvate; Dulbecco's Modified Eagle Medium) supplemented with 10% FBS medium, 1% nonessential amino acids, and 1% antibiotic–antimycotic. Cells were kept in low passage (<10). After passing and sufficient growth, cells were starved (replacement of medium with a medium without FBS) for 4 h. For the single image analysis, cells were then detached and seeded in a 10-well slide from Greiner, ref 543079, in 2% medium. Cell density was 250 cell/well. Cells were cultivated for 7 d, and new medium was added each 48 h. For the batch analysis, cells were seeded in three different occasions, in similar passages, in 96 well plate from Greiner, ref 655986. Cell were seeded at 125, 250, and 500 cell/well, in a 10% medium. After 72 h, medium was replaced with 0 or 10% serum medium. Both experiments were then fixed in 4% paraformaldehyde, at Day 5, and marked with mouse anti β-tubulin, from Sigma, coupled with goat anti mouse Alexa Fluor plus 555, from Invitrogen, for cytoskeleton, and DAPI for nucleus.
Image acquisition was carried out in high throughput using an INCELL 2500 HS, with 12 FOV per well, ordered around the center of each wells. Used objective was 20×, of 0.75 numerical aperture, resulting in 663 × 663 µm images. Channels acquired were the blue, excitation/emission wavelength of 390/432.5 nm, and the orange, excitation/emission wavelength of 542/587 nm, with an exposition of 20 and 50 ms.
Experiment was repeated three times, on different days.
Statistical analysis
Statistical analysis was carried out using Origin. Samples were determined not to have a normal distribution. Datasets are independent. Thus, we decided on using the paired-sample Wilcoxon signed rank test for the machine learning, RBP, and assisted manual comparison and the Mann–Whitney–Wilcoxon test for the high-throughput test, with p = 0.05.
Machine learning, RBP, and assisted manual comparison
We decided to create a classifier to compare classical image processing filters, the machine learning approach, both using the macro, and analysis done manually using NeuronJ, which we will here call the manual method, to be considered as the reference method to analyze neurite length. We decided to compare selected, specific cell parameters, and the analysis time, as it is important for high-throughput analysis. Time is manually measured, from the moment the macro, CABaNe, or NeuronJ is started, to when the results are saved. We also decided to focus our comparison analysis on four reference images to compare a set of parameters, all from the same condition.
Manual analysis of parameters other than neurite length was carried out using basic ImageJ tools.
Cell limit parameter, here min/max area of cell and nucleus, were set to be the same for the machine learning and RBP. RBP was set to default values, as they are set in Figure 2, with the exception of the cell threshold that was set to “minimum” due to the good quality of the image in the 10-well slide. The 96-well plate, with plastic bottoms, required the following threshold: “Default” for Nuclei, “Mean” for Cell, and “Triangle” for Body. Cell touching the edges are excluded.
During first tests, accepted cell size was 200–3,000 µm2 and nucleus size from 50 to 5,000 µm2, but minimum nuclei size was reduced to 30 µm2 because the machine learning macro severely under estimate nucleus outlines and the limit of 50 µm2 led to recognition of very few cells. Therefore, for machine learning, we had to adapt the parameters for this image to get optimal results. All images were analyzed using the same parameters and by the same operator.
To test the versatility of CABaNe, we analyzed images other than those from our dataset. For this purpose, we analyzed images of primary hippocampal neurons presenting a high neurite network with no nuclei staining, as published in the study by Macarrón-Palacios et al. (2025). We set all filters to “triangle”, “cell split using?” to “body” and increased the maximum cell and nucleus area to 10,000. We also reduced “cell size increase” to 1 for fine-tuning. To compensate for the lack of a nuclei channel, we duplicated the channel with the best cell labeling to be used as a nuclei channel analog to detect cells. Segmentation and some results are available in Extended Data Figure 5-2.
Result
Manual, RBP, and machine learning analysis comparison
The same image has been analyzed using the WEKA-based machine learning (Fig. 5A), RBP (Fig. 5B), and a manual analysis using NeuronJ (Fig. 5C), to compare these three methods. For machine learning and the RBP processing, each color corresponds to a cell, and black cells are not analyzed. Nucleus are in red but sometime are not visible due to color incompatibilities. In the machine learning example, even if cells are globally accounted, and detached from the background, splitting between cells is inaccurate, creating straight lines between cells. Too many nuclei are accounted, creating an overabundance of cells. In addition, nuclei size and positions are incorrect, which can bear an influence on calculated neurite length. Different cells outlines are often merged together. For RBP, overall, all cells of interest are accounted. Elongated neurite ends up split halfway, as highlighted by the red arrows in Figure 5B. Apart from this specific situation, cells seem properly segmented, even when touching. Lonely cells are perfectly segmented. The manual measurement highlights the quality of neurite tracing in every cell, even in overlapping cells. However, the monochrome image, with no color or nucleus marking, increases the difficulty of neurite placement. All cell not touching edges are accounted.
Three different analysis of the same image. A, B are done using our macro, and C using NeuronJ. A, The result of a machine learning processing using WEKA and B of a RBP. D, The base image for reference, with red being a beta tubulin (cell cytoskeleton) marking and blue a DAPI (nuclei) marking. More detail on cell and nucleus fitting is available in Extended Data Figures 5-1 and 5-3.
Figure 5-1
Result of segmentation of nuclei and cells, on the cell image, using the different techniques analysed in the article. RBP stand for rule base programming. Machine learning is WEKA-based and is trained in similar images, and is trained to detect nuclei and cells on the same image. Manual is done using ImageJ, segmentation being done by an operator. All images are 663 × 663 µm in size. Download Figure 5-1, TIF file.
Figure 5-2
Analysis of primary hippocampal neurons data set from Macarrón-Palacios et al. (2025). A, B: example of segmentation of cells. Purple is cell segmentation, yellow is body segmentation, and blue is neurite tracing. Nuclei segmentation is not displayed since there was no nuclei channel. Images were acquired using a confocal with 20×, 0.4 numerical aperture oil immersion lens. Download Figure 5-2, TIF file.
Figure 5-3
Segmentation comparison of RBP and machine learning techniques in regard to manual segmentation, for nuclei and cell detection. Manual measurement is shown in purple line while machine learning and RBP with black full shapes. Download Figure 5-3, TIF file.
Selected measured parameters needed to compare the three different methods are contained in Table 4. Neurite length was slightly higher in the RBP analysis, yet not statistically meaningful, with an average increase of 6.4% compared with manual measurement. The machine learning filtering produced higher neurite length values, with an average increase of 21.5% of the manual measurement. In terms of the number of cells analyzed, machine learning filtering accounted for 255 out of the 223 cells present in the image, or an increase of 14.3% of real value, due to nuclei fragmentation. RBP and manual measurement accounted for 233 and 210, or a variation of 4.5 and −5.8% of the cells. RBP in macro was the fastest, roughly taking 40% less time than the machine learning-based method, and being more than six times faster than manual measurements, if only considering neurite length measurement, and 27 times faster for the whole analysis.
Result of different analysis on the same image
Both automated analysis provided more analysis data in addition to the average neurite lengths. We consider the RBP technique to be exact on nuclei area; it was the technique that wielded the best fitting result (Extended Data Fig. 5-1). We selected some parameters of interest: cell area, body area, nucleus area, circularity, and number of segments per cell. Body area could not be obtained by machine learning, as there is no distinction between the body and the cell: detection would require additional filtering and a different classifier. Overall, cell and nuclei area were underestimated in machine learning when compared with both RBP and manual measurement. This is especially true for the nuclei area, which is reduced by 54.4% of the exact value. Manual measurement was lower than the RBP measurement. Mean cell area stays close to manual measurements for both RBP and machine learning, with respective difference in values of −3 and 0.4%. Circularity is similar in all conditions. The number of segments in RBP is higher than in the machine learning approach.
Figure 6 provides the results obtained by the three different methods for several parameters: the neurite length analysis, nuclei area, and cell area. All techniques produce somewhat similar results, except from the nuclei area with machine learning. However, machine learning results in neurite length are statistically different from the manual measurement and RBP, while RBP is not. All values are statistically different when it comes to nuclei area.
Result of the analysis using three different methods, the machine learning, the rule-based programming, and manual analysis, using NeuronJ and basic ImageJ tools, on the image presented in Figure 5 and three other images of the same condition. Normality was rejected. The statistical significance has been obtained with paired-sample Wilcoxon signed rank test. A, Neurite length (in µm), measured from nucleus. B, Nuclei area. C, Cell area. *p < 0.05. Additional analysis on the nuclei segmentation overlap comparison for machine learning and RBP with regard to manual measurement is available in Extended Data Figure 6-1.
Figure 6-1
Nuclei measurement technique overlap analysis. A: Intersection of manual and machine learning segmentation (black), with union of both techniques (red). B: Intersection of manual and RBP segmentation (black), with union of both techniques (red). C: boxplot of the similarity of two segmentation methods, defined as the ratio for each nuclei of the pixel intensity of their intersection on their union. A value closer to one indicate a perfect similarity between both segmentation. Download Figure 6-1, TIF file.
Furthermore, we created two images for both machine learning and RBP. These two images represent the union and intersection of the nuclei segmented using manual and automated measurements. By measuring the overlap ratio of these two images for each cell, we can determine an intersection-over-union ratio representative of how similar the two measurements are. Values that approximate 1 indicate that the measurements are comparable. The average similarity ratio for machine learning segmentation was 0.25, while the average similarity ratio for RBP segmentation was 0.74. Example images and results are available in Extended Data Figure 6-1.
Batch analysis
We experimentally tested the macro on N2A cells exposed to starving and different percentage of serum in medium. Neurite length was measured on every single cell we imaged. Experiment is composed of 12 wells, grouping 6 conditions, with 12 FOV per well, for a total of 144 FOV. In Figure 7, we added a representative image for each condition. From the image, we observe higher average cell area and neurite length than in the 0% conditions.
Merged DAPI (blue, for nuclei detection) and beta tubulin (red, for cell cytoskeleton detection) channels, one representative image per condition is shown here of N2a cells grown on 0 and 10% FBS conditions for 5 d at different initial cell/well concentration (125, 250; 500 cells/well). Scale bar, 100 µm.
We then applied the macro to an entire experiment. We sorted the images using CABaNe and analyzed all the data at once. Results are summarized in Figure 8. Number of cells, Figure 8A, increases with initial cell density, but surprisingly only with the highest starting value. Neurite length, calculated with the longest shortest path coming from the body of each cell, Figure 8B, is overall higher in the 0% conditions values than their 10% counterparts. Relative body area/cell area ratio is used as a secondary mean to assess the quantity of prolongations, in single cell. The lower is the ratio, the more the cell have elements outside of the body, such as neurites. Following this analysis, with data in Figure 8C, all 0% conditions have lower values and a wider interval (toward low values) for ratio. Some points are higher than 1, caused by artifacts in the analysis. This data supports the results of neurite length from nuclei. Cell area, Figure 8D, decreases in relation with the overall number of cells. Nuclei area is superior in the 10% condition with regard to their 0% counterpart (Fig. 8E). While body area is statistically higher in the 10% conditions for the 100 and 500 cell/well conditions, the difference is minimal.
Data extracted from dataset using CABaNe. A, Average number of cells per well, per condition. B, Single cell box plot of nuclei area per condition. C, Single cell body area D, Single cell whole area. E, Single cell body area/cell area ratio per condition. F, Single cell neurite length from nuclei, per condition. G, Single cell neurite length from body, per condition. N = 3 experiments, realized on different days. *p < 0.05.
Discussion
In this paper we have developed a novel open-source macro based on RBP to analyze cellular morphological parameters, including neurites length. Our macro named CABaNe can be used on a wide range of images, when used in accordance to the limitation and eventually adapting the parameters. This technique is based on RBP which is based on traditional filtering, cell segmentation, and particle analysis proved to have quantitative advantages with respect to the reference manual measurement of neurite length and to the machine learning techniques.
When compared with other technique, our RBP macro measured similar values with respect to the manual measurement, while the cellular morphological characteristics measured by machine learning were statistically different. The differences between these methodologies could be attributed to the difficulty of automated techniques to properly segment overlapping cells, especially in 2D. We have restricted our exploration to WEKA segmentation, which relies on the Random Tree Forest Approach. We wanted to test an easy-to-use procedure that could be fully integrated into an ImageJ macro. We lacked the infrastructure and knowledge to make much more advanced machine or deep learning models that could have improved the analysis. Obviously, use of external python-based tools could reveal successful for the segmentation step. Its training and integration would however require additional efforts that are not worth, knowing that traditional methods allowed us to reach a decent result with regard to the manual approach. Difference in appreciation of nucleus in ambiguous cases, such as when a cell nucleus is dividing, can further change neurite length, cell counting, and other parameters, since each nucleus represent a cell to analyze. Indeed, while an operator could take the decision that a cell with two distinct nuclei, but not yet split, is either a single or two cells for analysis, automated means will always consider, in CABaNe, that there are two cells to analyze. Machine learning also had the disadvantage of being more computationally heavy, and to require retraining when either the background or the cells changed, or to possess a really large training dataset accounting for this variability. The training process was also highly manipulator dependent. Manual neurite length measurement was tricky as the nucleus channel cannot be included in the images in the NeuronJ plugin, making measurement from nucleus, as well as cell identification, harder and less precise. In addition, CABaNe provided more parameters of interest, not all being used here, but than can be of interest for other studies, and which can increase the analytical data obtained from one experiment. The rising energy usage of deep learning is to be considered: RBP, when applicable, could be a more energy- and material-efficient way to run analysis, especially for the lab that do not possess the capacity to utilize advanced models.
One parameter not taken into account is the bias of manual measurement, which causes physical and mental strain when analyzing large datasets, or the variability operator to operator. Already on four images, nuclei area was statistically different in manual measurement when compared with RBP, and analysis of verification files confirmed a better quality of the RBP segmentation. This error is likely to be found in the other manual analysis as well. We are confident that the precision of the CABaNe, on top of representing a significant time and data gain, would be advantageous compared with the one manual measurement in high-throughput experiments. In this paper we do not aim to reduce the impact of machine learning tools but here, the Weka script we used, based on random tree forest, while being accessible, was not advanced enough given our technical knowledge. In the future, CABaNe could be used to train more advanced machine and deep learning macros, classifying the large amount of data required.
The Python script, while basic, further optimizes the analysis, summarizing the results.
From the proof-of-concept that we provided in this article, the discrimination between conditions was successful and the amount of data allows to demonstrate the advantages and the limits of CABaNe. Indeed, while we obtained a good analysis and statistically different results, we observed some limitations when cells became too dense in images, but the results still seemed coherent with observed morphology.
Conclusion
In conclusion, we have succeeded in providing an open, free, fully automated, batch-designed ImageJ macro for neurite length analysis of differentiating cells. As far as we know, it is the first tool of this type widely available. The user-friendly interface and automated sorting make it possible for anyone, even without knowledge of ImageJ or neuronal studies, to use it efficiently and without interoperator variability. Although designed for neurite analysis, the number of parameters extracted by this tool, as presented in Table 3, is also an alternative for other types of analysis as it is not limited to neurite length and can be used as a FAIR alternative to paid software. Notably, we intend on testing the marker intensity analysis in nuclei, still in a single cell manner.
Furthermore, it can be used as a base for anyone who wants to create a similar algorithm, adapt it to their needs, or just learn it, as it is fully annotated, especially in the case of protrusions in other cancer cells types. We encourage sharing with the community in these cases.
Footnotes
The authors declare no competing financial interests.
We thank M. João Carlos Lopes (PhD student who passed away in August 2023) for his contribution to the development of this macro. We thank AGASSE Fabienne (Saudou team, GIN, U1216) and EGLES Christophe (BIOMAT team, PBS, UMR 6270) for their suggestion regarding the macro functionalities. This work was supported by Ligue contre le cancer Isére. N.T. is a recipient of Pfizer Innovation fellowship. E.M. is part of GDR 2000 BIOMIM and GDR B2i. E.M. and A.S. acknowledge GRAL, financed within the University Grenoble Alpes graduate school (Ecoles Universitaires de Recherche) CBH-EUR-GS (ANR-17-EURE-0003). This work was co-funded by the ANR (GlyCON, grant number ANR-19-CE13-0031-01 PRCI, by the “Investissements d’avenir” program Glyco@Alps, grant number ANR-15-IDEX-02), and Région Auvergne Rhône-Alpes projet Ambition Intenationale. We thank Elisa d’Este and Victor Macarron Palacios, from the Max Planck Institute for Medical Research for providing us fluorescence images of primary hippocampal neurons to challenge our macro with different type of neuronal images. This work was funded by ANR-19-CE13-0031 Glycon, IDEX-UGA-IRGA 2021-BioPlat, to E.M. and Ligue Contre le Cancer (Isere, Savoie), grant RP22.
This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International license, which permits unrestricted use, distribution and reproduction in any medium provided that the original work is properly attributed.















