Touching Soma Segmentation Based on the Rayburst Sampling Algorithm
Neuronal soma segmentation is essential for morphology quantification analysis. Rapid advances in light microscope imaging techniques have generated such massive amounts of data that time-consuming manual methods cannot meet requirements for high throughput. However, touching soma segmentation is still a challenge for automatic segmentation methods. In this paper, we propose a soma segmentation method that combines the Rayburst sampling algorithm and ellipsoid fitting. The improved Rayburst sampling algorithm is used to detect the soma surface; the ellipsoid fitting method then refines jagged sampled soma surface to generate smooth ellipsoidal shapes for efficient analysis. In experiments, we validated the proposed method by applying it to datasets from the fluorescence micro-optical sectioning tomography (fMOST) system. The results indicate that the proposed method is comparable to the manual segmented gold standard with accurate soma segmentation at a relatively high speed. The proposed method can be extended to large-scale image stacks in the future.
KeywordsImage analysis Soma segmentation Rayburst sampling algorithm Distance transform
Neuronal morphology quantification analysis plays an important role in neuroscience, such as neuron classification, dynamic analysis, electrophysiology simulation, and even understanding the relationship between functions and structures in the brain (Chen et al. 2012; Svoboda 2011; Yan et al. 2013; Ascoli et al. 2001; Sholl 1953). Neuronal soma morphology characteristics such as the soma location and size are important indices for neuron morphology quantification (Meijering 2010).
In recent decades, rapid advances in optical imaging technology have generated large amounts of data for neuron morphology research (Peng et al. 2015; Peng and Long 2010; Peng et al. 2010). This has made manual analysis methods too time-consuming to achieve a high throughput despite being the best way to get accurate results (Saraswat and Arya 2014). Consequently, much effort has been focused on developing automatic soma reconstruction methods. Many efficient algorithms have been proposed, such as the watershed transform (Lin et al. 2003), graph cut-based method (Alkofahi et al. 2010), and clustering-based method (Liu et al. 2008). However, many grayscale-based algorithms were designed for two-dimensional image data, and quite a few of them can be directly extended to three dimensions because of the intensity anisotropy in light microscopy imaging data (He et al. 2014). Low-quality images and clustered somata are further challenges (Saraswat and Arya 2014). Therefore, an efficient segmentation method would require a combination of multiple methods.
Cell segmentation methods developed in recent years have combined many algorithms (Meijering 2012). For example, methods that use different detection algorithms for isolate and touching cells have exhibited very good performance (Xu et al. 2014). Guo et al. (2014) proposed a method that uses a Bayesian network and the watershed algorithm to separately treat isolated and touching cells. Alkofahi et al. (2010) proposed a semiautomatic method that combines the initial segmentation algorithm for seed point detection and the graph-cut algorithm for boundary segmentation. He et al. (2014) proposed a method using the concave point clustering method for detecting touching somata and using the random walk method for cell segmentation. However, efficient segmentation of both isolated and touching somata could still be a problem for large light microscopy imaging datasets.
The Rayburst sampling algorithm is a rapid method for convex structure detection (Wearne et al. 2005; Rodriguez et al. 2006). In our previous work, the Rayburst sampling algorithm was used for neurite tracing and proved to be highly accurate (Ming et al. 2013). However, this version of the Rayburst algorithm is not suitable for neuron soma segmentation. Yan et al. (2013) proposed an improved Rayburst sampling algorithm for soma segmentation of a Golgi stained dataset that demonstrated high performance for hollow somata. However, this method cannot process closely touching somata well. The main problem is that the rays always stop at the wrong position by the intensity threshold (Quan et al. 2014).
In this paper, we propose a method for neuronal soma segmentation from light microscope images. The proposed method combines an improved Rayburst sampling algorithm and ellipsoid fitting method. This improved Rayburst sampling algorithm can detect the surface of touching somata from soma centroids detected by the distance transform based method, and the ellipsoid fitting method is used to generate smooth segmentation results based on sampling results from the Rayburst sampling algorithm. This method was validated by using datasets from the green fluorescence micro-optical sectioning tomography (fMOST) system (Gong et al. 2013) and volume-object annotation (VANO system (Peng et al. 2009).
The resolution of the original image stack from the fMOST dataset was anisotropic (0.5 μm × 0.5 μm × 2.0 μm). We converted the resolution to isotropic (0.5 μm × 0.5 μm × 0.5 μm) by bilinear interpolation of slices of the fMOST dataset. The resolution of the VANO dataset was isotropic (0.24 μm × 0.24 μm × 0.24 μm) and thus did not need to be converted.
In this study, the image foreground regions contained somata, and the background contained unrelated structures. In the fMOST data, the somata and several neurites generally had a relatively high intensity. We used a multi-scale LoG filter to enhance the soma regions.
The sigma value σ is set based on the soma radius, and LoG filters with different σ may enhance structures with different sizes. Subtracting the filtered image from the original image can weaken the image background.
This makes the image foreground clearer than before, and an adaptive thresholding method (Otsu 1979) can be used to extract the image foreground. Finally, holes in somata are filled, and small regions (less than 200 voxels) are deleted to refine the foreground.
Soma Surface Detection
The improved Rayburst sampling algorithm is based on DT instead of image intensity. The somata in the image stack from the fMOST dataset were solid with similar intensities, so the boundaries between touching somata were always unclear.
For convenient analysis, we utilized the idea of a basin and simulated rainfall in a watershed transform. As shown in Fig. 3, foreground voxels can be classified into four types based on different locations in the foreground. We assumed that simulated rainfall flows along the opposite direction of the distance gradient and that the rain can eventually reach the regional maxima of the image.
The four types of voxels in the foreground are as follows. (1) Type 1 is regional maxima, which include soma centroids and are regarded as the starting points for sampling rays; see regions C and D in Fig. 3. (2) Type 2 is voxels around the soma centroid that do not stretch to other touching somata to form the distinct region of one soma; see region B in Fig. 3. (3) Type 3 is voxels of region A between the boundary region B and background. This region stretches from one soma to the other of a touching soma pair. This region is closer to the background than type 2. It contains the touching parts of two somata as well as uncertainty; see region A in Fig. 3. (4) Type 4 is background voxels; see region E in Fig. 3.
The soma centroids detected during the soma localization step are regarded as type 1 voxels, and the sampling ray starts from these voxels. As shown in Fig. 4, the difference between the touching and isolated somata is type 3 voxels. Touching somata contain uncertain regions with type 3 voxels. The best stopping positions for rays can be set at regional minima in type 3 voxels for touching somata and type 2 voxels for isolated somata.
For this reason, we defined two kinds of boundaries for sampling rays to detect the soma surface. The inner boundary is between the type 2 and 3 regions for one soma; see the inside arrows in Fig. 4(a). The outer boundary is between a type 3 region and background; see the outside arrows in Fig. 4(a). As shown in Figs. 4(a)–(c), the outer boundary reflects the final contour for isolated and touching somata. The outer and inner boundaries especially coincide with each other for an isolated soma. As noted earlier, the outer boundary can be set to the regional minimum at the touching part or background for touching somata.
Overall, rays run along the direction of the sampling core until the distance value increases or becomes zero. The stopping conditions for sampling rays can be set as follows: (1) the rays reach the background voxels while the distance value is zero, and (2) rays reach the regional minima in the touching region while the distance value increases.
Finally, the actual sampled boundary consists of discrete voxels around the soma surface. As described in the next section, we use an ellipsoid fitting method to generate the segmentation result and a volume threshold to filter the results.
Soma Shape Fitting
Most somata in the fMOST data are shaped like ellipsoids, so we propose an ellipsoid fitting method to generate soma segmentation results based on the sampling results from the method described in the previous section.
The B2AC method for the direct least squares fitting of ellipses was proposed by Fitzgibbon and is widely used for two-dimensional image data. Li and Griffiths (2004) discussed the constraint conditions for ellipsoids and extended the method to three dimensions. We applied a numerically stable method for least squares ellipsoid fitting based on the ellipsoid fitting method (Li and Griffiths 2004) and enhanced direct ellipsoid fitting method (Maini 2006) to point data sampled with the Rayburst sampling algorithm.
The parameter a can be solved by sampling data with the ellipsoid fitting method.
The matrix C provides a constraint for ellipsoid fitting and was set to 4J − I2 = 1 in this study, based on Li and Griffiths’ work. According to the equation given by Li and Griffiths, the matrix C can be calculated as.
The parameters of the ellipsoid equation are calculated through this procedure. Then, the soma segmentation results are generated with the ellipsoid equation. Finally, a volume threshold is set according to the actual soma size to filter the correct soma regions.
Parameter selection in experiments
Sigma of LoG filters
A multi-scale LoG filter can enhance the soma blob at different sizes. A larger sigma consumes more time, so proper sigma selection is important.
fMOST data: 4200 (voxel)
VANO data: 115 (voxel)
Eliminates the small regions of the binary image. The value is set based on the soma size.
Eliminates the distance map jitter of height h. The value selection depends on the real soma radius.
Controls the sampling and speed precision of the Rayburst sampling algorithm.
fMOST data: 14 (voxel)
VANO data: 6 (voxel)
Rc is the mean soma radius used to estimate the soma localization.
Evaluation of Soma Localization
The recall and precision were used to evaluate the soma localization results. The ground truth for the evaluation was determined manually. We did not consider all broken somata for both the ground truth and results. A soma was accepted if the Euclidean distance between the automatically located soma centroid and manually labeled soma centroid was less than Rc, which is the mean soma size described by the radius of somata in images. About 30 somata were extracted randomly from the image stacks. The maximum length of their axes were used to calculate Rc, which was set to 7 μm for the fMOST datasets and 1.5 μm for the VANO dataset.
Results of soma localization
Soma segmentation runtime
175 × 175 × 62.5
225 × 225 × 75
225 × 225 × 75
Image stacks 1 and 2 contained more touching somata than image stack 3 (7 complete touching somata in image 1, 12 complete touching somata in image 2, 2 complete touching somata in image 3). The proposed method clearly performed better than original Rayburst Sampling Algorithm. The original Rayburst sampling algorithm could not process touching somata well and missed touching soma pairs. The original Rayburst sampling tended to generate bigger soma segmentation results than the proposed method.
For the proposed method, the main error was from flat or elongated somata. Elongated somata can result in more than one position and be segmented as more than one soma. The centroid of flat soma with a small distance value can be missed in the jitter elimination step, these types of somata can cause the regional maximum region (see C in Fig. 3) to be missed when they are touching other large somata.
Evaluation of Soma Segmentation
A small image stack (145 μm × 145 μm × 62.5 μm) containing 30 somata was extracted from image stack 1 for evaluation, and 23 somata with clear and complete boundaries in this image stack were reconstructed manually.
The original Rayburst sampling algorithm (Rodriguez et al. 2006) and improved Rayburst sampling algorithm for soma segmentation were also compared. To generate the segmentation results, the original Rayburst sampling algorithm was combined with the ellipsoid fitting method. The soma centroids for the original Rayburst sampling algorithm were labeled manually. The intensity threshold was set to 146 based on the manual trials.
The touching somata are labeled by arrows in Fig. 8(a). The results for touching somata are shown in Figs. 8(b)–(e). The proposed method performed better for touching somata. The results indicated that a touching soma pair with little overlap could be accurately determined.
In Fig. 7, the soma with an ID of 17 and 23 was segmented with a low overlap ratio. This is the left soma in Fig. 8(c) and the complete soma in Fig. 8(d). These two somata had a large touching region. In general, each soma matched a larger segmentation result than itself. The main conclusion could be that the touching region caused sampling rays to go through the best stopping position, which influenced the modeling results. This problem was obvious in the results with 66 sampling rays.
The proposed method provided preferable results in terms of the soma size. The ratios of most segmentation results were in the range of 100% ± 20%, which included touching somata (Fig. 9). The generated ellipsoid models described the soma size relatively accurately.
Above all, the worst segmentation results were when two somata had a large touching region. For example, for the two somata in Fig. 8(c), one soma had low overlap ratio (ID 23 in Fig. 7). This may be because the touching region caused more sampling rays to go through the best stopping position and generated a larger result than itself. Moreover, one soma can be missed if touching somata are so close that there is only one regional maximum region in these somata; these touching somata could look like a single soma.
Fig. 10 visualizes the sampling and segmentation results for our method. For the touching somata, most of the sampling points from one soma centroid were clustered around the matching soma surface, and several false sampling rays terminated in the other soma, as shown in Fig. 10(b). For isolated sampling points, some were slightly far from the best position. Modeling the surface by using the ellipsoid fitting results reduced the influence of false sampling points, as shown in Fig. 10(c). The model contours excluded the bad sampling points approximated by the manually and roughly labeled soma contours, as shown in Fig. 10(b).
Our algorithm mainly comprises the Rayburst sampling algorithm and ellipsoid fitting. These two parts contain simple algorithms that were performed with high efficiency, as indicated in Table 2. However, the preprocessing step occupied more than 50% of the total runtime because the multi-LoG filters for the 3D image dataset are too slow. Parallelizing the technique could be a solution to improving the speed of the preprocessing and Rayburst sampling algorithm (Yan et al. 2013).
The DT-based locating method found most of the somata in images in practice, but it generated many false locations in thick neurites or noise blob structures. Thus, we refined the initial result by using H-dome transform and soma size information. H-dome transform can delete redundant local maximum value points in one soma. The results showed that most somata in an image stack could be located. H-dome transform can delete many false locations in a short time, and the soma volume threshold can be set according to the minimum soma size to filter the correct somata. During the segmentation flow, candidate soma centroids that overlap in the generated segmentation would be deleted for efficiency.
On the other hand, the stopping condition for ray casting provided a better performance with the proposed method than with the original Rayburst sampling algorithm. The stopping condition for the original Rayburst sampling is based on voxel intensity, which could not give the best stopping position for the casting ray. For the variant of the original Rayburst sampling algorithm using the image gradient to rectify the sampling results, the results showed that somata close to each other could not be processed well (Yan et al. 2013).
Consequently, the proposed method could make most of the rays stop around the correct location. However, there were still some incorrect rays in the touching somata. One reason for this is that the EDT for the irregular structure may have generated soma regional minima inside. Somata with a large touching region could be another reason in that they make many rays go through the best location. One solution could be using DT with intensity information (Xiao and Peng 2013).
To avoid a rough surface, the ellipsoid model was chosen to fit the soma shape (Jung and Kim 2010) instead of a triangle mesh. The results showed a relatively high overlap ratio between the model and gold standard. Therefore, this ellipsoid model can describe the soma morphology relatively accurately.
As discussed in the previous section, most of the errors arose from irregularly shaped somata. Another main reason is the limitations of the ellipsoid because it is unable to describe some kinds of irregular shapes, even though the surface sampling was sufficiently accurate. Increasing the sampling rays could make the generated ellipsoid model approximate the soma shape.
In the fMOST data, many somata were shaped like ellipsoids or spheres, so the ellipsoid fitting method could be efficient. For different datasets, our method could produce better results after the preprocessing step is changed. In terms of soma morphology, our model can approximate most somata with a relatively high overlap ratio, as shown in Fig. 7. Under less packed conditions, this model could be used to obtain rough segment results.
This paper proposes an automatic soma segmentation method suitable for datasets with touching soma distributions. The proposed method contains three main parts: (1) soma detection based on DT and local maximum searching and refining; (2) an improved Rayburst sampling algorithm for isolated and touching soma surface detection; and (3) ellipsoid fitting to generate the segmentation results.
The results of experiments on fMOST and VANO datasets showed that the proposed method can perform with relatively high accuracy on datasets contain touching somata. In terms of soma quantification, the soma size is an important factor (Uylings and Van 2009). An evaluation of the soma sizes showed that the volume and surface area of the segmentation results had relatively high accuracy, which indicates that our method can be used for efficient soma quantification analysis.
The parameterized model generated with our method exhibited a relative high overlap ratio in the experiments. The results from this model can be used as a rough geometric model for qualitatively analysis of soma morphology or provide a basis for neuronal electrophysiology reconstruction and simulation with large-scale neural datasets.
Information Sharing Statement
The source code is available at github: https://github.com/keepersecond/Soma-Segmentation.
This work was supported by the National Natural Science Foundation of China (Grant No.91432116). We thank Hui Gong for providing fMOST data in this work.
- Chen, S. Y., Zhao, M. Z., Wu, G., Yao, C. Y., & Zhang, J. W. (2012). Recent Advances in Morphological Cell Image Analysis. Computational and Mathematical Methods in Medicine, 2012(24), 143–156.Google Scholar
- Halir, R. (1999). Numerically stable direct least squares fitting of ellipses. Sixth International Conference in Central Europe on Computer Graphics and Visualization, 125–132.Google Scholar
- He, Y., Meng, Y. L., Gong, H., Chen, S. B., Zhang, B., Ding, W. X., et al. (2014). An Automated Three-Dimensional Detection and Segmentation Method for Touching Cells by Integrating Concave Points Clustering and Random Walker Algorithm. PLoS One, 9(8), e104437.CrossRefPubMedPubMedCentralGoogle Scholar
- Li, Q. D., & Griffiths, J. G. (2004). Least squares ellipsoid specific fitting. Geometric Modeling and Processing, 2004, 335–340.Google Scholar
- Quan, T. W., Li, J., Zhou, H., Li, S. W., Zheng, T., & Yang, Z. Q., et al. (2014). Digital reconstruction of the cell body in dense neural circuits using a spherical-coordinated variational model. Scientific Reports, 4.Google Scholar
- Yan, C., Li, A. A., Zhang, B., Ding, W. X., Luo, Q. M., & Gong, H. (2013). Automated and Accurate Detection of Soma Location and Surface Morphology in Large-Scale 3D Neuron Images. PLoS One, 8(4), 393–406.Google Scholar
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.