Summary

Automatic Identification of Dendritic Branches and their Orientation

Published: September 17, 2021
doi:

Summary

Presented is a computational tool that allows simple and direct automatic measurement of orientations of neuronal dendritic branches from 2D fluorescence images.

Abstract

The structure of neuronal dendritic trees plays a key role in the integration of synaptic inputs in neurons. Therefore, characterization of the morphology of dendrites is essential for a better understanding of neuronal function. However, the complexity of dendritic trees, both when isolated and especially when located within neuronal networks, has not been completely understood. We developed a new computational tool, SOA (Segmentation and Orientation Analysis), which allows automatic measurement of the orientation of dendritic branches from fluorescence images of 2D neuronal cultures. SOA, written in Python, uses segmentation to distinguish dendritic branches from the image background and accumulates a database on the spatial direction of each branch. The database is then used to calculate morphological parameters such as the directional distribution of dendritic branches in a network and the prevalence of parallel dendritic branch growth. The data obtained can be used to detect structural changes in dendrites in response to neuronal activity and to biological and pharmacological stimuli.

Introduction

Dendritic morphogenesis is a central subject in neuroscience, as the structure of the dendritic tree affects the computational properties of synaptic integration in neurons1,2,3. Moreover, morphological abnormalities and modifications in dendritic branches are implicated in degenerative and neuro-developmental disorders4,5,6. In neuronal cultures where dendritic ramification can be more readily visualized, the interactions between non-sister dendritic branches regulate the sites and extent of synaptic clustering along the branches, a behavior that may affect synaptic coactivity and plasticity7,8,9. Therefore, characterization of the morphological parameters of the dendritic tree using two-dimensional (2D) neuronal cultures is advantageous for understanding dendritic morphogenesis and functionality of single and networks of neurons. Yet, this is a challenging task because dendritic branches form a complex mesh even in "simplified" 2D neuronal cultures.

Several tools have been developed to automatically trace and analyze dendritic structures10,11,12,13. However, most of these tools are designed for 3D neuronal networks and are naturally too complex to use with 2D networks. In contrast, less advanced morphological analysis tools typically involve a significant component of computer-assisted manual labor, which is very time-consuming and susceptible to operator bias14. Existing semi-automatic tools, such as 'ImageJ'15 (an NIH open-source image processing package with a vast collection of community-developed biological image analysis tools), largely reduce user manual labor. However, some manual interventions are still needed during image processing, and the quality of the segmentation can be less than desirable.

This paper presents the SOA, a simple automated tool that allows direct segmentation and orientation analysis of dendritic branches within 2D neuronal networks. The SOA can detect various line-like objects in 2D images and characterize their morphological properties. Here, we used the SOA for segmenting dendritic branches in 2D fluorescence images of dendritic networks in culture. The software identifies the dendritic branches and successfully performs measurements of morphological parameters such as parallelism and spatial distribution. The SOA can be easily adapted for the analysis of cellular processes of other cell types and for studying non-biological networks.

Protocol

NOTE: The Israeli Ministry of Health approved the use of mice under protocol IL-218-01-21 for the ethical use of experimental animals. SOA is only compatible with Windows 10 and Python 3.9. It is available as an open-source code: https://github.com/inbar2748/DendriteProject. At this link, there is also a README.DM file that has directions for downloading the software, a link to the software's website, and a requirements file containing information on the required versions of all the packages. Additional examples of analysis performed using the software have been provided there as well. 

Figure 1
Figure 1: SOA workflow for segmentation and growth direction analysis. Shown are the processing steps of fluorescent images of dendritic networks and data analysis. The 2D image is uploaded, segmented (in two steps: dendritic branches are detected as lines, and then the relevant lines are merged), and the spatial information of each dendritic branch is obtained. The data are collected for all the dendritic branches in the image. Finally, the data are analyzed to give the desired morphological parameters. Abbreviation: SOA = segmentation and orientation analysis. Please click here to view a larger version of this figure.

1. Open the SOA application.

  1. Open the URL address: https://mega.nz/folder/bKZhmY4I#4WAaec4biiGt4_1lJlL4WA, find the SOA.zip zipped folder, and download the ZIP file by double-clicking.
  2. Unzip the folder by right-clicking on SOA.zip and choose Extract Files. Observe the Extraction Path and Options window that opens and the Destination Address text box that displays the path for the extracted files. To extract to a different location, click on one of the folders in the window's right panel to make it the destination folder. Click OK to extract the files to that folder.
  3. Open the extracted SOA file and double-click on SOA.exe. Wait for a black window to open, after which the application will appear.

Figure 2
Figure 2: Example of a workflow using the SOA's GUI. Left column: GUI sections of the workflow. Middle column: image of a dendritic network, processed during the workflow (Scale bar: 20 µm). Right column: magnification of the area marked by a red rectangle in the images of the middle column (Scale bar: 4 µm). Step 1: Selection and uploading of an image. Step 2: The first stage of segmentation is the detection of lines that represent the identified dendritic branches. Step 3: The second stage of segmentation is the proximity-based merger of segment lining in individual dendritic branches. The settings of all steps can be modified. Abbreviations: SOA = segmentation and orientation analysis; GUI = graphical user interface. Please click here to view a larger version of this figure.

2. Open an image to analyze.

  1. In the SOA Viewer Upload menu bar | select Choose File | choose an image from the computer files | click on it (.png .jpg .tif .bmp files only) | Open | observe the path of the file | Next.

3. Segmentation optimization

NOTE: In the SOA Viewer Properties menu bar, change the values of the selected parameters to adjust the segmentation process settings. A detailed description of the parameters, such as the Threshold, is given in the Supplemental Material.

  1. In Edges, adjust the threshold for the display by selecting the Threshold and entering a number.
    NOTE: The lower the number for the threshold, the more lines are detected. Threshold is a number that ranges from 0 to 255. The default value has been set to 0.
  2. In Merge Lines:
    1. Adjust the minimum distance to merge for the display by selecting the Min distance to merge and entering a number.
      NOTE: The Min distance to merge ranges from 0 to 30 pixels. The default value is set to 20.
    2. Adjust the minimum angle to merge for the display by selecting the Min angle to merge and entering a number.
      NOTE: The Min angle to merge ranges from 0 to 30°. The default value is set to 10.
  3. Click on Create Preview Segmentation Image.
    NOTE: A preview image of the segmentation results will be displayed according to the updated values. In addition, the number of lines before merging and the number of lines after merging will be displayed.
  4. Change the parameters to achieve maximum identification of segments. If there is a need to change the Properties, click on the Close window button and follow steps 3.1-3.4.

4. Create the output files.

  1. Press OK to visualize the segmentation images and the analyzing graphs. Observe the window that appears for selecting a location where the .xlsx file will be saved.
  2. insert a file name | Choose Save | wait for the .xlsx file with data to be created and saved.
    ​NOTE: In addition to the .xlsx file, the following files will be automatically displayed: a file that presents the original image, the line recognition image, the final image of the segmentation, and three analysis graphs.

5. Navigation toolbar

NOTE: A navigation toolbar is included in all figure windows and can be used to navigate through the data set. Each of the buttons at the bottom of the toolbar is described below.

  1. To navigate back and forth between previously defined views, use the Forward and Zurück buttons.
    NOTE: The Home, Forward, and Zurück buttons are similar to the Home, Forward, and Zurück controls on a web browser. Home returns to the default screen, the original image.
  2. Use the Zoom button to pan and zoom. To activate panning and zooming, press the Zoom button, then move the mouse to a desired location in the image.
    1. To pan the figure, press and hold the left mouse button while dragging it to a new position. Release the mouse button, and the selected point in the image will appear in the new position. While panning, hold down the x or y keys to restrict the motion to the x or y axes, respectively.
    2. To zoom, hold down the right mouse button and drag it to a new location. Move right to zoom in on the x-axis and move left to zoom out on the x-axis. Do the same for the y-axis and up/down motions. When zooming, note that the point under the mouse remains stationary, allowing to zoom in or out around that point. Use the modifier keys x, y, or CONTROL to limit the zoom to the x, y, or aspect ratio preserve, respectively.
  3. To activate the Zoom-to-rectangle mode, click the Zoom-to-rectangle button. Place the cursor over the image and press the left mouse button. Drag the mouse to a new location while holding the button to define a rectangular region.
    NOTE: The axes view limits will be zoomed to the defined region when the left mouse button is pressed. The axes view limits will be zoomed out when the right mouse button is pressed, placing the original axes in the defined region.
  4. Use the Subplot-configuration tool to configure the appearance of the subplot.
    NOTE: The left, right, top, and bottom sides of the subplot, as well as the space between rows and columns, can be stretched or compressed.
  5. To open a file save dialog, click the Save button and save the file in the following formats: .png, .ps, .eps, .svg, or .pdf.

Representative Results

A representative analysis was performed on images of dendritic networks in culture. Cells were extracted as described by Baranes et al.16,17. Briefly, hippocampal cells were extracted from the brains of postnatal rats and cultivated on 2D glass coverslips for 1-2 weeks. The cultures were then fixed and stained through indirect immunofluorescence using an antibody against the dendritic protein marker, microtubule-associated protein 2 (MAP2). Images of dendritic networks were collected using a fluorescence microscope, and 10 images were processed using SOA.

Figure 1 shows a typical SOA workflow for the analysis of a dendritic network. The input is a 2D fluorescent microscope image. Image segmentation is performed in two stages: the first stage is the identification of dendritic branches as lines, and the second stage is merging of relevant lines according to distance and direction criteria determined by the user. After segmentation, spatial information is collected for each identified dendritic branch. Then, the following information is extracted from the data of all dendritic branches in the image: Parallel/Non-Parallel Classification, average length of parallel vs. non-parallel dendritic branches, distance between parallel dendritic branches, and angular distribution.

Figure 2 illustrates the workflow laid out in Figure 1 applied to a representative 2D image of a dendritic network labeled with a fluorescent anti-MAP2 antibody. A Graphical User Interface (GUI) was developed in which the user can select and upload an image out of a set of files (Step 1). Then, the user can modify the Edges settings (Step 2) and Merge Lines settings (Step 3). Following that, lines representing the identified dendritic branches are detected (Step 2) and then merged, based on the proximity of the segmented lines and their directional differences (Step 3). The GUI enables the comparison of the original image to the segmented image (Step 3) and provides real-time monitoring of the effect of any changes to the segmentation settings. The spatial information collected is then analyzed, and the results are presented as graphs or tables (Figure 3, Figure 4, Figure 5, and Figure 6)

Figure 3 demonstrates how dendritic branches are classified as growing parallel (Figure 3A) and non-parallel (Figure 3B). All segments classified as "non-parallel" are not parallel to any other segment. Because dendritic branches do not actually extend in straight lines, there was a need to provide some degree of freedom for the definition of parallel growth. To achieve that, the orientation of a particular branch was measured, and then a range of angles around the measured orientation was permitted for parallelism. This range is fixed for each image and depends on the number of lines detected; however, it cannot exceed 10° (a detailed description of the parallelism sorting process is given in Supplemental Material/Analysis, section 1). Then, the fitness of the orientation of all other branches to this angle range was examined. Once the analysis was completed, the number of parallel branches within the tested range was extracted and plotted in a frequency graph (Figure 3C).

To understand whether the extent of parallel growth among the dendritic branches is random or directed, the results of the graph in Figure 3C were compared to those extracted from simulation of random growth of lines of the same number as those of the dendritic branches in the cultures (Figure 3D). SOA then measures the distances among the parallel branches (Figure 4) as well as the lengths of parallel and non-parallel dendritic branches. Figure 5 displays bar graphs of the lengths of the non-parallel dendritic branches (Figure 5A) and parallel dendritic branches (Figure 5B) and their average lengths. To determine whether preferential growth directions exist, SOA displays a distribution histogram of the growth angles of the dendritic branches (Figure 6). Such a presentation allows for rapid identification of preferred growth directions and identification of specific dendritic branches in each group (by ID number) (Figure 6A).

Figure 3
Figure 3: Classification of dendritic branch parallel growth vs. random simulation. Dendritic branches of the image in Figure 2B identified by SOA were classified as (A) parallel and (B) non-parallel. (C) The number of parallel dendritic branches in each angle range checked was collected and divided into groups of pairs/triples/quartets as explained in Supplemental Material/Analysis, section 1. The occurrence frequency of each group is shown in the graph. (D) The results of grouping parallel lines extracted from a random line distribution simulation. Abbreviation: SOA = segmentation and orientation analysis. Please click here to view a larger version of this figure.

Figure 4
Figure 4: SOA measurement of the distance among parallel dendritic branches. Shown is an example of how SOA displays the distance among branches grown in parallel. Each dendrite detected receives a unique number (ID number). The SOA measures the minimum distance between each pair of parallel dendrites. A detailed description can be found in Supplemental Material/Analysis, section 1. Examples: 1. Dendritic branch ID=2 is at a distance of 60 µm from another branch. 2. Dendrite ID=17 has two parallel branches at distances of 60 µm and 13.7 µm. Abbreviation: SOA = segmentation and orientation analysis. Please click here to view a larger version of this figure.

Figure 5
Figure 5: SOA's display of the length distribution of parallel vs. non-parallel dendritic branches. Shown is a frequency plot distribution of SOA's comparison of the lengths of (A) non-parallel and (B) parallel dendritic branches, as well as the average lengths. Abbreviation: SOA = segmentation and orientation analysis. Please click here to view a larger version of this figure.

Figure 6
Figure 6: SOA's display of the angular distribution of dendritic branches. (A) A graphical representation of each identified line according to its growth angle. (B) A display of A that allows quick recognition of preferred growth directions. Combining A and B, each dendritic branch can be allocated to a specific growth direction category. This form of representation of the distribution of dendritic growth directions allows rapid identification of preferred growth directions (B: the higher the column, this growth direction is more preferred) and directions in which dendrites do not grow (B: at an angle where there is no column, dendrites do not grow in the same direction). Abbreviation: SOA = segmentation and orientation analysis. Please click here to view a larger version of this figure.

Supplemental Material. Please click here to download this File.

Discussion

Effective strategies for extracting morphological information from 2D images are urgently required to keep up with biological imaging data. Although imaging data can be generated in hours, in-depth analysis of the images takes a long time. As a result, image processing has clearly become a major obstacle in many fields. This is due in part to the high complexity of the data, especially when dealing with biological samples. Furthermore, as many users lack specialized programming and image processing skills, automated tools that allow image processing to be done in an easy and user-friendly manner are needed. That is why SOA is expected to be useful. The representative results demonstrate the automated segmentation that enables identification of the dendritic branches in the image in a few simple steps, despite the complexity of the dendritic network. The work process is simple and intuitive, and diverse spatial information is obtained immediately and without effort. Several algorithms were employed to detect individual dendritic branches in the fluorescence images and conduct multiple analyses on the results. A detailed description of the algorithms can be found in the Supplemental Material and information on the system requirements. This paper will briefly present the algorithms and their role in the software.

Segmentation
Segmentation was the most challenging part of this project. In segmentation, a digital image is converted into several segments (image objects). The aim of segmentation is to identify objects in the image and thus make them more understandable and available. Here, segmentation was utilized to identify dendritic branches and isolate them from the background. The image segmentation process was split into two stages: the first stage involved the detection of dendritic branches as lines, and the second stage involved merging related lines based on distance and direction criteria set by the user.

Dendritic information and analysis
Information on the location, angle, and length of each line detected was collected. The software performs the following analyses on the data obtained from all the lines identified in the image: 1. Dendritic Branch Classification (Parallel/Non-Parallel) 2. The average length of parallel vs. non-parallel dendritic branches was measured. 3. Angular distribution measurement and display 4. Distance measurement between parallel dendritic branches

The SOA's user interface allows users to upload an image from the computer's files. It also allows for adjustments of segmentation settings. Because each dendritic network image is unique, we suggest "tinkering" with the settings to achieve the best possible segmentation. The user interface allows for comparison of the original and the segmented images and immediate monitoring of the effect of any change in the settings on the segmentation.

After modifying all settings, SOA creates the final figure of the segmentation that shows each of the identified dendritic branches. The SOA generates graphs of the analyses performed and a .xlsx file with all the data.

The output of the SOA can be utilized as a starting point for the input of tools for further analysis. For example, we are now developing software that calculates the average parallelism value for dendrites that have received various treatments using SOA output on a large number of images.

Summary
SOA is an automated tool for identification, segmentation, and extraction of important morphological information from images of complex 2D line networks and has a user-friendly and intuitive interface. In this work, the use of SOA was introduced through an example of analysis of dendritic networks. SOA can be used for the analysis of other types of 2D cellular networks, such as networks of different neural and non-neural cells, intracellular complex structures such as those generated by the cytoskeleton and non-biological networks, e.g., nanotubes and more. SOA was developed for a very specific purpose, and it is important to know its advantages and limitations. SOA's limitations include the fact that it is only suitable for 2D image analysis and not for 3D image analysis. SOA can only be used to analyze images with objects that are line-like. Moreover, the information obtained from the software is limited to the spatial information of the identified dendrites and to the specific analyses described here. Additional analyses are not performed by the SOA. The software's key advantages are its simplicity and user-friendliness. The software allows complex images to be analyzed quickly and in a few easy steps. Moreover, SOA is flexible and readily adjustable; hence, its analytic capacity can be expanded beyond morphometry and be beneficial for other applications.

Offenlegungen

The authors have nothing to disclose.

Acknowledgements

The authors would like to thank Dr. Orly Weiss for the preparation of the culture images.

Materials

Matplotlib  2002 – 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 – 2021 The Matplotlib development team. 3.4.2 a Python 2D plotting library
matplotlib-scalebar Philippe Pinard 0.7.2 artist for matplotlib to display a scale bar
NumPy The NumPy community. 1.20.3 fundamental package for scientific computing library
OpenCV OpenCV team 4.5.2.54 Open Source Computer Vision Library
PyCharm JetBrains 2020.3.1 (Community Edition) version Build #PC-203.6682.86, built on December 18, 2020. Runtime version: 11.0.9.1+11-b1145.37 amd64. VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0. Memory: 978M, Cores: 4
PyQt5 Riverbank Computing 5.15.4 manage the GUI
python Python Software Foundation License 3.9 version
Qt Designer The QT Company Ltd. 5.11.1 version
scipy Community library project 1.6.3 Python-based ecosystem of open-source software for mathematics, science, and engineering
Seaborn Michael Waskom. 0.11.1 Python's Statistical Data Visualization Library.
Windows 10 Microsoft
Xlsxwriter John McNamara 1.4.3 Python module for creating Excel XLSX files

Referenzen

  1. Ferrante, M., Migliore, M., Ascoli, G. Functional impact of dendritic branch-point morphology. Journal of Neuroscience. 33 (5), 2156-2165 (2013).
  2. Spruston, N. Pyramidal neurons: dendritic structure and synaptic integration. Nature Reviews Neuroscience. 9 (3), 206-221 (2008).
  3. Chklovskii, D. Synaptic Connectivity and Neuronal Morphology: Two Sides of the Same Coin. Neuron. 43 (5), 609-617 (2004).
  4. Chapleau, C., Larimore, J., Theibert, A., Pozzo-Miller, L. Modulation of dendritic spine development and plasticity by BDNF and vesicular trafficking: fundamental roles in neurodevelopmental disorders associated with mental retardation and autism. Journal of Neurodevelopmental Disorders. 1 (3), 185-196 (2009).
  5. Irwin, S. Dendritic Spine Structural Anomalies in Fragile-X Mental Retardation Syndrome. Cerebral Cortex. 10 (10), 1038-1044 (2000).
  6. Kaufmann, W. Dendritic anomalies in disorders associated with mental retardation. Cerebral Cortex. 10 (10), 981-991 (2000).
  7. Pinchas, M., Baranes, D. Dendritic branch intersections are structurally regulated targets for efficient axonal wiring and synaptic clustering. PLoS ONE. 8 (12), 82083 (2013).
  8. Cove, J., Blinder, P., Baranes, D. Contacts among non-sister dendritic branches at bifurcations shape neighboring dendritic branches and pattern their synaptic inputs. Brain Research. 1251, 30-41 (2009).
  9. Blinder, P., Cove, J., Foox, M., Baranes, D. Convergence among non-sister dendritic branches: An activity-controlled mean to strengthen network connectivity. PLoS ONE. 3 (11), 3782 (2008).
  10. Glaser, J., Glaser, E. Neuron imaging with neurolucida – PC-based system for image combining microscopy. Computerized Medical Imaging and Graphics. 14 (5), 307-317 (1990).
  11. Scorcioni, R., Polavaram, S., Ascoli, G. L-Measure: a web-accessible tool for the analysis, comparison and search of digital reconstructions of neuronal morphologies. Nature Protocols. 3 (5), 866-876 (2008).
  12. Torben-Nielsen, B. An efficient and extendable python library to analyze neuronal morphologies. Neuroinformatics. 12 (4), 619-622 (2014).
  13. Parekh, R., Ascoli, G. Neuronal morphology goes digital: A research hub for cellular and system neuroscience. Neuron. 78 (1), 206 (2013).
  14. heng, J., Zhou, X., Sabatini, B. L., Wong, S. T. C. NeuronIQ: A novel computational approach for automatic dendrite SPINES detection and analysis. 2007 IEEE/NIH Life Science Systems and Applications Workshop. , 168-171 (2007).
  15. Image processing and analysis in Java. NIH. ImageJ Available from: https://imagej.nih.gov/ij (2021)
  16. Peretz, H., Talpalar, A. E., Vago, R., Baranes, D. Superior survival and durability of neurons and astrocytes on 3-dimensional aragonite biomatrices. Tissue Engineering. 13, 461-472 (2007).
  17. Morad, T. I., Hendler, R. M., Weiss, O. E., Canji, E. A., Merfeld, I., Dubinsky, Z., Minnes, R., Francis, Y. I., Baranes, D. Gliosis of astrocytes cultivated on coral skeleton is regulated by the matrix surface topography. Biomedical Materials. 14 (4), 045005 (2019).

Play Video

Diesen Artikel zitieren
Dahari, I., Baranes, D., Minnes, R. Automatic Identification of Dendritic Branches and their Orientation. J. Vis. Exp. (175), e62679, doi:10.3791/62679 (2021).

View Video