2D cell contour extraction from 3D samples with MGX and SurfCut
Here, we report a new method (SurfCut) to extract cell contours or specific thin layers of a signal at a distance from the surface of samples in 3D confocal stacks. The goal is notably to obtain the cell contours of the epidermal layer in a tissue, by extracting the signal from the epidermal anticlinal walls only. We compare these new methods with the 3D image analysis software MorphoGraphX (MGX) [25].
In MGX, a 3D triangle mesh is created from a confocal stack, corresponding to the edges of the sample’s signal, and notably the surface of the sample (see the “Methods” section and Fig. 1a–d). This mesh can then be used to crop the raw confocal signal at a chosen distance from the sample’s surface to extract a thin layer of signal (Fig. 1e).
We developed an ImageJ macro with the aim to obtain a rather equivalent signal layer output, in a simpler, but less versatile, setup. In this case, instead of creating a mesh, the binarized “filled” signal of the sample is used as a mask to crop the raw confocal signal at a chosen Z-depth relative to the surface (and thus not exactly perpendicular to the surface as for MGX; see the “Methods” section and Figs. 2 and 3).
As a proof of concept for our cell contour extraction methods, we acquired 3D confocal Z-stacks from three different non-fully flat samples: cotyledon pavement cells (relatively flat, Fig. 4a), light-grown hypocotyls (curved along one axis, Fig. 4b), and shoot apical meristem (highly curved and complex, Fig. 4c). Performing a classical maximal intensity Z projection on these stacks generates 2D images in which cell contours are almost impossible to identify or segment because multiple cell layers and periclinal walls overlap (Fig. 4d–f). Furthermore, in these samples, as in almost any 3D confocal stack of such non-fully flat samples, taking a single slice through the stack does not allow to obtain the cell contours of a single cell layer for the whole image (Fig. 4g–i).
We next applied our signal layer extraction methods on these samples. Both methods seem to yield good quality, and rather similar, 2D images of cell contours from the epidermal layer (Fig. 4j–o). This is in principle very close to reality for the relatively flat samples such as cotyledon pavement cells. Indeed, due to the geometry of this type of sample, both procedures should produce roughly the same output. In contrast, a closer look in the case of the hypocotyl and the shoot apical meristem reveals visual differences. For instance, the output in Fig. 4k (SurfCut) is wider than that in Fig. 4n (MGX), and this is directly due to the difference in signal extraction method (see Fig. 3). In principle, the method using MGX is more accurate, especially on very curved samples, and the MGX environment allows many more analyses. However, if cell contour extraction is the sole priority and the sample geometry is not too complex (see limitations of the 2D SurfCut method in Fig. 6), the current version of MGX still has the drawback to require a specific graphics card and to be rather complex to automatize for batch analyses. SurfCut is less accurate because it does not crop the signal perpendicular to its surface but simply in the Z direction. Therefore, as exemplified above, the associated error can become important for samples with high curvature. In contrast to MGX, the SurfCut-based workflow has the advantage to be much simpler to use and outputs rather similar results as MGX in many cases, the main limitation being the curvature of the sample (see Figs. 3 and 6). In addition, it is much easier for a biologist with little or no knowledge of programming to automatize in order to run in batch on multiple samples without manual processing (see Additional file 2). Last, SurfCut can be run with Fiji, a widely-used image processing software that does not require a specific graphics card.
Quantitative comparison of MGX and SurfCut cell contour extraction with cotyledon pavement cell shape analysis
Because we found that the two methods output qualitatively rather similar results in the flat regions of our samples, we decided to compare the methods in a more quantitative way. We decided to first focus on cotyledon pavement cells because the output differences were hardly noticeable by eye, contrary to the hypocotyl and the shoot apical meristem. In order to test this, we used a set of eight 3D confocal stacks of cotyledon pavement cells that we processed with both methods to obtain 8 2D images of cell contours as described above. We then used the ImageJ plugin “PaCeQuant” [19] to obtain the corresponding cell shape descriptors. As mentioned earlier, this plugin carries out very efficient cell segmentation from 2D images and can compute 27 different shape features based on global, contour-based, skeleton-based, and PC-specific features such as area, perimeter, length, or width.
First, we compared the number of segmented cells after cell contour extraction using both methods, as well as with manual counting. From the 8 images, we manually counted 352 cells, while PaCeQuant segmentation following the MGX-based method allowed us to detect a total of 332 cells (Fig. 5a, c, e), and PaCeQuant segmentation following the SurfCut macro allowed us to detect a total of 318 cells (Fig. 5b, d, e). Compared to the manual count, this represents 94% of detected cells for MGX and 90% for SurfCut. Thus, both methods output rather similar results. However, both methods did not seem to allow 100% of cell detection. After closer examination, we could identify that most of the difference with the manual counting results from the filtering out of small cell (< 2500 pixels of the area) in the PaCeQuant segmentation algorithm, which is meant to exclude the guard cells from the analysis. This represents about 8–9% of the cells manually counted in the images. We could furthermore observe few cases of over-segmentation as well as segmentations of “incomplete cells” in the case of the MGX output. Incomplete cells are cells located at the border of the image and for which part of the cell surface is missing. These cells are in principle filtered out of the analysis by PaCeQuant to avoid bias. The MGX extraction method tends to create an artificial border (of different pixel intensity) for this type of cells because of a black margin artificially created around the image. This black margin originates from the signal extraction method: the surface being relatively convex, the signal extracted perpendicular to the surface is therefore slightly smaller in width (see Fig. 3 and Fig. 4k, n). This relative over-segmentation surprisingly makes the 2D MGX method less accurate for these cells.
Next, we tested whether these differences in segmented cell number would affect the distribution of pavement cell descriptors. Among the features that can be quantified using the PaCeQuant plugin, circularity indicates how similar a cell shape is to a circle (the maximum value of 1 corresponds to a perfect circle). In our sample set, we found that the circularity of the cell contours extracted with the MGX method was 0.3868 ± 0.1233 and for those extracted with the SurfCut script was 0.3856 ± 0.1247 (Fig. 5e), revealing no statistical differences between the two tested populations (Wilcoxon rank-sum test p value = 0.88). To push the analysis further, we also compared each of the 27 descriptors available with PaCeQuant (Fig. 5f). Despite more noticeable differences for some parameters, this comparison could not reveal any statistical differences between the two cell contour extraction methods (Fig. 5f). Altogether, our analysis suggests that in the case of the cotyledon pavement cells, despite relatively minor qualitative differences, both cell contour extraction methods are valid. Furthermore, it reveals that SurfCut is well suited for high-throughput pre-processing of 3D confocal stacks for pavement cells shape quantifications.
Quantitative comparison of 2.5D MGX and 2D SurfCut in samples with complex 3D geometry
Although SurfCut in combination with PaCeQuant allows for a simple and high-throughput cell shape analysis, one of the main limitations of our method is that it does not take into account the curvature of the tissue or the cells. In order to quantify this limitation, and better inform the users on the potential bias, we decided to compare a 2.5D analysis of the hypocotyl sample in MGX with the 2D analysis in SurfCut, focusing on cell size quantification. To do so, we first quantified cell size in 2D using the SurfCut output and PaCeQuant segmentation and cell area quantification, and in 2.5D using MGX. Both outputs are represented as heatmaps of the cell area (Fig. 6a, b). In all cases, and as expected, 2.5D MGX cell area quantification provided higher values than 2D SurfCut/PaCeQuant. To better visualize the difference in cell size quantification between the two methods, we also generated a heatmap of the percentage of difference (Fig. 6c). Cells which have a higher difference in cell area quantification are in warm colors while cells with low difference are in colder colors (Fig. 6c). The heatmap highlights a bias of cell size quantification for the cells which are on the side of the hypocotyl. To further quantify this bias, we also measured the average angle of the top walls in the different cell files relative to the top view of the stack. This measurement is taken in the transverse axis of the hypocotyl (Fig. 6e) from one top cell wall junction to the other and is averaged per cell file (thus, there is only one angle value per cell file). We then plotted the difference in cell size quantification relative to the average cell surface angle (Fig. 6d). We found a trend of increasing difference in cell size quantification with increasing cell angle, but the correlation appears noisy. For instance, for cell files 5 and 6 which both have a low average angle (Fig. 6d–g, i, j), the difference in cell size varies from 10 to 30% and 25 to 35%, respectively (Fig. 6d). This is due to the additional effect of single-cell curvature (Fig. 6e–l). Indeed, the cells in the hypocotyl can be very “bumpy,” and this varies between cell files (Fig. 6e–h). In 2.5D MGX, the cell surface quantification takes fully into account this curvature, which in some cases further increases the difference in cell size quantification. In Fig. 6e–l, we further highlight cell file 5 (Fig. 6e, f, i, l) in which there is very little to no significant bias, cell file 6 (Fig. 6e, g, j, l) in which only cell curvature significantly biases the measurement, and cell file 8 (Fig. 6e, h, k, l) in which both tissue and cell curvature bias the measurements. Such cell-level bias could also exist for the pavement cell analysis, but the global curvature of the cells as well as the variation of curvature between different cells is much lower than in the hypocotyl, and depending on the needs of the experiment, this bias can be considered negligible. On the other hand, in the example of the shoot apical meristem, the single-cell curvature is very low while the global tissue curvature is high, leaving mostly the tissue curvature bias for cell size quantification.
Overall, our pipeline combining SurfCut and PaCeQuant is appropriate for the quantification of cell shape and size in samples with a low tissue and cell curvature, such as the cotyledon epidermis, but not for more complex samples such as the hypocotyl and the shoot apical meristem.