Guillaume Damiand
email: guillaume.damiand@liris.cnrs.fr

Alexandre Dupas
email: dupas@sic.univ-poitiers.fr

Jacques-Olivier Lachaud
email: jacques-olivier.lachaud@univ-savoie.fr

Fully Deformable 3D Digital Partition Model with Topological Control

Keywords: 3D Image Segmentation, Simple Point, Deformable Model, Intervoxel Boundaries, Multi-Label Image, Cubical complexes

We propose a purely discrete deformable partition model for segmenting 3D images. Its main ability is to maintain the topology of the partition during the minimization process. To do so, our main contribution is a new definition of multi-label simple points (ML simple point) that is easily computable. An ML simple point can be relabeled without modifying the overall topology of the partition. The definition is based on intervoxel properties, and uses the notion of collapse on cubical complexes. This work is an extension of a former restricted definition [16] that prohibits the move of intersections of boundary surfaces. A deformation process is carried out with a greedy energy minimization algorithm. A discrete area estimator is used to approach at best standard regularizers classically used in continuous energy minimizing methods. We illustrate the potential of our approach with the segmentation of 3D medical images with known expected topology.

Introduction

Context and contribution

Over the past twenty years, energy-minimizing techniques have shown a great potential for image segmentation. Originally, most of them were based on a variational formulation, i.e. a continuous optimization problem in a functional space. We may quote deformable models [START_REF] Kass | Snakes: Active contour models[END_REF], Mumford-Shah approximation [START_REF] Mumford | Optimal approximations by piecewise smooth functions and associated variational problems[END_REF], geometric or geodesic active contours and other levelset variants [START_REF] Caselles | A geometric model for active contours[END_REF][START_REF] Malladi | Shape Modelling with Front Propagation: A Level Set Approach[END_REF][START_REF] Caselles | Minimal surfaces based object segmentation[END_REF][START_REF] Vese | A multiphase level set framework for image segmentation using the Mumford and Shah model[END_REF], among others. Their formulation combines in a single expression a term expressing the fit to data and a term describing shape priors (generally length or area penalization) and acting as a regularizer. The parameter balancing the two terms allows to tune the technique according to the amount of noise and perturbation in the data. In a sense, this parameter acts as a scale factor, providing a very natural multiscale analysis of images.

Energy-minimization for image segmentation can also be expressed in a discrete setting: structural split and merge [START_REF] Dupas | First results for 3d image segmentation with topological map[END_REF], weighted graph with cut optimization [START_REF] Boykov | Fast approximate energy minimization via graph cuts[END_REF][START_REF] Boykov | Computing geodesics and minimal surfaces via graph cuts[END_REF], irregular and combinatorial pyramids [START_REF] Guigues | Scale-sets image analysis[END_REF][START_REF] Pruvot | Scale set representation for image segmentation[END_REF], Markov fields and stochastic processes [START_REF] Geman | Stochastic relaxation, gibbs distributions, and the bayesian restoration of images[END_REF], minimum description length [START_REF] Leclerc | Constructing simple stable descriptions for image partitioning[END_REF][START_REF] Zhu | Region competition: Unifying snakes, region growing, and bayes/mdl for multiband image segmentation[END_REF]. The discrete approaches present several advantages for finding the optimal solution. Greig et al. [START_REF] Greig | Exact maximum a posteriori estimation for binary images[END_REF] have given a polynomial algorithm for solving the two label segmentation problem. Approximate solutions for the multi-label partition are also available [START_REF] Boykov | Fast approximate energy minimization via graph cuts[END_REF][START_REF] Guigues | Scale-sets image analysis[END_REF][START_REF] Pruvot | Scale set representation for image segmentation[END_REF]. However, the regularization/shape prior term of these discrete methods is reduced to the digital length or area of region boundaries, which is a very poor area estimator. Therefore, from the regularization point of view, it tends to flatten optimal configurations. As a consequence, optimal solutions may be geometrically somewhat different.

We propose a novel energy-minimizing model for segmenting 3D images into multiple regions. It aims at combining the advantages of the continuous and the discrete energy-minimizing techniques. This paper is an extension of the work of [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF]. It shares with it the following features: discrete model : it is a purely digital formulation of energy minimization, which can be solved by combinatorial algorithms. In this exposition, we have for now use a simple greedy algorithm; approximation of continuous regularization : the area regularizer is approached in this digital setting by an accurate discrete geometric estimator;

contour-based and region-based energies : both region structures and the geometry of their interfaces are encoded in the topological map structure. Any kind of energy may thus be evaluated efficiently: e.g. region-based like quadratic deviation [START_REF] Mumford | Optimal approximations by piecewise smooth functions and associated variational problems[END_REF][START_REF] Chan | Active contours without edges[END_REF] or contourbased like strong gradients [START_REF] Kass | Snakes: Active contour models[END_REF];

topological control : it is guaranteed that the topology of the whole partition remains unchanged during the evolution of the boundaries between regions.

Furthermore, compared with [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF], this paper describes a new method to guarantee that the topology of the whole partition is preserved during the deformation process, which allows a larger class of partition deformation at each step while guaranteeing that the partition topology remains unchanged.

Discussion

Our objective is to mimick as precisely as possible the behaviour of continuous models while staying in a discrete setting. It is well-known that continuous variational problems induce PDEs which are solved iteratively. They are dependent on their initialization and may get stuck in local minima, except in specific cases [START_REF] Cohen | Global minimum for active contour models: a minimal path approach[END_REF][START_REF] Chan | Active contours without edges[END_REF][START_REF] Ardon | Fast constrained surface extraction by minimal paths[END_REF]. To our knowledge, none of them are able to find the optimal image partition if more than two regions are expected, although recent works using convex relaxation seem promising for 2D images [START_REF] Chambolle | A convex approach for computing minimal partitions[END_REF][START_REF] Pock | A convex relaxation approach for computing minimal partitions[END_REF]. As said above, the discrete methods have interesting properties for extracting an optimal solution, but their regularization term is too primitive. As an exception, Boykov and Kolmogorov [START_REF] Boykov | Computing geodesics and minimal surfaces via graph cuts[END_REF] have proposed to enrich the neighborhood graph to get finer area estimators -in a way similar in spirit to chamfer distances -but their approach is for now limited to a 26-neighborhood, which remains a coarse approximation.

Our discrete model is related to the discrete deformable boundaries [START_REF] Lachaud | Discrete deformable boundaries for the segmentation of multidimensional images[END_REF], or to the discrete snake [START_REF] De Vieilleville | Digital Deformable Model Simulating Active Contours[END_REF]. Instead of enriching the adjacency graphs, we keep the standard image graph but we compute the regularization term in a potentially larger neighborhood with discrete geometric estimators. This term is an estimation of the area of each surfel. The discrete geometric estimator extracts maximal digital straight segments along two directions to estimate the surfel normal, the surfel area is then a byproduct [START_REF] Lachaud | Geometric measures on arbitrary dimensional digital surfaces[END_REF]. Such estimators are known to have good convergence behavior as the resolution gets finer and finer [START_REF] Lachaud | Fast, accurate and convergent tangent estimation on digital contours[END_REF]. In a sense, the discrete energy tends toward the continuous energy as the resolution gets finer. This is proved for the 2D formulation in [START_REF] Lachaud | Espaces non-euclidiens et analyse d'image : modèles déformables riemanniens et discrets, topologie et géométrie discrète[END_REF]. In the present paper, we use only greedy combinatorial optimization schemes, which entails that our model may also be stuck in local minima, but the proposed framework let us free to test more elaborate combinatorial optimization algorithm.

This model encodes the 3D evolving digital partition with a combinatorial map, which offers a simple and optimal access to the partition topology. Regions are then naturally delineated and region energies are easily computed. This partition model also encodes the digital geometry between regions with an intervoxel matrix. Frontiers can be tracked in a straightforward way to compute contourbased energies. As a consequence, we obtain a versatile segmentation tool. According to the image characteristics or the application, it is well known that contour or region based approaches are more or less adapted. For instance, region-based energies are generally more convex and thus easier to minimize [START_REF] Chan | Active contours without edges[END_REF][START_REF] Vese | A multiphase level set framework for image segmentation using the Mumford and Shah model[END_REF]. Our partition model allows to mix energies defined on regions and energies defined on boundaries. Very few explicit or implicit variational or deformable models can do that in 3D, except perhaps the work of Pons and Boissonnat [START_REF] Pons | Delaunay deformable models: Topology-adaptive meshes based on the restricted Delaunay triangulation[END_REF], but their approach may not model energies depending on the inclusion between regions.

Finally, we address the problem of controlling the topology of the partition while it is evolving toward a minimal position. This is critical in several specific image applications where the topology of anatomic components is a prior information, like atlas matching. This is even truer in 3D images, where anatomic components are intertwined in a deterministic way. In 2D, when there are only two labels (foreground and background), simple points are a classical technique for doing it [START_REF] Bertrand | Simple points, topological numbers and geodesic neighborhoods in cubic grids[END_REF]. Similar tools are used in level set techniques to control topology changes [START_REF] Han | A topology preserving level set method for geometric deformable models[END_REF][START_REF] Ségonne | Active contours under topology control -genus preserving level sets[END_REF]. For the more complex case of a multi-label partition, a few authors have proposed an equivalent to simple points in a discrete setting [START_REF] Ségonne | Active contours under topology control genus preserving level sets[END_REF][START_REF] Bazin | Digital homeomorphisms in deformable registration[END_REF]. However, they are computationally too costly to be used to drive the evolution of a digital partition.

This paper is an extension of the work [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF], where a first notion of simple point in a partition was proposed. This first definition was enough to simulate movements of boundaries between two regions, but it forbade movements of boundaries between three or more regions (1dimensional boundaries). We propose here a more general definition of simple points in multi-label partitions, which we call ML-simple points (ML for Multi-Label). This new definition gives more freedom to the evolving partition. Updating ML-simple points induces movements of surface, edges, and points between regions, while preserving at all steps the initial partition topology. Moreover, ML-simpleness is computable in constant time, thanks to our intervoxel encoding.

The paper is organized as follows. Section 2 recalls standard notions of digital geometry used later on. Section 3 presents the definition of ML-simpleness and proves that it implies simpleness. The ML-simpleness test derives from the definition. Section 4 describes a first digital deformable partition model that uses ML-simple points to ensure the preservation of the topology and Sect. 5 shows some experiments.

Preliminary Notions

The first subsection recalls standard digital topology notions based on voxels. The second subsection gives further definitions for intervoxel topology. The third subsection presents the definitions related to cubical cell complexes and the last subsection gives our first restricted version of ML-simpleness.

Images and Voxels Notions

A voxel is an element of the discrete space Z 3 . A 3D image is a finite set of voxels I (the image domain), and a mapping between these voxels and a set of colors or a set of gray levels (the image values). Each voxel v is associated with a label l(v), a value in a given finite set L. These labels can be obtained from the image by a segmentation algorithm.

We use the classical notion of α-adjacency, with α ∈ {6, 18, 26}. The set of voxels α-adjacent to v is noted N * α (v), and thus we define N α (v) = N * α (v)∪{v}. An α-path between two voxels v 1 and v 2 is a sequence of voxels between v 1 and v 2 such that each pair of consecutive voxels is αadjacent. A set of voxels S is α-connected iff there is an α-path between any pair of voxels of S, having all its voxels in S.

We consider the relation induced by being 6-connected and having the same label. This is an equivalence relation over the image domain, and the equivalence classes are the regions of the image. We consider an infinite region R 0 that "surrounds" the image (i.e. R 0 = Z 3 \ I). Note that there is only one infinite region, which is not necessarily 6connected if the image has some holes. The complement set of a region X in I is denoted by X. We extend the notion of adjacency to regions: two regions R 1 and R 2 are α-adjacent if there is one voxel in R 1 and one voxel in R 2 that are α-adjacent. One voxel v is α-adjacent to a region R if there is a voxel in R which is α-adjacent to v. Now, we recall notations and definitions from [START_REF] Bertrand | Simple points, topological numbers and geodesic neighborhoods in cubic grids[END_REF]. The set of α-connected components of a set of voxels X is called C α (X). The geodesic neighborhood of v in X of order k is the set N k α (v, X) defined recursively by:

N 1 α (v, X) = N * α (v, X) ∩ X, and N k α (v, X) = {N α (Y) ∩ N * 26 (v) ∩ X, Y ∈ N k-1 α (v, X)}.
In other words, N k α (v, X) is the set of voxels x belonging to N * 26 (v) ∩ X such that it exists an α-path π from v to x of length at most k, all the voxels of π belonging to N * 26 (v)∩X. In this paper, we use only the couple of neighborhood (6, 18) (6 for object and 18 for background). In this framework, we obtain the 6-geodesic neighborhood G 6 (x, X) = N 3 6 (x, X) and the 18-geodesic neighborhood G 18 (x, X) = N 2 18 (x, X). From these notations, Bertrand [START_REF] Bertrand | Simple points, topological numbers and geodesic neighborhoods in cubic grids[END_REF] defines the notion of simple points in a (6, 18)-connectivity as given in Definition 1.

Definition 1 (Simple points [3])

. A voxel x is simple for a set X if #C 6 [G 6 (x, X)] = #C 18 G 18 (x, X) = 1, where #C k [Y]
denotes the number of k-connected components of a set Y.

Intervoxel Topology

Given an image I, we describe the boundaries of its regions by using the classical notion of intervoxel [START_REF] Kovalevsky | Finite topology as applied to image analysis[END_REF]. In the intervoxel framework, we consider not only voxels, but also all the unit elements of the subdvision of the discrete space: voxels are unit cubes, surfels are unit squares between voxels, linels are unit segments between surfels, and pointels are the points between linels.

In the rest of this paper, we use the following notations:

• for a voxel v: surfels(v) is the set of the six surfels between v and all its 6-neighbors;

• for a surfel s: linels(s) is the set of the four linels between s and its adjacent surfels;

• for a linel l: pointels(l) is the set of the two pointels between l and its adjacent linels.

We extend these notations to any set of elements, for instance, given a set of voxels V, surfels(V) is the union of surfels(v) for all v in V.

To make the notation easier to follow, given a voxel v, linels(v) denotes linels(surfels(v)), and pointels(v) denotes pointels(linels(v)). Given a surfel s, pointels(s) denotes pointels(linels(s)).

A pointel p and a linel l (resp. a linel l and a surfel s, a surfel s and a voxel v) are incident if p ∈ pointels(l) (resp. l ∈ linels(s), s ∈ surfels(v)). By transitivity, we say that a linel l is incident to a voxel v if l is incident to a surfel s which is incident to v (and similarly for other cells, like for a pointel incident to a surfel or to a voxel). Two linels (resp. surfels) are adjacent if there is a pointel (resp. linel) incident to both linels (resp. surfels).

We define SF as the set of boundary surfels of I: SF = {surfel s|s separates two voxels with different labels}. We can remark that any surfel incident to a voxel of the infinite region and to a voxel of I belong to SF since the label of the infinite region is, by definition, distinct from any other label. Given a voxel v, we define the set of boundary surfels incident to v as s f (v) = surfels(v) ∩ SF.

In the following, we need to study the contact area between a voxel and a region. For that, we note s(v, R) = {surfel s|s ∈ surfels(v) and s is incident to a voxel v 2 ∈ R, with v 2 v}, and l(v, R) = {linel l|l ∈ linels(v) and the two surfels incident to l and not to v are incident to two voxels of R}. The contact area between v and R is thus c(v, R) = {l(v, R), s(v, R)}. Pointels are not taken into account here due to the couple of neighborhood considered [START_REF] Caselles | A geometric model for active contours[END_REF][START_REF] Greig | Exact maximum a posteriori estimation for binary images[END_REF].

There are five possible configurations for c(v, R):

1. no surfel: s(v, R) = ∅, i.e. v is not 6-adjacent to R;
2. sphere: s(v, R) contains the 6 surfels incident to v, and l(v, R) contains the 12 linels incident to v; 3. disconnected: there is at least two surfels s 1 and s 2 in s(v, R) for which there is no path of surfels in s(v, R) such that each couple of consecutive surfels are adjacent and separated by a linel in l(v, R); or there is a linel in l(v, R) which is not incindent to a surfel in s(v, R); 4. with holes: the complementary of the set of linels and surfels in c(v, R) is composed by at least two connected components, thus c(v, R) has at least an hole;

5. disk: all the other cases i.e. a non empty connected set of surfels and linels such that its complementary is non empty and connected.

A discrete surface is defined as a set of surfels that border a region [START_REF] Herman | Geometry of Digital Spaces[END_REF][START_REF] Kovalevsky | Geometry of Locally Finite Spaces[END_REF]. It has been shown that discrete surfaces have the Jordan property, i.e. such a surface separates the set of voxels in two regions: an interior and an exterior. A discrete surface is noted ∂(R) = {surfel s ∈ SF|s is incident to R}. To study the subset of a discrete surface that separates two distinct regions R and R ′ , we note

f (R, R ′ ) = {surfel s|s is incident to R and to R ′ } ( f stands for the frontier between R and R ′ ). If R and R ′ are not 6- adjacent, f (R, R ′ ) is empty. We can easily prove that ∂(R) is the union for all R ′ R of f (R, R ′ ).
Given a linel l, its degree d(l) is the number of boundary surfels incident to l, thus d(l) = |{sur f els|s ∈ SF and s is incident to l}|. Note that d(l) is 0, 2, 3 or 4, but never 1. Given a linel l and a voxel v, we denote by d(l, v) the degree of l restricted to boundary surfels incident to v,

thus d(l, v) = |{sur f els|s ∈ s f (v)}|.

Cubical Complexes and Collapse

In this paper, we use another notion of simplicity defined on surfaces. Therefore, we use the work of [START_REF] Couprie | New characterizations of simple points, minimal non-simple sets and p-simple points in 2d, 3d and 4d discrete spaces[END_REF] which defines the notion of simple sets for cubical complexes. We recall here the main notions of this paper restricted to the specific case used in this work, called specific cubical complex (SCC).

A cubical complex is a set of elements having various dimensions (which are pointels, linels, surfels, voxels), glued together by adjacency and incidence relations. In this work, we only use cubical complexes made of a set of surfels, plus all the linels and pointels incident to these surfels: this is what we call SCC. For these reasons, we can describe these specific cubical complexes only by giving their set of surfels.

A face of a SCC is a surfel, linel or pointel incident to a surfel of the complex. A facet of a SCC is one of its surfels. We note X + the set of facets of the SCC X, i.e. the set of its surfels.

A SCC is always closed (because it contains all the linels and pointels incident to surfels): thus the closure1 of a SCC X, noted X -, is equal to X. Moreover, let X be a cubical complex, for each S included in X + , S -is a subcomplex of X (the SCC containing the surfels of S plus all the linels and pointels incident to these surfels).

Intuitively, a subcomplex of a complex X is simple if its removal from X does not change the topology of X. In this work, we use this notion to ensure that the topology of each surface is preserved.

This notion of simplicity is defined using the collapse operation which is a discrete analogue of a continuous deformation (more precisely, a retract by deformation).

Let X be a SCC, and let (l, s) be an ordered pair such that l is a linel belonging to X and s is a surfel belonging to X. The pair (l, s) is a free pair for X if l is incident to s, and there is no other surfel in X (distinct from s) incident to l. Intuitively, the linel l is on the "border" of X. Then, the complex X \ {l, s} is an elementary collapse of X. Now, a SCC X collapses onto a complex Y if there is a sequence of elementary collapse going from X to Y (in this work, we use the collapse operation between a SCC X, and a cubical complex made of linels plus all the pointels incident to the linels).

Let X and Y two SCC, X Y = (X + \ Y + ) -. This is the SCC obtained by removing from the surfels in X all the surfels in Y.

The attachment of Y for X is the complex defined by Att(Y, X) = Y ∩ (X Y). It is the set of linels and pointels which are incident both to Y and to X Y. Now we use the collapse definition to prove that the topology of a surface is unchanged when removing some of its surfels, or when adding some new surfels. Therefore, we use the two following definitions from [START_REF] Couprie | New characterizations of simple points, minimal non-simple sets and p-simple points in 2d, 3d and 4d discrete spaces[END_REF]:

1. the complex Y is simple for X if and only if Y collapses onto Att(Y, X); 2. the complex X ∪ Y collapses onto X if and only if Y collapses onto X ∩ Y.
In such a case, we say that Y is add-simple for X.

Preliminary Work

In [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF], we give a first definition of multi-label simple points allowing to preserve both the topology of regions and the surface relations, recalled in Definition 2. In this paper, we refer to this previous definition as restricted multi-label simple points (rML-simple points). The definition allows to change the label of a rML-simple voxel, and guarantees that the topology of the partition is preserved. However, modifications of the edges of the partition are not allowed: a voxel incident to a linel of degree 3 or degree 4 is not an rML-simple point, even if it is possible to change its label while preserving the topology of the regions (see Fig. 1).

Definition 2 (Restricted Multi-Label simple points). A voxel

x is rML-simple if:

1. for each l in linels(x), we have either d(l) = 0 or d(l) = 2; 2. s f (x) is homeomorphic to a 2-disk; 3. for each l in linels(x), d(l, x) = 0 implies d(l) = 0.

Multi-Label Simple Points

In this paper, we extend Definition 2 to the deformation of any voxel that preserves the topology of the partition, even when edges are moved. Given a voxel x in some region X, the deformation operation, called flip, consists in removing x from X by changing its label. In this context, the main tool to control the topology modification is the notion of simple point. However, there are two main differences with the classical notion of simple point. First, we deal with multi-label images and not binary images. Second, we want to preserve the topology of regions but also the topology of surfaces between the regions.

Definition of Multi-Label Simple Points

Before giving the definition of multi-label simple points, we study the flip operation in multi-label images, and the related modifications on discrete surfaces. Using the modifications, we are able to define simple configurations. Let x be a voxel belonging to a region X, the operation that flips x in the region R (R being 6-adjacent to region X) consists in removing voxel x from X and adding x to R. Note that R and X are the only regions modified, but we also need to look at the modifications on the intervoxel boundaries of the regions: each surfel incident to x that is between X and another region O X before the flip, becomes a surfel between R and O after the flip. The flip implies the following modifications of surfaces: ,X); all the surfels that are between voxel x ∈ X and R before the flip are removed from the surface between X and R, and all the surfels that are between voxel x ∈ X and X before the flip are added to the surface between X and R; \s(x,O); all the surfels that are between voxel x ∈ X and O before the flip are removed from the surface between O and X; ,O); all the surfels that are between voxel x ∈ X and O before the flip are added to the surface between O and R.

• f (X, R) ← f (X, R) \ s(x, R) ∪ s(x
• For any region O with O X, O R: f (X, O) ← f (X, O)
• For any region O with O X, O R: f (R, O) ← f (R, O)∪s(x
To define the notion of multi-label simple point, which preserves the topology of the partition, we have to guarantee that the topology of region X and region R is pre-served, and that the topology of each surface is also preserved. Definition 3 gives the new definition of multi-label simple points (called ML-simple points) which guarantees these two properties.

Definition 3 (ML-simple points).

A voxel x, belonging to region X, is ML-simple for region R if:

1. c(x, R) is homeomorphic to a 2-disk; 2. c(x, X) is homeomorphic to a 2-disk; 3. for each region O 6-adjacent to x, distinct from X and R: s(x, O) is simple for f (X, O); and s(x, O) is add-simple for f (R, O).

There are three main differences with the definition of rML-simple points. First, the condition "for each l in linels(x), we have either d(l) = 0 or d(l) = 2" is removed to process voxels incident to several regions and not only voxels in a binary 18-neighborhood.

Second, the condition "s f (x) is homeomorphic to a 2disk" is replaced by conditions ( 1) and (2) of Definition 3. In the previous definition there are only two regions in the 18-neighborhood of x, and s f (x) is homeomorphic to a 2-disk. Thus, the complementary of s f (x) is also homeomorphic to a 2-disk. In Definition 3 several regions are adjacent to x, so we have to check that both c(x, R), and c(x, X) are homeomorphic to 2-disks. Conditions (1) and ( 2) are necessary to ensure that both the topology of R and the topology of X are preserved. Moreover, to detect configurations where two surfels are adjacent but separated by a linels incident to another region (as seen in the example of Fig. 2d), the test uses linels in addition to surfels.

Third, the new condition (3) guarantees that the topology of other surfaces incident to x remains unchanged. The two subproperties induce that removal and addition of each set of surfels from or to original surfaces does not modify the surface topology. For the removed surfels, it prevents any topological modification but also any vanishing of existing surface. For the added surfels, it forbids the creation of a new surface.

Note that all the conditions are local since they are all restricted to surfels or linels incident to the considered voxel. In condition (3) the set of surfels s(x, O) is a subset of the 6 surfels incident to x. Thus, the tests if s(x, O) is simple for f (X, O) and if s(x, O) is add-simple for f (R, 0) are achieved locally, whatever f (X, O) and f (R, 0), since by definition the test is restricted to the study of the intersection of these sets with s(x, O) (see Sect. 2.3).

In the following, we first detail the different parts of Definition 3. Then, we prove that each rML-simple point is an ML-simple point. Last, we prove the main properties of ML-simple points: i.e. they are simple points, and flipping this kind of voxel preserves the topology of both regions and surfaces.

Informally, each one of the three conditions of Definition 3 allows: c(x,X) is not homeomorphic to a 2-disk since the linel between the two surfels does not belong in l(x, X).

x R X (a) x R X (b) x R 1 X (c) x R 1 X (d)
1. to ensure that the topology of R is preserved when flipping x in R: if c(x, R) is not homeomorphic to a 2-disk, flipping x in R involves a topological modification. If s(x, R) is empty, this creates a new cavity which is an isolated region containing x. If s(x, R) = surfels(x), x is isolated and flipping x in R removes a cavity of R. If s(x, R) is not homeomorphic to a 2-disk, then either c(x, R) is made of two connected components (for example two opposite surfels, or two adjacent surfels but without the incident linel in l(x, R)) or c(x, R) has a hole. In the first case flipping x in R creates a tunnel in R, and in the last case flipping x in R removes a tunnel of R (see Fig. 2a); 2. to preserve the topology of X: if c(x, X) is not homeomorphic to a 2-disk, removing x from X involves, similarly to the previous condition, the removal or creation of a cavity or a tunnel of X (see Fig. 2b and Fig. 2d); 3. to preserve the topology of each surface f (X, O) when removing surfels s(x, O), and to preserve the topology of each surface f (R, O) when adding surfels s(x, O). This condition has to be satisfied for each surface between X and a region O 6-adjacent to x and different from R (see Fig. 2c and Fig. 3).

Restricted Multi-Label Simple Points are Multi-Label Simple Points

First, we prove that the previous definition of rMLsimple points, (configurations where linels do not move),

f(X,A) R x A B X flip(x,R) (a) f(R,B) R x X A B flip(x,R) (b)
Figure 3: Examples of rejected configurations due to condition (3). In each case, we intend to flip the central voxel x (belonging to region X) into the darker region (region R). In both cases, the first two conditions are satisfied. The flip does not modify the topology of regions, but modifies the topology of frontiers between regions. (a) s(x, A) is not simple for f (X, A). (b) s(x, B) is not add-simple for f (R, B) (here s(x, A) is simple for f (X, A) and s(x, B) is simple for f (X, B)).

are ML-simple points (i.e. that the previous definition is included into the new one). This shows that we do not miss previous configurations which have been proved to be simple points. Proposition 1. If x ∈ X is an rML-simple point, then x is a ML-simple point for the second region R adjacent to x.

Proof. Since x ∈ X is an rML-simple point, the following properties are satisfied (cf. Definition 3): (1) ∀l ∈ linels(x), d(l) ∈ {0, 2}; (2) s f (x) is homeomorphic to a 2disk; (3) ∀l ∈ linels(x), d(l, x) = 0 ⇒ d(l) = 0. By using the Lemma 1 in [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF], we know that there are only two regions in N 18 (x), X which contains x and R the second region. Thus, we have s(x, R) equals to s f (x).

We prove that all the conditions of Definition 3 are satisfied.

First, let us prove that c(x, R) is homeomorphic to a 2-disk. We have s(x, R) equals to s f (x) and s f (x) is homeomorphic to a 2-disk. Moreover, for each linel l incident to two surfels in s(x, R), we have d(l) equals 2 (by condition (1) of rML-simple point definition) which implies that l is in l(x, R). Thus, s(x, R) is homeomorphic to a 2disk with all the linels between these surfels in l(x, R): this shows that c(x, R) is homeomorphic to a 2-disk.

For c(x, X), we use the fact that s(x, X) is the complementary of s(x), i.e. is the set of the 6 surfels incident to x minus s f (x) (because there are only two regions in N 18 (x)). Hence s(x, X) is homeomorphic to a 2-disk, otherwise s f (x) would not be homeomorphic to a 2-disk. For the linels, we have for each linel l incident to two surfels in s(x, X), d(l, x) equals 0 which implies d(l) equals 0 (by condition (3) of rML-simple point definition). These linels belong to l(x, X) and for the same reason as above, we can conclude that c(x, X) is homeomorphic to a 2-disk.

Condition (3) is satisfied by vacuity since there is no other region distinct from X and R that is 6-adjacent to x.

Note that the reverse proposition is false: an MLsimple point is, in the general case, not an rML-simple point (as seen in Fig. 1). The goal of the extended definition is to allow the flipping of more voxels, namely the voxels adjacent to more than two regions, which were classified as non simple in the rML-simple point definition.

Multi-Label Simple Points are Simple Points

Now, we prove that the topology of regions is preserved when flipping an ML-simple point. First, we show that ML-simple points are simple points for the two modified regions.

Proposition 2. If x ∈ X is an ML-simple point for R, then x is a simple point for X and for R.

Proof. First, if there are exactly two regions in N 18 (x) (i.e. X and R), we know by Proposition 1 of [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF] that x is simple for R. Since the 18-neighborhood of x is limited to binary case, and by definition of simple points the topology of the complementary of R is preserved: we can deduce that the topology of X is also preserved, and thus that x is simple for X.

The case where there are only one region in N 18 (x) is impossible since x cannot be an ML-simple point in this configuration.

In cases with more than two regions, we use a proof similar to the one in [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF], by proving the contrapositive of Proposition 2, i.e. if x is not a simple point for R, then x is not an ML-simple point. Let n 1 be equal to #C 6 [G 6 (x, R)] and n 2 be equal to #C 18 G 18 (x, R) , we know that the voxel x is not simple in the four following cases: [START_REF] Ardon | Fast constrained surface extraction by minimal paths[END_REF]

n 1 = 0, (2) n 2 = 0, (3) n 1 ≥ 2, (4) n 2 ≥ 2.
Let us prove that the voxel x is not an ML-simple point in each case:

1. n 1 = 0. There is no 6-connected component of voxels belonging to R in G 6 (x, R): s(x, R) is empty, and thus c(x, R) is not homeomorphic to a disk which contradicts condition (1) of Definition 3. 2. n 2 = 0. There is no 18-connected component of voxels belonging to R in G 18 (x, R): s(x, X) is empty, and thus c(x, X) is not homeomorphic to a disk which contradicts condition (2) of Definition 3. 3. n 1 ≥ 2: there are at least two 6-connected components of voxels belonging to R in G 6 (x, R). If there are two 18-adjacent voxels v 1 and v 2 in two different connected components, then the voxel v 3 x 6-adjacent to v 1 and to v 2 belongs to R (otherwise there is only one connected component) and thus c(x, R) is not homeomorphic to a disk since the linel l incident to x, v 1 and v 2 is not in l(x, R), and there is no other path of surfels between these two surfels, otherwise v 1 and v 2 would be in the same connected component. This contradicts condition (1) of Definition 3. If there is no voxels v 1 and v 2 in two different connected components that are also 18-adjacent, the connected components are separated by x. In this case, c(x, R) is not homeomorphic to a disk (it is an annulus) in contradiction to condition (1). 4. n 2 ≥ 2: there are at least two 18-connected components of voxels belonging to R in G 18 (x, R). If there are two voxels v 1 , v 2 ∈ N 6 (x) in two different connected components, then v 1 and v 2 are not 18-adjacent (otherwise there is only one connected component), and thus all other voxels in N 6 (x) belong to R. Hence, c(x, R) is not homeomorphic to a disk, which contradicts condition (1) of Definition 3.

If there is no two voxels of N 6 (x) in two different connected components, that means one of them (say v 1 ) belongs to N 18 (x) \ N 6 (x), and that all the voxels in N 6 (x), except v 2 , belong to R (otherwise we are either in the case of the previous paragraph, or there is only one 18-connected components of voxels belonging to R), and thus s(x, R) contains the five surfels incindent to x and not to v 2 .

The linel l incident to v 1 and x is not in l(x, R) (since the two 6-neighbors of v 1 in N 6 (x) belong to R while v 1 does not): c(x, R) has a hole and thus is not homeomorphic to a disk in contradiction to condition [START_REF] Ardon | Fast constrained surface extraction by minimal paths[END_REF].

We can make a similar proof for the proposition: if x is not a simple point for X, then x is not an ML-simple point. This is done again by showing that in each case where x is not simple, there is a contradiction with a condition of Definition 3 (and in this second part of the proof, condition ( 2) is used instead of condition ( 1)).

Since regions distinct from X and R are not modified by the flip operation, this proves that the topology of all regions in the image is preserved. Note that the reverse proposition is false: simple points are not ML-simple points (in Fig. 3, for both examples, voxel x is simple but not ML-simple).

Then, we prove that the topology of each surface is preserved. This proof is straightforward using the works in [START_REF] Couprie | New characterizations of simple points, minimal non-simple sets and p-simple points in 2d, 3d and 4d discrete spaces[END_REF].

Proposition 3. If x is an ML-simple point for R, the topology of each surface is unchanged by flipping x in R.

Proof. First, let us study the surfaces between O, a region 6-adjacent to x, distinct from X and R, and regions X and R, and prove that the topology of these surfaces is preserved. This is a direct consequence of condition (3) of Definition 3, and the definition of simplicity in cubical complexes. Since f (X, O) ← f (X, O) \ s(x, O), and s(x, O) is simple for f (X, O), the topology of f (X, O) before and after the flip remains the same. Since ands(x, O) is add-simple for f (R, O), the topology of f (R, O) before and after the flip remains the same.

f (R, O) ← f (R, O) ∪ s(x, O),
Second, let us study the surface between X and R. This surface cannot disappear, otherwise s(x, R) is empty and that contradicts condition (1) of ML-simple point definition. This surface cannot be cut in two connected components, nor topologically modified. We have ∂X that is the union of all surfaces f (X, O), for all O X, i.e. ∂X equals to f (X, R) plus f (X, O), for all O X and R. Since we have shown that the topology of region X is unchanged (no modification of tunnels nor cavities), and since the topology of each surface f (X, O) is preserved for all O X and R, the topology of f (X, R) is also unchanged. Otherwise ∂X is modified.

Since no other surfaces are modified, the topology of each surface in the image is unchanged by the flip.

Detection of Multi-Label Simple Points

Now we present an algorithm allowing to detect if a given voxel is a ML-simple point. For that, we need to be able to retrieve efficiently intervoxel information. This is achieved by using two matrixes. The first one is a matrix which encodes the regions, i.e. the voxel labels.

The second one is an intervoxel matrix which encodes the borders of the regions in the 3D image. For each intervoxel cell c, this matrix store the state of c ("on" or "off") depending on the three following rules:

• a surfel s is "on" iff s ∈ SF (i.e. s is between 2 voxels with different labels);

• a linel l is "on" iff l is incident to > 2 "on" surfels;

• a pointel p is "on" iff p is incident to 1 or > 2 "on" linels.

We use the intervoxel matrix in Algo. 4 to determine if voxel x is ML-simple. This algorithm uses the two functions given in Algo. 1 and Algo. 2. The first function tests if a set of surfels is homeomorphic to a disk, and the second function tests if a set of surfels can collapse on a set of linels. The two algorithms use the fact that the set of surfels is a subset of the surfels incident to a given voxel, and the fact that the set of linels is also a subset of the linels incident to the same voxel. The two properties allow to define algorithms with constant time complexity since the number of cases is bounded.

Algorithm 1 tests if the set S is homeomorphic to a disk by checking that it does not correspond to one of the four configurations where S is not a disk. The first case (|S| = 0) corresponds to S is empty. The second case (|S| = 6) corresponds to S is homeomorphic to a sphere. The third case is if S is composed of two opposite surfels. The fourth case is if S is composed of 4 surfels homeomorphic to an annulus. Algorithm 2 tests if the set of surfels S can collapse on the set of linels L by considering the two possible cases (more precisely the CSS obtained from S by adding all linels and pointels incident to surfels in S can collapse on the cubical complex obtained from L by adding all pointels incident to linels in L). The first case is if S is homeomorphic to a disk: S can collapse on L if only if L is homeomorphic to a segment. The second case is if S is homeomorphic to an annulus: S can collapse on L if and only if L is homeomorphic to a circle. To test if L is homeomorphic to a segment, we consider two different cases. If |L| = 1, L is homeomorphic to a segment. If |L| > 1, we check if each linel in L is adjacent to one or two other linels in L, and there is exactly two linels that are adjacent to only one other linel. For the circle, the test is similar but all linels in L have to be adjacent to exactly 2 linels in L, and there must be only one connected component (to avoid case where L is homeomorphic to 2 circles). Note that this algorithm is not generic and can not be used for any set of surfels, but only for the set of surfels we test during the simple point detection algorithm.

All the conditions of Definition 3 are satisfied, x is MLsimple and the algorithm returns true accordingly.

First, the complexity of Algo. 2 is O [START_REF] Ardon | Fast constrained surface extraction by minimal paths[END_REF]. There are 6 surfels in surfels(x) and 12 linels in linels(x), and the complexity of each step of the algorithm can be bounded by these two numbers. Second, the complexity of Algo. 3 is O(1) since the number of visited surfels in both depth first search algorithm is at most 6. Finally, the complexity of Algo. 4 is O(1): to compute the set of linels L 1 , we test the 12 linels incident to x, and for each linel l, we verify if l satisfies the other conditions: l is incident to a surfel incident to region O, and l is incident to a surfel between regions X and O that is not incident to x. These tests can be achieved in constant time using two matrices, one of voxel and one of intervoxel elements. The same principle is used to compute the second set of linels L 2 . Thus, the computation of the two sets can be achieved by a constant number of operations, and testing if L is homeomorphic to a segment or to a circle can also be achieved by a constant number of operations.

Deformable Model Process

We developed a digital deformable partition model based on the definition of ML-simple points. The geometry of the partition is coded using an intervoxel matrix. Deformations are carried out by flipping ML-simple voxels and Proposition 3 ensures that the topology of the partition is preserved. The deformation is guided by an energy-minimizing process. In this work, the energy has a simple definition to show the feasibility of a deformable partition model based on ML-simple voxels flips.

The energy of a partition is defined as the sum of the energies of each digital surface S between pairs of regions (R 1 , R 2 ). The energy of a surface S is the weighted sum of E r a region based energy, and E s an area based energy.

Energy E r is an energy describing the quality of the fit of regions to image data. Energy E r is the sum of the Mean Squared Error (MSE) of R 1 and R 2 : as the region becomes more homogeneous, the value of E r (S) decreases.

Energy E s is based on a discrete area estimator proposed in [START_REF] Lachaud | Geometric measures on arbitrary dimensional digital surfaces[END_REF] that gives an estimation of the area of one surfel s in the digital surface represented by the set of surfels containing s. As the set of surfels changes depending on the surface side, the area estimation for a surfel also depends on the surface side. The energy of a surfel is defined as the sum of the estimated area of s from the side of R 1 and the estimated area from the side of R 2 . Energy E s is the sum of the energy of each surfel of S: as the surface becomes smoother, the value of E s decreases.

The deformation process of a surface follows a greedy optimization algorithm. The initial energy of the surface is first computed. Then, for each surfel of the surface, the process temporary flips ML-simple voxels adjacent to the surfel and computes the resulting energy. Last, the flip that most reduces the energy is definitively applied.

The deformation algorithm is executed on every border faces of the partition. The process iterates until a local minimum energy is reached (i.e. no deformation occurs). The deformation process always stops since a finite number of surfels is processed and since flips are only applied if the global energy strictly decreases.

Experiments

We present two sets of experiments. First, we run two experiments that highlight the advantage of the discrete area estimator over the number of surfel as energy for regularization. Second, two examples of a deformation process in a multi-label partition are proposed.

In the first set of experiments, we use a deformation process that is governed by the minimization of its estimated area. As input data, we provide noisy versions of either a slanted plane or a sphere. A good regularizer should smooth these data into a perfect plane or a perfect sphere. Two different regularizing energies are compared: one using the number of surfels (NS) and one using the discrete area estimator (DAE).

To experiment the process, test images are generated that contains two regions separated by one face. In the first experiment, this face is a discrete plane, and in the second experiment it is a discrete sphere. Noise is added to the discrete surface using many random flip operations. Then, the deformation process minimizes the estimated area using the NS or the DAE methods. This process smooths the surface, and thus removes some of the noise. We measure the resulting surface area and compare it with the theoretical value. The measured values are reported into the following tables.

Table 1 presents the results of the deformation with such energies on a noisy slanted plane. We increase the plane size to observe differences between the two energies. In this configuration the two energies give approximately the same results. The accuracy of both estimated area depends on the angles formed by the plane with the the three mutually perpendicular planes of the orthonormal basis. During the smoothing, the deformation process is stopped in a local minimum where there is no more MLsimple points that minimize the NS or the DAE energies. Since the resulting plane are roughly similar, there is no advantage of the DAE based deformation over the NS based one. In fact, in this case, the noise perturbates the plane with voxels that induce local change of orthants. That kind of perturbation is also removed by an NS energy.

In the second experiment, presented in Table 2, the same energies are used to smooth noisy spheres of different radii. The deformation based on the minimization of the DAE energy gives a more accurate result with respect to the theoretical value. Actually, the deformation minimizing the number of surfels tends to produce a discrete sphere that has an increased radius: the smoothed surface The second sets of experiments consists in optimizing an initial partition which contains several regions. The objective is to enhance this initial segmentation with respect to image and area based energies (see Sect. 4).

The third experiment shows a segmentation of a 3D medical image with a poor initialization, in a way similar to continuous deformable partition models [START_REF] Vese | A multiphase level set framework for image segmentation using the Mumford and Shah model[END_REF]. Starting with a topologically correct segmentation of the image, the deformation process is used to retrieve shapes in the image while keeping topological information. The algorithm is applied on a simulated MRI brain image obtained from [START_REF] Cocosco | Brainweb: Online interface to a 3d MRI simulated brain database[END_REF]. The result proposed in this paper is a generalized version of the second experiment found in [START_REF] Dupas | Multilabel simple points definition for 3d images digital deformable model[END_REF]. According to a prior knowledge the image is composed of five regions that are intertwined as displayed on Fig. 4c. In this configuration, there is no intersection between the partition boundaries. Figure 4a shows a slice of the original image, the initial partition on the same slice is presented Fig. 4b and the optimized segmentation is shown in Fig. 4d). The algorithm ensures that the topology of the optimized segmentation is the same as the topology of the initial partition of the image. The resulting partition is not fully satisfactory, but this is mainly due to the chosen energies, which are very rudimentary. This will be addressed in future works.

The fourth experiment presents the deformation of a multi-label partition that contains surface intersections. The initial partition is produced by an existing algorithm [START_REF] Dupas | First results for 3d image segmentation with topological map[END_REF] which is supposed to be topologically correct but represents a poor result with respect to the partition global energy. The deformation slightly modifies surfaces of the image to obtain a better result. Figure 5a and Fig. 5b present a slice of the partition before and after the deformation processes. Borders of regions match more accu- rately image data. Figure 5c shows a piece of the partition produced by a deformation algorithm that flips only rMLsimple points. Figure 5d presents the same piece of the partition but produced by the deformation algorithm using the ML-simple point definition. The surface intersections are moved in Fig. 5d. This allows to obtain a partition with a smaller energy. With this experiment, we show the interest of the definition of ML-simple points over rMLsimple points to obtain a partition with a smaller energy.

Conclusion

In this work, we have proposed a new definition of ML-simple points, the points which can be flipped without modifying the topology of the partition. The strengths of our method are:

1. the algorithm allowing to test if a given point is MLsimple is local, short and easy to implement; 2. our method of deformable model is generic: we can easily modify the energies used to mix some regions and surfaces information depending on the needs of the applications; 3. our method deals with arbitrary multi-label image partitions: we can use a partition containing any number of surfaces, and deform this partition by preserving its topology.

We have illustrated these interests by showing some preliminary experiments. A first one shows the advantage of the discrete area estimator over the number of surfels as energy for regularization. A second experiment shows the interest of use an initial set of arbitrary surfaces, by deforming some included spheres to fit a brain image, or to smooth an initial partition obtained from a preliminary segmentation.

In future works, we plan to improve the energies used in the deformable model to have a better fit with the image data. We also want to improve the discrete area estimator in order to be able to process big 3D images. For that, we want first to make the estimator linear in time in the same way as the 2D case. Second, we want to update the estimator dynamically to avoid global recomputation. A last perspective is to study different area estimators in order to find a better one with less local minimum, for example by using a solution similar to [START_REF] De Vieilleville | Digital deformable model simulating active contours[END_REF] in 2D.

Figure 1 :

 1 Figure 1: Configuration where the central voxel is MLsimple. In each case, we intend to swap the voxel into the darker region. (a) The voxel is rML-simple: for each linel l in linels(v) we have d(l) = 0 or d(l) = 2. (b) The voxel is not rML-simple: there is one linel l incident to the central voxel with d(l) = 3.

Figure 2 :

 2 Figure 2: Examples of rejected configurations. In each case, we intend to flip the central voxel x (belonging to region X) into the darker region (region R). (a) Rejected by condition (1): c(x, R) is not homeomorphic to a 2-disk. (b) Rejected by condition (2): c(x, X) is not homeomorphic to a 2-disk. (c) Rejected by condition (3): s(x, 1) is not addsimple for f (R, 1). (d) Rejected by condition (2).c(x, X) is not homeomorphic to a 2-disk since the linel between the two surfels does not belong in l(x, X).

Algorithm 1 : 1 return f alse; 2 if S = {s 1 , s 2 } then 3 if s 1 4 else return f alse; 5 if |S| = 4 then 6 let s 1 and s 2 be the two surfels incident to x S; 7 if s 1 and s 2 are adjacent then return true; 8 else return f alse; 9 return true; 10

 11213145678910 isDisk(S) Data: set S of surfels incident to a voxel x. Result: true iff S is homeomorphic to a disk. if |S| = 0 or |S| = 6 then and s 2 are adjacent then return true;

Figure 4 :

 4 Figure 4: Optimization of an existing partition without intersection of boundary surfaces ensuring that the topology of the partition is preserved. (a) Slice of a simulated MRI brain image. (b) Initial partition with five regions. (c) Imbrication tree of the five regions. (d) Resulting segmentation after deformation.

Figure 5 :

 5 Figure 5: Optimization of an initial segmentation with intersection of boundary surfaces by minimizing the partition energy. The topology of the partition is preserved during the deformation process. (a) Slice of the initial segmentation. (b) Same slice after deformation. (c) Zoom on the partition produced by a deformation that flips only rML-simple points. (d) Zoom on the partition produced by a deformation that flips ML-simple points. The energy of this partition is smaller than the energy measured for (c).

Table 1 :

 1 Smoothing of a noisy plane surface

	Size	Theoretical	NS	DAE
	10 × 10	141,42	126,73	127,42
	15 × 15	318,20	296,13	296,80
	20 × 20	565,69	536,25	536,25
	25 × 25	883,88	847,07	848,36
	30 × 30	1272,79	1228,88 1229,74

Table 2 :

 2 Smoothing of a noizy sphere.

	Radius Theoretical	NS	DAE
	5	314,15	456,56	456,56
	8	804,24	788,77	737,42
	10	1256,63	1800,43 1206,25
	12	1809,55	2409,28 1945,09
	15	2827,43	3805,52 2768,96

is larger. In this configuration, the DAE based deformation produces a better result than the NS based one. But, as in the first experiment, both deformations reach a local minimum.

In the general case, the closure of a cubical complex is obtained by adding each face of the complex.

Acknowledgement

This research is part of the FoGrImMi project, supported by the ANR foundation under grant ANR-06-MDCA-008-01/FOGRIMMI.

Algorithm 2: collapse(S, L)

Data: set S of surfels incident to a voxel x; set L of linels incident to x. Result: true iff S can be collapsed on L. if isDisk(s(x, R)) then 1 return L is homeomorphic to a segment; 2 return L is homeomorphic to a circle; 3 Algorithm 3 tests if a contact area c(x, R) is homeomorphic to a disk. For that, it uses the remarks given in Sect. 2.2 about all the possible configurations. Line 1 is the case if there is no surfel between x and R, and line 2 is the contact area is homeomorphic to a sphere. In both cases, the algorithm returns false. The next step (between lines 3 and 6) consists in testing if the contact area is connected. The last step (between lines 7 and 10) is the test if the complementary of the contact area is connected, to detect if the surface has an hole or not. In both cases, the test consists in a depth first search algorithm through the concerned set of surfels by passing only through linels of the given set of linels. The algorithm returns false if it has not visited all the surfels, or if a linel is not incident to the set of surfels. Last, we have tested all the possible configurations, and we are sure that c(x, R) is a non empty connected set of surfels not homeomorphic to a sphere and without hole: it is homeomorphic to a disk and the algorithm returns true. Now by using these functions, Algo. 4 checks if a given voxel x is ML-simple for a region R.

Algorithm 4: Detection of ML-simple points

Data: voxel x ∈ X; region R. Result: true iff x is an ML-simple point for R. if not isDisk(c(x, R)) then return f alse;

The two first tests of this algorithm correspond directly to the two first conditions of Definition 3. For the last condition we have detailed the simple and add-simple notions.

First, to test if Y = s(x, O) is simple for Z = f (X, O), we use the first proposition recalled in Sect. 2: the complex Y is simple for X if and only if Y collapses onto Att(Y, Z). Att(Y, Z) is the set of linels and pointels that are incident both to Y and to Z Y. We consider only linels since pointels can be retrieved from linels (in our case each complex is closed). Thus, we have to test if Y collapses onto the set of linels incident both to Y and to Z Y.

Second, to test if Y = s(x, O) is add-simple for Z = f (R, O), we use the second proposition: Z ∪ Y collapses onto Z if and only if Y collapse onto Z ∩ Y. Since Z and Y have no common surfels, Z ∩ Y is the set of linels incident both to Y and Z (plus the pointels incident to these linels).

Thus, the two cases of simple and add-simple can be tested using Algo. 2 on the correct set of linels.

Proposition 4. Given a voxel x and a region R, Algo. 4 returns true iff x is an ML-simple point.

Proof. The first two tests check conditions (1) and (2). We test if c(x, R) and c(x, X) are homeomorphic to a disk by calling Algo. 3 on the set of surfels and linels respectively between x and R, and between x and X.

The last test checks condition (3): we use Algo. 2 that tests if a set of surfels can collapse on a set of linels. As explained above, the two tests are respectively equivalent to test if s(x, O) is simple for f (X, O), and if s(x, O) is addsimple for f (R, O).