# Segmentation of 3D images of plant tissues at multiple scales using the level set method

Annamaria Kiss, Typhaine Moreau, Vincent Mirabet, Cerasela Iliana

Calugaru, Arezki Boudaoud, Pradeep Das

► To cite this version:

Annamaria Kiss, Typhaine Moreau, Vincent Mirabet, Cerasela Iliana Calugaru, Arezki Boudaoud, et al. Segmentation of 3D images of plant tissues at multiple scales using the level set method. Plant Methods, 2017, 13 (1), 10.1186/s13007-017-0264-5. http://hal-02620094

HAL Id: hal-02620094

https://hal.inrae.fr/hal-02620094

Submitted on 25 May 2020

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
SOFTWARE

Open Access

<figure><img src="image_2.png" /></figure>

CrossMark

# Segmentation of 3D images of plant tissues at multiple scales using the level set method

Annamária Kiss¹*, Typhaine Moreau¹, Vincent Mirabet¹, Cerasela Iliana Calugaru², Arezki Boudaoud¹ and Pradeep Das¹

**Abstract**

**Background:** Developmental biology has made great strides in recent years towards the quantification of cellular properties during development. This requires tissues to be imaged and segmented to generate computerised versions that can be easily analysed. In this context, one of the principal technical challenges remains the faithful detection of cellular contours, principally due to variations in image intensity throughout the tissue. Watershed segmentation methods are especially vulnerable to these variations, generating multiple errors due notably to the incorrect detection of the outer surface of the tissue.

**Results:** We use the level set method (LSM) to improve the accuracy of the watershed segmentation in different ways. First, we detect the outer surface of the tissue, reducing the impact of low and variable contrast at the surface during imaging. Second, we demonstrate a new edge function for a level set, based on second order derivatives of the image, to segment individual cells. Finally, we also show that the LSM can be used to segment nuclei within the tissue.

**Conclusion:** The watershed segmentation of the outer cell layer is demonstrably improved when coupled with the LSM-based surface detection step. The tool can also be used to improve watershed segmentation at cell-scale, as well as to segment nuclei within a tissue. The improved segmentation increases the quality of analysis, and the surface detected by our algorithm may be used to calculate local curvature or adapted for other uses, such as mathematical simulations.

**Keywords:** Confocal image, 3D, Segmentation, Level set method, Watershed, L1, Cell, Cellwall, Nucleus

**Background**

Delineating the various processes underlying morphogenesis has been a key focus of developmental biology for many years. The quantitative assessment of shape changes in growing tissues and their correlation to genetic activities requires the accurate identification of its geometry at different scales, via both high-quality images from optical microscopy and the conversion of that information to a digitised format, a process known as segmentation.

In recent years, more and more image segmentation methods have been developed or improved upon (see [1] and references therein), open-source image analysis tools have become widely used in the biology community (see e.g., [2–4] and references therein). While the majority of these tools address the analysis of 2D images of biological tissues, in recent years 3D image analysis tools have also improved considerably both for plant [5–7] and animal species [8]. However, the accuracy of these tools is reliant upon the correct detection of tissue and/or cell contours.

Tissue surface detection is particularly challenging in regions presenting creases or folds, such as at the boundaries between developing organs. One such example in plants is in developing flowers (Fig. 1a–f), where the

<footnote>*Correspondence: annamaria.kiss@ens-lyon.fr
¹ Laboratoire Reproduction et Développement des Plantes, Univ Lyon, UCB Lyon 1, ENS de Lyon, CNRS, INRA, 46, allée d'Italie, 69342 Lyon, France
Full list of author information is available at the end of the article</footnote>
<figure><img src="image_3.png" /><figcaption>**Fig. 1** Description of the experimental context. **a** A side view of the aerial parts of an *Arabidopsis thaliana* plant. The boxed region indicates the position of the Inflorescence Meristem (IM) at the apical tip of the plant. **b** A top view of the IM, with mature flowers as well as young floral meristems visible. **c** A scanning electron micrograph of the IM with most flowers dissected away. Remaining flower buds are false-colored in violet. **d** A brightfield image of the same structure with a stage 3 flower bud indicated (arrow). **e** The dissected stem is stabilized on growth medium in a box suited to the water-dipping objective on the confocal microscope. **f** A 2D surface projection of the 3D image stack acquired on the confocal. **g** Individual slices from various positions along the Z axis indicate the 3D nature of the image stack. Z positions are provided. Scale bars indicate 25 µm</figcaption></figure>

region between the undifferentiated central dome and
the growing sepal can form a deep fold (Fig. 1c, f as well
as asterisk in Fig. 2a). Such regions present a serious chal-
lenge for the surface detection methods currently used
in the community, where the use of a simple threshold in
pixel intensity can only provide an approximate surface
[7]. The identification of cell contours in images where
the plasma membrane or cell-wall is marked (Fig. 1f, g)
is frequently based on the watershed method [5, 6]. How-
ever, at least in the case of plant tissues, watershed seg-
mentation methods routinely encounter difficulties with
outer (periclinal) cell surfaces, which are more poorly
marked than anticlinal surfaces (Fig. 3a). This is possibly

because these outer cell surfaces contain only one mem-
brane, whereas all inner surfaces contain two, making
them easier to stain and image. Additionally time-course
images are generally of sub-optimal quality since expo-
sure times and laser intensities have to be minimised to
avoid phototoxicity and related artefacts.

The watershed method identifies cell contours by
seeking crests of high intensity that separate two low-
intensity regions within an image. To overcome the
issues discussed above, we complement the watershed
step by using the level set method, which identifies out-
lines by seeking high-gradient regions that separate a
single low-intensity region (such as background) from
<figure><img src="image_4.png" /><figcaption>**Fig. 2** LSM for tissue contour. **a–c** Section of a developing flower at the boundary between the peripheral zone and the forming sepal. **a** Tissue contour detected with the “Edge Detect” process of the MorphoGraphX software. The contour doesn't enter in deep creases (asterisk) and presents crests (instead of valleys) above the anticlinal walls (arrows). **b** Tissue contour detected with the level set method. The green contour is an initialisation, while the red contour is the result of the level set contour detection (α = 1, β = 0). **c** The effect of the accelerating term weighted by the parameter α is to “push” the contour into profound valleys on the surface: green contour α = 0, red contour α = 1 and all other parameters are the same and default values. **d, e** The effect of the smoothing term weighted by the parameter β: d β = 0 and e β = 1 and all other parameters are the same and default values. **f, g** Accurate surface detection allows accurate signal projection on the surface. Here is an example of membrane signal (f) and microtubule signal (g) projected using MorphoGraphX on a surface detected with the level set method based on the membrane signal. **h–j** The surface detected with the level set method allows to do accurate curvature maps, which can be segmented in order to determine organ boundaries. Here we present the curvature map and its segmentation done with MorphoGraphX: **h** Average curvature map (on a neighbourhood of 10 µm). **i** Manual seeding of the curvature map. **j** Watershed segmentation of the map</figcaption></figure>

a higher-intensity region (such as the tissue of interest). Such gradient-based approaches have also been used for cell segmentation and tracking in zebra-fish embryogenesis [8–13]. Certain level set based methods have also been implemented in common image processing packages. For instance, the image analysis platform ImageJ

[2, 14] has level set plugins, but for the moment only for 2D images, while the use of the level set implementations of the ITK library [15] require some experience in both image processing and programming.

Here we present a simple level set implementation for the segmentation of plant tissues at both organ- and
<figure><img src="image_5.png" /><figcaption>**Fig. 3** Cellular segmentation of a modified image with reinforced tissue contour. **a** Section of original 3D image to segment, where the outer periclinal walls are poorly marked. **b** The result of watershed segmentation (using MARS pipeline): the outer cell layer is trimmed and there may be even some missing cells. **c** Using the outer contour detected by the level set method, the outer periclinal walls are enhanced on the image, and the outer background is put to the most frequent value of the inner tissue. **d** The result of the watershed segmentation of the modified image. **e** Gaussian curvature and **f** cell volume is computed and represented first on data obtained by watershed segmentation of the original image, and second on data obtained with the improved MARS pipeline where the outer periclinal walls were enhanced using the contour level set before doing watershed</figcaption></figure>

cell-scale. We present the principles of the level set method as well as its parameters in “Methods” section. Then we demonstrate how this framework can be used to improve segmentation results in multiple contexts in “Results and discussion” section: detection of the tissue contour, segmentation of the outer cell layer, cellular segmentation within whole tissues, and segmentation of nuclei in whole tissues.

# Methods

## Plant growth and imaging

*Arabidopsis* plants were grown as previously described [16]. Briefly, an approximately 2 cm-long piece of the upper part of the stem was cut and placed in growth medium (Fig. 1a–e). The stem was then submerged in

water and all flower buds older than stage 3 were dissected away. Immediately prior to imaging, inflorescences were treated with the water-soluble lipophilic dye FM 4-64 (Invitrogen), which labels cell membranes (Fig. 1f). The treated inflorescences were then observed on either a Zeiss LSM 700 or a Leica SP8 confocal microscope with 40× water immersion objectives. After the first image stack was acquired (Fig. 1g), the meristems were twice rotated and imaged again [5].

## Level set method

We first describe the general principles of our implementation of the level set method (LSM), which we then apply to images in several different contexts in the next section in order to detect the external contours of tissues
or the contours of cells within 3D images. Mathematical definitions and implementation details are provided in the Additional file 1.

The approach is based on an evolving smooth contour, which is first suitably initialized (green contour in Fig. 2b) and then this contour evolves by seeking out and adhering to the outline of the sample (red contour in Fig. 2b).

This method is commonly used in image analysis to detect the outlines (contours or surfaces) of objects in a given image [17–20], as well as to easily trace their shapes regardless of changes in their topology [20, 21]. The contour is represented by the zero level of a higher dimensional function, called the level set function (LSF) and denoted by $\phi$. The “movement” of the contour is determined by the evolution of the LSF, so as to minimize a pre-defined energy functional, typically a linear combination of three energy terms and of a regularising term,

$$E_{\varepsilon} = \lambda \mathcal{L}_g + \beta \mathcal{L}_1 + \alpha \mathcal{A}_g + \mathcal{R}_p. \quad (1)$$

Given an initial LSF $\phi(x, 0) = \phi_0(x)$, this energy functional (1) can be minimized by solving the gradient flow

$$\frac{\partial \phi}{\partial t} = -\frac{\delta E_{\varepsilon}}{\delta \phi}. \quad (2)$$

The most important term in this energy functional is the so-called image term $\mathcal{L}_g$, which guides the evolving contour to the desired structure on the image. It is based on a sum along the contour of an edge function $g$, which is generally related to image brightness and which is minimal on the structure we would like to detect.

The edge function $g$, appearing in the image term $\mathcal{L}_g$ is in general chosen to be of the form of a Hill function

$$g(\mathbf{x}) = \frac{1}{1 + |f(\mathbf{x})/\gamma|^2}, \quad (3)$$

with $f$ taking maximal values on the target object and $\gamma$ a parameter. The choice of this indicator function $f$ is one of the key points in adapting a level set method to a specific segmentation problem. We will see in the next section that different choices of this indicator function $f$ [as in Eqs. (4–6)] lead to different results of the segmentation.

A special case of this term is when $g$ is a constant, and since the sum is made along the contour, the shorter the contour, the lower this energy term is. Therefore, an $\mathcal{L}_1$ term in the final energy is considered apart, and can be used as an independent smoothing term for the contour.

The accelerating term $\mathcal{A}_g$ is also used in level set formulations, which is based on a weighted area (volume in 3D) of the domain enclosed by the contour. This term results in an acceleration of the movement of the contour when

it is distant to the object boundaries and a deceleration when the contour approaches the target object.

Finally, we also added a regularising term $\mathcal{R}_p$, solely in order to create numerical stability (see the Additional file 1 for more details).

To summarize, level set method for image segmentation comprises the following steps:

1. Initialization of the LSF within the 3D image. A suitable initialization is a coarse estimation of the contour to detect. It can be provided as threshold (intensity) values that may differ at the top and bottom of the image. But it can also be provided as any other already existing coarser segmentation. The exact initialisation does not affect the final outcome (see Additional file 1: Figure 1E), but only affects computation time.

2. Definition of the indicator function $f$ and its scaling parameter $\gamma$. The indicator function guides the LSF towards the target object within the image. Its scaling parameter $\gamma$ depends in particular on the span of $f$-values within the image, and as such on the quality of the image.

3. Choice of parameters $\alpha$ and $\beta$. The weight parameters $\alpha$ for the accelerating term and $\beta$ for the smoothing term are defined relative to the fixed $\lambda$ weight of the image term. In order for the contour to remain faithful to the image, the parameters $\alpha$ and $\beta$ must be kept low with respect to $\lambda$. The choice of values is left up to the user, and would depend on the specific biological context under investigation. A brief analysis of how these parameter values affect the contour is provided (Additional file 1: Figure 1).

4. Run Equation (2) until convergence. The stop criterion is based on the deceleration of the contour in the vicinity of the solution.

Given the above presented general framework, in what follows we apply these steps to several specific segmentation problems by specifying points 1, 2 and 3 of the LSM. The optimal choice of parameter values depends on the quality of the fluorophores and on the biological sample, while the convergence of the algorithm also depends on the shape of the object being studied [22]. While this may appear complex, it is important to note that in our hands, a fixed set of parameter values gives us stable results in different tissues and even organisms.

Our recommendation for choosing the right parameter values would be to begin by initialising LSM to stay as faithful as possible to the image ($\alpha = 0, \beta = 0$). After inspecting the results, the user might vary the accelerating and smoothing terms depending on the desired outcome.
## Results and discussion

The general LSM approach can be easily adapted to different contexts, such as to address specific problems of segmentation. Here we present LSM-based solutions for four such contexts.

### Level set for tissue contour

An accurate quantitative analysis of tissue growth requires the faithful detection of the outer surface of the tissue under consideration, in addition to cellular or subcellular features of interest. The task becomes challenging when the tissue begins to crease, for instance at a slow-growing boundary between two growing organs (Fig. 2a, b). In order to increase the reliability of surface detection in such areas, we have applied the level set method in the following manner.

We first initialize the level set at the exterior of the tissue using appropriate threshold values so that the contour is set close to, but not in contact with, the surface (green line in Fig. 2b). Images typically lose brightness when descending along the z axis (which corresponds to the axis of acquisition of the image stack). Therefore we implemented a threshold function that varies linearly along the z axis. Using ImageJ or an equivalent software, the user may manually determine the initialization threshold parameter values at the desired distance from the sample at the top and bottom of the image, and may provide these threshold values as input parameters. Notice also that in general, the anticlinal walls are much brighter than periclinal outer walls, producing a brighter zone in the crease between cells. On this initial surface this will produce crests in these zones (see white arrows in Fig. 2a), showing that a surface detection based just on thresholding cannot be faithful to the shape of cells.

Thereafter, a suitable indicator function is defined, that is a specific f in (3) is given. Here we use the most frequently used gradient based indicator function [19, 23], which guides the evolving contour towards the edge of the nearest object,

$$f_1(\mathbf{x}) = |\nabla \hat{I}| \quad (4)$$

where $\hat{I}$ is a smoothed version of the image I. For our typical image (Fig. 3a) this gradient-based indicator function g is represented in Fig. 4a. Once the LSF is initialised on the exterior of the sample (green line on Fig. 2b), it accelerates towards the tissue surface, slows down as it gets close to it, before finally stopping at the tissue surface (red line on Fig. 2b).

The principal parameters of the algorithm are the α and β coefficients that describe the accelerating and smoothing terms, respectively. The same way as in the creases between cells on the surface of the tissue, there is a halo of bright pixels within the folds of tissue that separate

individual organs or regions. If these folds are deep and if the image is bright, the contour might not be able to enter the crease in the absence of an accelerating term (α = 0). The accelerating term typically forces the contour into the crease (Fig. 2c, where we compare α = 0 in green and α = 1 in red and all other parameters are the same and of default values).

The smoothing parameter β is of use when, instead of fidelity to all cellular details (Fig. 2d with β = 0), one wishes to detect global tissue aspects (Fig. 2e with β = 1). This is the case for tissue curvature maps, where accurate surface detection is important without cellular details on the surface [24].

An interesting observation is that mean curvature maps on 3D surfaces have maximal values in creases. Thus the map can be segmented using watershed segmentation on the surface and can be used to automatically identify the boundaries between different organs. In Fig. 2h of an *Arabidopsis* meristem with growing flower primordia we show the mean curvature map computed with the software MorphoGraphX [7] on the surface detected with the level set method. After a manual seeding shown in Fig. 2i, where each desired region was marked with different labels, a watershed segmentation is performed on the surface, and the boundaries between flower primordia and the central zone as well as the boundaries between sepals and the centre of the biggest flower could be detected automatically.

Another situation where using the level set method for an accurate surface detection can be crucial is for detecting and projecting signals from one or more different fluorescent channels at a defined distance from the surface of the sample. For example, cortical microtubule signal within a distance of 1 µm from the cell surface can be projected onto the detected tissue surface [25].

## Segmentation of the outer cell layer

The MARS pipeline [5] represented a large advance in robustly reconstructing and segmenting 3D confocal images of growing tissues at cellular resolution. However, because the outer walls are often less visible than the internal walls (Fig. 3a), the segmentation of the outer cell layer (called L1) is often error-prone (Fig. 3b). In particular, the watershed segmentation algorithm systematically results in incomplete cells at the surface of the sample, and others that are entirely missing. The trimming error is due to the fact that the background intensity is much lower than the mean intensity inside the cells. The missing cells in the first cell-layer are caused by the fact that the external cell membranes are much less marked than anticlinal and inner ones. So the use of global parameters that do not yield excessive segmentation in the inner tissue, does not permit to find seeds as local intensity minimum in these outer cells.
<figure><img src="image_6.png" /></figure>

To overcome these problems, we detect the contour of the tissue using the level set method described above ("Level set for tissue contour" section). Then, we generate a modified image for the segmentation algorithm (Fig. 3c), in which the outer surface is artificially set to white, while the background intensity is chosen as the most frequent value inside the tissue (a coarse but simple way to estimate the mean intensity in the interior of the cells). The segmentation generated using this modified image does not display any trimmed cells on the surface, nor does it contain regions with missing cells (Fig. 3d).

In order to illustrate the improvement of the outer layer segmentation, we present a qualitative comparison of the Gaussian curvature of the surface (Fig. 3e) as well as the cell volumes (Fig. 3f) computed on a segmentation obtained by the watershed segmentation of the original image (left) and of the modified image (right).

## Cellular segmentation with level set

We next considered the question of whether the level set method could be used to improve the segmentation of individual cells within the tissue by smoothening cell contours. To carry out the cellular segmentation of the tissue, we initialize as many LSFs as the number of cells in the tissue and initialise them in the interiors of each cell. This initialisation could be either based on the seeds detected during watershed segmentation process (see for instance [5]) or, if a segmented image is available, on eroded segmented cells.

Depending on the indicator function and parameters one chooses for the evolution of the contour, different types of segmentations can be achieved, even if the parameters $\alpha$ and $\beta$ are kept constant: with $\alpha = 1$ the accelerating term is "inflating" cells and it is pushing the cell-contour to the cell wall, while with $\beta = 0$ the smoothing term is off and allows the contour to deform
and to follow the guidance of the indicator function linked to the image.

The gradient-based indicator function g (Fig. 4a) with $f = f_1$ defined in Eq. (4) presents double valleys for each interior cell-wall (one valley for each side of the wall), keeping the detected cell-contours at a distance from each-other (Fig. 4b). Given this inner cell boundary segmentation as well as the outer background, the usual way of obtaining a segmentation of the entire tissue with no cell-wall thickness is to attribute each remaining voxel to the closest segmented object [8, 13].

Here, in order to obtain a complete cellular segmentation, we use an indicator function that presents only one valley for a cell-wall, so that the outline of neighbouring cells obtained using the level set method can come into contact. To do this we might employ the simplest approach of using the image intensity itself as function $f$, as in [26],

$$f_2(\mathbf{x}) = \hat{I}. \qquad (5)$$

This solution (for the indicator function g see Fig. 4c) gives a cellular segmentation given in Fig. 4d.

However, as in the anisotropic diffusion filter that enhances planar structures in the image [6], we introduced a wall indicator function that relies on second order derivatives of the image. In particular, if $\lambda_1(\mathbf{x}) > \lambda_2(\mathbf{x}) > \lambda_3(\mathbf{x})$ are the eigenvalues of the local Hessian matrix of the smoothed image $\hat{I}$, then we choose for the function $f$ in the indicator function g

$$f_3(\mathbf{x}) = \min(\lambda_3(\mathbf{x}), 0). \qquad (6)$$

This indicator function is new in the context of level set methods, has the advantage that it shows sharp valleys on inner walls as well as on outer walls of the tissue (Fig. 4e), and the resulting segmentation contains cells with smooth contours that occupy more of the image, leaving fewer inter-cellular spaces (Fig. 4f).

## Segmentation of nuclear images

While segmenting tissues at cell resolution can be crucial to quantify growth, it can also be valuable to identify and characterise nuclei, in terms of their shapes and/or in terms of expression levels of a given reporter. To this end, the use of the cellular level set code can also be extended to segmenting nuclei in 3D images. We applied our code on high-resolution 3D reconstructed images obtained by the fusion of multiple confocal images taken at different angles, based on the MARS pipeline [5]. We use two-channel stacks, where a cell membrane marker and a nuclear-localised reporter were simultaneously imaged at different emission wavelengths (Fig. 5a).

To segment the nuclei using the level set method, we first initialise with an eroded cellular segmentation. The gradient-based indicator function can perfectly guide the evolving contour, while the parameters $\alpha = 0$ and $\beta = 0$ switch off the accelerating and smoothing terms and allow the contour to look for the shape of the nuclei within the initial contour (Fig. 5b, c). In our test image, a tissue of 1068 cells, nuclei were successfully detected in 88% of the cells. Where nuclei were not detected, an object of a couple of voxels was maintained in the segmented image, this can filtered out by its size, but keeps track of the existence of this cell in the initialisation.

The simultaneous segmentation of cells and nuclei allows in particular to measure the mean cell volume with its standard deviation (217 ± 100 µm³) as well as the mean nucleus volume with its standard deviation (33 ± 13 µm³). In vegetatively grown wild-type fission yeast Schizosaccharomyces pombe the ratio of nuclear to cell volume ratio was found to be 0.080 ± 0.013, and a correlation coefficient between cell size and nuclear size of 0.68 was measured [27]. Here, in our test example of developing flower tissue, we find the ratio of nuclear to cell volume ratio 0.170 ± 0.067 and a correlation coefficient of 0.58 between cell size and nuclear size. The distribution of cell- and nuclei volume are shown in Fig. 5d, while their correlation is illustrated in Fig. 5e.

## Concluding remarks

In the context of quantitative analysis of plant development, the accurate segmentation of images at both tissue- and cell-level is particularly relevant. Here we present a simple and efficient tool that can be easily used for detecting the contour of tissues, cells or nuclei.

The detection of tissue contours is particularly useful for studying the changing morphologies of biological systems during development. For example, the mean morphological development of leaves, as well as the variability around the mean behaviour was quantified using only their 2D contours at different developmental stages [28]. A key challenge in generalising such an approach to assess developmental trajectories for 3D tissues is the detection of accurate tissue contours, which our tool efficiently achieves.

Segmentation at the cellular level is useful to properly describe tissue structure, and to correlate genetic activity, via reporter expression, to cell specification and the regulation of growth through time. Our tool serves in two ways to increase the accuracy of standard watershed implementations in achieving cell-level segmentations. By ensuring that the outer surface of the tissue is faithfully detected, segmentation of the outermost cell layer is improved. This in turn prevents segmentation of the underlying cell layers from being influenced by errors at the tissue surface.
<figure><img src="image_7.png" /><figcaption>**Fig. 5** Cellular LSM used for the segmentation of nuclei. **a** Two-coloured confocal image of an *Arabidopsis* flower, were cell membrane and nuclei are taken on two distinct channels. **b** Segmentation of nuclei using level set method (erosion for initialization $d = 1$, other parameters $\alpha = 0, \beta = 0, \gamma = 0.8, s = 1, type = 'g'). **c** Zoom on the segmented nuclei. **d** Distribution of the volume of nuclei and cells in the tissue. **e** Nuclear volume versus cell volume, a correlation coefficient of 0.58 was measured</figcaption></figure>

In plants, transcription factors play a key role as master regulators of diverse developmental transitions. These proteins tend to accumulate and be active in the nucleus, and as such, a quantitative analysis of their dynamics could be rendered more relevant by measuring their concentrations in nuclei, and by correlating this to factors such as nuclear size. Nuclear segmentations could also be useful in other contexts, such as in investigating nuclear volume changes at different phases of the cell cycle, or in measuring nuclear deformations in cells under mechanical compression.

## Availability

The contour-detection as well as the cellular level set code is written in C++ and uses the CImg image processing library [29]. The cellular level set tool is parallelized using

OpenMP. They are put together in a package for Linux and Mac OS named *lsm3d*.

The standalone package *lsm3d* is distributed under a permissible licence for non commercial use, namely the Free Software licence CeCILL v2. The source code is accessible together with the associated installation and usage advises on the following webpage https://forge.cbp.ens-lyon.fr/redmine/projects/lsm3d. It was tested on Linux as well as on Mac OS systems.

## Additional file

**Additional file 1.** Supplementary Methods. **Section 1.** Mathematical details of the level set method; **Section 2.** Parameters and initialization; **Figure S1.** Parameter effects and sensitivity to initialization.
**Authors' contributions**

AK and TM wrote the code; CIC helped with parallelisation; AK, PD and VM tested and validated the algorithms; AK, AB and PD wrote the paper. All authors read and approved the final manuscript.

**Author details**

¹ Laboratoire Reproduction et Développement des Plantes, Univ Lyon, UCB Lyon 1, ENS de Lyon, CNRS, INRA, 46, allée d'Italie, 69342 Lyon, France. ² Centre Blaise Pascal, ENS de Lyon, 46, allée d'Italie, 69342 Lyon, France.

**Acknowledgements**

We thank Richard Smith for the inclusion of the standalone level set contour-detection code as an addon into the MorphoGraphX software and we thank Nathan Hervieux for testing this addon [25]. We thank Sam Collaudin for the GFP-marked image of Fig. 3a. The PSMN-CBP facility gave us access to their computational clusters.

**Competing interests**

The authors declare that they have no competing interests.

**Availability of data and materials**

The source code of the package *lsm3d* is accessible together with the associated installation and usage advises in the following repository: https://forge.cbp.ens-lyon.fr/redmine/projects/lsm3d.

**Consent for publication**

Not applicable.

**Ethics approval and consent to participate**

Not applicable.

**Funding information**

This work was funded by the ERC Grant Phymorph #307387 and was supported also by the Human Frontier Science Program Grant RGP0008/2013.

**Publisher's Note**

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Received: 3 July 2017 Accepted: 8 December 2017

Published online: 21 December 2017

**References**

1. Vantaram SR, Saber E. Survey of contemporary trends in color image segmentation. J Electron Imaging. 2012;21:21-2128. https://doi.org/10.1117/1.JEI.21.4.040901.

2. Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B. Fiji: an open-source platform for biological-image analysis. Nat Methods. 2012;9(7):676-82.

3. Burton AL, Williams M, Lynch JP, Brown KM. RootScan: software for high-throughput analysis of root anatomical traits. Plant Soil. 2012;357(1):189-203. https://doi.org/10.1007/s11104-012-1138-2.

4. Chopin J, Laga H, Huang CY, Heuer S, Miklavcic SJ. Rootanalyzer: a cross-section image analysis tool for automated characterization of root cells and tissues. PLoS ONE. 2015;10(9):e0137655.

5. Fernandez R, Das P, Mirabet V, Moscardi E, Traas J, Verdeil J-L, Malandain G, Godin C. Imaging plant growth in 4D: robust tissue reconstruction and lineaging at cell resolution. Nat Methods. 2010;7(7):547-53. https://doi.org/10.1038/nmeth.1472.

6. Schmidt T, Pasternak T, Liu K, Blein T, Aubry-Hivet D, Dovzhenko A, Duerr J, Teale W, Ditengou FA, Burkhardt H, Ronneberger O, Palme K. The iROCS Toolbox-3D analysis of the plant root apical meristem at cellular resolution. Plant J. 2014; https://doi.org/10.1111/tpj.12429.

7. de Reuille PB, Routier-Kierzkowska A-L, Kierzkowski D, Bassel GW, Schüpbach T,auriello G, Bajpai N, Strauss S, Weber A, Kiss A, Burian A, Hofhuis H, Sapala A, Lipowczan M, Heimlicher MB, Robinson S, Bayer EM, Basler K, Koumoutsakos P, Roeder AHK, Aegerter-Wilmsen T, Nakayama

N, Tsiantis M, Hay A, Kwiatkowska D, Xenarios I, Kuhlemeier C, Smith RS. MorphoGraphX: a platform for quantifying morphogenesis in 4D. Elife. 2015;4:e05864. https://doi.org/10.7554/eLife.05864.

8. Faure E, Savy T, Rizzi B, Melani C, Stasova O, Fabreges D, Spir P, Hammons M, Cunderlik R, Recher G, Lombardot B, Duloquin L, Colin I, Kollar J, Desnoulez S, Affaticati P, Maury B, Boyreau A, Nief J-Y, Calvat P, Vernier P, Frain M, Lutfalla G, Kergosien Y, Suret P, Remesikova M, Doursat R, Sarti A, Mikula K, Peyrieras N, Bourbine P. A workflow to process 3D+ time microscopy images of developing organisms and reconstruct their cell lineage. Nat Commun. 2016;7:8674. https://doi.org/10.1038/ncomms9674.

9. Rizzi B, Campana M, Zanella C, Melani C, Cunderlik R, Kriva Z, Bourbine P, Mikula K, Peyrieras N, Sarti A. 3-D zebrafish embryo image filtering by nonlinear partial differential equations. In: Conference of the proceedings of IEEE engineering in medicine and biology society. 2007. p. 6252-5. https://doi.org/10.1109/IEMBS.2007.4353784.

10. Krivas Z, Mikula K, Peyrieras N, Rizzi B, Sarti A, Stasova O. 3D early embryogenesis image filtering by nonlinear partial differential equations. Med Image Anal. 2010;14(4):510-26. https://doi.org/10.1016/j.media.2010.03.003.

11. Bourbine P, Cunderlik R, Drblikova-Stasova O, Mikula K, Remesikova M, Peyrieras N, Rizzi B, Sarti A. 4D embryogenesis image analysis using PDE methods of image processing. Kybernetika. 2010;46(2):226-59.

12. Zanella C, Campana M, Rizzi B, Melani C, Sanguinetti G, Bourbine P, Mikula K, Peyrieras N, Sarti A. Cells segmentation from 3-D confocal images of early zebrafish embryogenesis. IEEE Trans Image Process. 2010;19(3):770-81. https://doi.org/10.1109/TIP.2009.2303629.

13. Mikula K, Peyrieras N, Remesikova M, Stasova O. Segmentation of 3D cell membrane images by PDE methods and its applications. Comput Biol Med. 2011;41(6):326-39. https://doi.org/10.1016/j.compbiomed.2011.03.010.

14. Schneider CA, Rasband WS, Eliceiri KW. NIH Image to ImageJ: 25 years of image analysis. Nat Methods. 2012;9(7):671-5.

15. Yoo T, Ackerman M, Lorensen W, Schroeder W, Chalana V, Aylward S, Metaxas D, Whitaker R. Engineering and algorithm design for an image processing API: a technical report on ITK—the insight toolkit. 2002;85:586-92. https://doi.org/10.3233/978-1-60750-929-5-586. https://itk.org/.

16. Das P, Ito T, Wellmer F, Vernoux T, Dedieu A, Traas J, Meyerowitz EM. Floral stem cell termination involves the direct regulation of AGAMOUS by PER-IANTHIA. development. 2009;136(10):1605-11. https://doi.org/10.1242/dev.035436. http://dev.biologists.org/content/136/10/1605.full.pdf.

17. Kass M, Witkin A, Terzopoulos D. Snakes: active contour models. Int J Comput Vis. 1988;1(4):321-31.

18. Osher S, Sethian JA. Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations. J Comput Phys. 1988;79:12-49. https://doi.org/10.1016/0021-9991(88)90002-2.

19. Caselles V, Kimmel R, Sapiro G. Geodesic active contours. Int J Comput Vis. 1997;22(1):61-79. https://doi.org/10.1023/A:1007979827043.

20. Sethian JA. Level set methods and fast marching methods: evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science, vol. 3. Cambridge: Cambridge University Press; 1999.

21. Mairhofer S, Zappala S, Tracy S, Sturrock C, Bennett MJ, Mooney SJ, Pridmore TP. Recovering complete plant root system architectures from soil via X-ray µ-computed tomography. Plant Methods. 2013;9(1):1-7. https://doi.org/10.1186/1746-4811-9-8.

22. Chopin J, Laga H, Miklavcic SJ. The influence of object shape on the convergence of active contour models for image segmentation. Comput J. 2016;59(5):603-15.

23. Li C, Xu C, Gui C, Fox MD. Distance regularized level set evolution and its application to image segmentation. IEEE Trans Image Process. 2010;19(12):3243-54.

24. Landrein B, Kiss A, Sassi M, Chauvet A, Das P, Cortizo M, Laufs P, Takeda S, Aida M, Traas J, Vernoux T, Boudaoud A, Hamant O. Mechanical stress contributes to the expression of the STM homeobox gene in *Arabidopsis* shoot meristems. Elife. 2015;4:e07811. https://doi.org/10.7554/eLife.07811.

25. Hervieux N, Dumond M, Sapala A, Routier-Kierzkowska A-L, Kierzkowski D, Roeder AHK, Smith RS, Boudaoud A, Hamant O. A mechanical feedback restricts sepal growth and shape in *Arabidopsis*. Curr Biol. 2016; https://doi.org/10.1016/j.cub.2016.03.004.
26. Solorzano COD, Malladi R, Lelievre SA, Lockett SJ. Segmentation of nuclei and cells using membrane related protein markers. J Microsc. 2001;201(Pt 3):404–15.

27. Neumann FR, Nurse P. Nuclear size control in fission yeast. J Cell Biol. 2007;179(4):593–600. https://doi.org/10.1083/jcb.200708054. http://jcb.rupress.org/content/179/4/593.full.pdf.

28. Biot E, Cortizo M, Burguet J, Kiss A, Oughou M, Maugarny-Calès A, Gonçalves B, Adroher B, Andrey P, Boudaoud A, Laufs,P. Multiscale quantification of morphodynamics: MorphoLeaf software for 2D shape analysis. Development (Camb, Engl). 2016;143:3417–28. https://doi.org/10.1242/dev.134619.

29. The CImg Library, C++ Template Image Processing Toolkit. http://cimg.eu/.

Submit your next manuscript to BioMed Central
and we will help you at every step:

* We accept pre-submission inquiries

* Our selector tool helps you to find the most relevant journal

* We provide round the clock customer support

* Convenient online submission

* Thorough peer review

* Inclusion in PubMed and all major indexing services

* Maximum visibility for your research

Submit your manuscript at
www.biomedcentral.com/submit

( ) **BioMed** Central