Method and system for segmenting a 2d or 3D image

EP4751233A1Pending Publication Date: 2026-06-03MAIA MEDICAL TECHNOLOGIES

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
MAIA MEDICAL TECHNOLOGIES
Filing Date
2024-07-26
Publication Date
2026-06-03

AI Technical Summary

Technical Problem

Current methods for segmenting structures, such as bones, in 2D or 3D images, particularly in CT or CBCT images, face challenges in achieving accurate and precise segmentation due to human bias in manual methods, complexity and time consumption in semi-manual methods, and lower accuracy with automatic methods.

Method used

A computer-implemented method that involves obtaining an initial 2D/3D image, processing it to define a main outline and uncertainty zones, applying a graph cut algorithm using a graph with foreground and background seeds, and classifying pixels/voxels based on their distance to the main and second outlines to achieve refined segmentation.

Benefits of technology

The method provides a controlled, precise, and fair segmentation by considering multiple segmentations and applying reclassifications based on competent annotators' evaluations, resulting in improved accuracy and reduced uncertainty zones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024071239_30012025_PF_FP_ABST
    Figure EP2024071239_30012025_PF_FP_ABST
Patent Text Reader

Abstract

The invention relates to a computer implemented method for segmenting an image, comprising S0: obtaining a 2D / 3D initial image of a region of interest of an element including a structure (B); S1: processing the 2D / 3D initial image for initially segmenting the structure (B), the structure being delimited by a main outline (MO); S2: defining on the 2D / 3D image, a first area (A1) delimited by a first outline (1) including only pixel(s) / voxel(s) belonging to the structure (B) and a second area (A2) delimited by a second outline (2) around and outside the structure (B), the first area (A1) is obtained by reducing the main outline (MO) and the second area (A2) is obtained by expanding the main outline (MO); the main outline (MO) being located between the first outline (1) and the second outline (2), an uncertainty zone (UZ) being defined between the first outline (1) and the second outline (2), the uncertainty zone (UZ) comprising pixels / voxels to be classified as belonging to the structure (B) or not; S4: applying a graph cut algorithm on a graph where the pixels or voxels of the first area (A1) are foreground seeds and the pixels or voxels of the second area (A2) are the background seeds, for affecting each node of the graph to the foreground or the background, the foreground corresponding to the pixels / voxels of the structure (B) a second outline (RO) being defined as the boundary between the foreground and the background; S5: classifying the pixels / voxels of the 2D or 3D image according to their distance to the main outline and the second outline (RO) obtained at step S4 resulting in a refined segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] METHOD AND SYSTEM FOR SEGMENTING A 2D OR 3D IMAGE

[0002] FIELD OF THE INVENTION

[0003] The invention relates to a method and a system for segmenting a 2D or 3D image for instance of a subject, a patient, a structure. In particular, the 2D or 3D image contains a structure to be segmented, the structure being for instance a bone.

[0004] BACKGROUND OF THE INVENTION

[0005] In image processing, the segmentation consists in classifying each pixel or voxel of a 2D or 3D image as “in” (in the bone to be segmented) or “out” (outside the bone to be segmented).

[0006] A precise segmentation is desirable and needs to follow accurately the most visible outline of the object in the image.

[0007] For instance, in orthopedic surgery, bone segmentation in the images can be performed manually by an annotator, with the help of interactive annotation and image processing tools, and / or automatically by segmentation algorithms. More generally, any structure segmentation can be performed manually.

[0008] However, manual methods are inherently subject to human bias and are not very accurate, semi-manual methods are very complicated and time consuming. With automatic methods, gains in practicality and speed are offset by lower accuracy and / or genericity. Thus, these methods are not satisfactory for obtaining segmentation with accuracy and precision for segmenting structures for instance in Computed Tomography (CT) or Cone Beam Computed Tomography (CBCT) images.

[0009] BRIEF DESCRIPTION OF THE INVENTION

[0010] A goal of the invention is to provide a method for segmenting structures, in particular bones, in a 2D or 3D image, preferably in a CT or CBCT image.

[0011] According to a first aspect, the invention concerns a computer implemented method for segmenting an image, comprising

[0012] SO: obtaining a 2D / 3D initial image of a region of interest of an element including a structure;

[0013] S1 : processing the 2D / 3D initial image for initially segmenting the structure, the structure being delimited by a main outline;

[0014] S2: defining on the 2D / 3D image, a first area delimited by a first outline including only pixel(s) / voxel(s) belonging to the structure and a second area delimited by a second outline around and outside the structure, the first area is obtained by reducing the main outline and the second area is obtained by expanding the main outline; the main outline being located between the first outline and the second outline, an uncertainty zone being defined between the first outline and the second outline, the uncertainty zone comprising pixels / voxels to be classified as belonging to the structure or not;

[0015] S4: applying a graph cut algorithm on a graph where the pixels or voxels of the first area are foreground seeds and the pixels or voxels of the second area are the background seeds, for affecting each node of the graph to the foreground or the background, the foreground corresponding to the pixels / voxels of the structure a second outline being defined as the boundary between the foreground and the background;

[0016] S5: classifying the pixels / voxels of the 2D or 3D image according to their distance to the main outline and the second outline obtained at step S4 resulting in a refined segmentation.

[0017] The invention according to the first aspect may comprise by the following features, alone or in combination technically possible:

[0018] - the distance used at step S5 is an oriented Euclidean distance.

[0019] - the classification performed at step S5 is implemented according to the following rule: with P a pixel / voxel to be classified, D_IN and D_OUT are thresholds defining margins around the main outline (MO);

[0020] - it comprises a step of S3: defining a graph having nodes and edges connecting nodes, the nodes being the pixels / voxels of the 2D / 3D initial image, each foreground seed being connected to a source and each background seed being connected to a sink, each edge having a weight computed from pixels / voxels of the 2D / 3D initial image. - it comprises a step of S2’: obtaining an object outline metric image (M, M’, M”) the object outline metric image corresponding to the 2D / 3D initial image filtered for enhancing the contrast of the pixels / voxels of the uncertainty zone (UZ) relative to the other pixels / voxels.

[0021] - the object outline metric image (M) is defined as follows: where I is the 2D or 3D image, MO is the main outline and f is a function based on a Hessian image of the 2D / 3D initial image / , that is, an image of the Hessian matrix noted H containing all second-order derivatives of / on each pixel / voxel.

[0022] - it comprises a step of S3: defining a graph having nodes and edges connecting nodes, the nodes being the pixels / voxels of the object outline metric image, each foreground seed being connected to a source and each background seed being connected to a sink, each edge having a weight defined by 0.5, where / is the index of a voxel, j is the index of a neighbor of / , and xsare respectively the vectors of coordinates of the voxel / and J, Mt and Mj are the intensity of the pixel / voxel of the object outline metric image.

[0023] - the structure comprises at least one bone.

[0024] - the first area is obtained by reducing the main outline of an error margin and the second area is obtained by expanding the main outline of the error margin, the error margin being associated to the initial segmentation.

[0025] - the error margin is ±2 mm.

[0026] - the image is a CT or CBCT image.

[0027] - step S1 is implemented automatically for instance by processing the 2D or 3D image by a trained neural network.

[0028] - step S1 is implemented manually annotating individual voxels to collecting the machine learning inference of a trained neural network.

[0029] According to a second aspect, the invention concerns a data processing apparatus comprising a processor configured to perform the steps of the method of the first aspect of the invention.

[0030] According to third aspect, the invention concerns a computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out the steps of the method of the first aspect of the invention.

[0031] The invention permits to obtain a segmentation: - "Controlled" in the sense that it considers the result of at least two segmentations to identify pixels / voxels in as many categories as there are structures to segment, and an "unsure" category for pixels / voxels that may or may not belong to one or more structures to segment. The initial segmentation provides a model for each structure and the method checks their result against the visible boundary in the image to be segmented.

[0032] - "Precise" in the sense that the result is determined according to the most visible object boundary in the image (as defined by a mathematic function rather than depending on different evaluations by annotators), and cuts as short as possible in image areas with no visible boundary.

[0033] - "Fair" in the sense that, for each uncertain pixel / voxel, the method applies the reclassifications deemed best by several competent annotators, independent of the initial annotation.

[0034] The method can be adapted in different ways for images and initial segmentation methods with different characteristics. For example:

[0035] - The algorithms used for initial segmentation can be one or more inference models specific to the structures to be segmented, or a combination of statistical shape models on the location and shape of structures in the image. The combination of several models is particularly interesting when segmenting an image in which several structures are in contact, as it reduces the area of uncertainty for each of these structures (for bones, e.g., femur / patella).

[0036] - The graphcut cost function adapted to CBCT also works on CT and is adapted to 2D X-ray images.

[0037] To sum up, the method combines the precise boundaries objectively visible in the image to be segmented with one or more models of the structure to be segmented based on manual segmentation or a shape a priori or a training set. These provide a robust but coarse initial segmentation and, through various mathematical operations, a limited band of uncertainty in which the graphcut will determine a unique boundary. The method then determines the final classification of voxels according to their deviation from this boundary.

[0038] BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Further features and advantages of the invention will be apparent from the description that follows, based on the appended drawings, wherein:

[0040] Figure 1 illustrates steps of a method according to the invention;

[0041] Figure 2 illustrates two 2D images of a bone: on the left a 2D coronal slice, on the right a 2D sagittal slice; Figure 3 illustrates a 2D image comprising a region having a background, a foreground, a main outline and a second outline;

[0042] Figure 4 illustrates the 2D image of figure 2 filtered according to a second filtering process;

[0043] Figure 5 illustrates the 2D image of figure 2 filtered according to a third filtering process.

[0044] DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

[0045] The described method relates to a computer-implemented method for segmenting a 2D or 3D image of an element including a structure. The aim of the method is to segment a 2D or 3D image for highlighting one or many relevant structure(s) present in the 2D or 3D image.

[0046] Initial image

[0047] With reference to figure 1 and figure 2, this method comprises a step SO of obtaining an initial 2D or 3D image I of the element, the 2D or 3D image having been previously acquired by means of a well-known imaging system. The 2D or 3D initial image is a CT or CBCT image of a region of interest of the element including the structure. For instance, the 2D or 3D image is a medical image wherein the element is a bone B to be segmented. On figure 2 a CBCT image of a region of interest of a patient is shown, this image I comprises a vertebra (i.e. , a bone B): the left part shows a 2D coronal slice of a vertebra and the right part shows a 2D sagittal slice of a vertebra.

[0048] Initial segmentation

[0049] With reference to figure 3, in a step S1 , the initial 2D or 3D image is processed for first segmenting the structure and obtaining a main outline MO delimiting the structure B. This step S1 permits to roughly delimit the structure and can be implemented manually or automatically for instance by processing the 2D or 3D image by a trained neural network. Any known segmentation technique with any degree of automation, from manually annotating individual voxels to collecting the machine learning inference of a trained neural network, can also be used.

[0050] First area, second area, main outline

[0051] The main outline MO along with the initial 2D / 3D image is processed in a step S2 for defining on the 2D or 3D initial image / : - a first area A1 , delimited by a first outline 1 is inside the structure B and includes only pixels / voxels belonging to the structure B; and

[0052] - a second area A2 delimited by a second outline 2 around and outside the structure B.

[0053] Thus, the main outline MO is located between the first outline 1 and the second outline 2 and an uncertainty zone UZ is defined between the first outline 1 and the second outline 2, the uncertainty zone UZ comprising pixels / voxels to be classified as belonging to the structure B or not to refine the initial segmentation of step S1.

[0054] Thus, the uncertainty zone UZ is a zone comprising pixels / voxels to be re-segmented and advantageously depends on error margin of the initial segmentation in step S1.

[0055] According to an embodiment, the first area A1 is obtained by reducing the main outline MO and the second area A2 is obtained by expanding the main outline MO. In other words, the first area A1 is a reduction of the area delimited by the main outline and the second area A1 is an expansion of the area delimited by the main outline MO. Thus, the first area A1 includes pixels / voxels that belong surely to the structure B while the second area A2 includes pixels / voxels that surely do not belong to the structure B.

[0056] The first area A1 and the second area A2 can be defined by expanding or reducing the main outline MO of the error margin of the initial segmentation. The error margin is for instance ±2 mm in each dimension of the 2D or 3D image but may advantageously be different for expanding and reducing or depend on the size of pixels / voxels in each direction.

[0057] In other words, for defining this uncertainty zone UZ the first and second areas A1 , A2 can consider a margin error of the initial segmentation (step S1).

[0058] Alternatively, the first and second areas A1 , A2 depend on an error margin of the trained neural network that can be used in step S1. The neural network can output probabilities to allocate pixels or voxels to the structure and is used on image corresponding to the structure to be segmented. In that case, the error margins can be bounds on probability of belonging to the structure or to another class.

[0059] These are a characteristic of the segmentation method used in step S1 which is determined beforehand on a dataset and does not depend, or hardly depends, on the image obtained in step SO (it is however possible to establish characteristics of the initial segmentation of step S1 which are different for different datasets and determine which dataset the image obtained at step SO belongs to in order to choose the margins).

[0060] The error margins therefore correspond to defining a zone in which we are "sufficiently sure" that the segmentation is correct, and a zone in which reliability is insufficient. Filtering process

[0061] In an embodiment, the 2D / 3D initial image is filtered in a step S2’ for obtaining an object outline metric image, The object outline metric image corresponds to the

[0062] 2D / 3D initial image / filtered for enhancing the contrast of the pixels / voxels of the uncertainty zone UZ relative to the other pixels / voxels. As can be seen on figure 4 and figure 5, the 2D / 3D initial image I is filtered to better identify the different areas.

[0063] The filtering of the initial 2D / 3D image I can be made according to a first filtering process, according to a second filtering process or according to a third filtering process as described below.

[0064] First filtering process:

[0065] A first filtering process is based on process described in Frangi et al. (1998) and permits to obtain from the 3D initial image / , an object outline metric image M' which is a shape metric image adapted to object having tubular surface and is a function f applied to the initial image

[0066] In particular, this first filtering process is based on local information about the shape of structures in image I captured in a Hessian matrix noted H containing all second-order derivatives of / on each pixel / voxel and defined as follows:

[0067] The Hessian matrix measures the contrast level in any direction of each pixel / voxel. Notably, its eigenvalues (denoted A1;A2, A3) indicate the difference in intensity contrast along their associated eigenvectors.

[0068] Since, sanguine vessels in 3D images have a tubular shape, they derive from the eigenvectors a “vessel likeliness” metric that measures the likeliness of voxels to be located along tubular structures.

[0069] Second filtering process:

[0070] A second filtering process is based on process described in Krcah et al. (2011) and permits to obtain from the 3D initial image I , an object outline metric image M" which is a shape metric image adapted to object having planar surface. This process is a “bone boundary enhancement filter” for 3D CT images.

[0071] This second filtering process uses the eigenvalues of the Hessian matrix above: If3is large relative to and A2, this voxel is likely on a planar boundary (i.e., the cortical surface) that is oriented orthogonally to the third eigenvector.

[0072] The process of computing the object outline metric image M"

[0073] M" = f”(I) is called contrast-enhancing filtering because it results in an image in which the intensity contrast along the boundary of the desired structures within the image are accentuated. The result is illustrated on figure 4.

[0074] Third filtering process

[0075] A third filtering process implements features of the first filtering process and second filtering process.

[0076] However, one can note that the eigenvector associated with the largest eigenvalue of H locally defines the direction of maximum contrast and is used to compute M. This direction may have an arbitrary orientation with respect to the object of interest B.

[0077] On figure 5, the image M is a CBCT image in which the contrast at the bone border is accentuated and the range of the pixels is normalized. This image is defined as follows: where I is the 2D / 3D initial image, MO is the main outline and f is a function that combines three vector images as follows: i) a signed Euclidean distance field of the initial segmentation is calculated: each pixel / voxel of the corresponding image contains the Euclidean distance to the nearest pixel / voxel of the segmentation surface. This distance is negative inside the segmentation and positive outside. ii) The normalized gradient of this image is a first vector image n varying continuously and perpendicularly to the segmentation surface. iii) For each voxel, the singular value decomposition of the Hessian matric H is calculated to obtain the singular vector w associated with the smallest singular value. A 2nd vector image u is obtained by taking the vector product u = n x iv. This second vector image u contains the direction of maximum intensity variation in the local plane of the segmentation surface. iv) The third vector image v is obtained by the vector product v = n x u. Thus, an orthonormal basis (u, v,n) is defined such that u and v are in the plane of the surface and n is normal to the surface. v) These three vector images are combined to form the object outline metric image M as explained in the following. From each vector, we compute the directed contrasts: and use these values instead of the eigenvalues of H in the computation of the metric.

[0078] Thus, with this definition of the metric, the function f leverages not only the initial 2D / 3D image I (see first and second filtering process) but also the main outline MO to enhance the gradients orthogonal to the main outline MO as opposed to the outline of nearby, undesired objects which are frequently oriented in other directions. We thus exploit the main outline MO by taking the gradient of its Euclidean distance image (i.e., the image for which the value of each pixel / voxel is its Euclidean distance to the main outline MO).

[0079] Definition of the graph

[0080] The different areas (and possibly filtered image M, M’, M”) permit to define, in a step S3, a graph having nodes and edges connecting nodes, the nodes being the pixels / voxels of the 2D / 3D initial image, in addition to two “terminal” nodes called source and sink.

[0081] Next, a set of weighted edges connecting all nodes of the graph is defined. The segmentation of the image via the graphcut algorithm is obtained by removing (“cutting”) edges until the graph is partitioned into two unconnected sets of nodes. In this final state, the source node is directly or transitively connected to all nodes of one set and all nodes of the other set are directly or transitively connected to the sink ‘node.

[0082] Thus, the weight of an edge is a penalty associated with "cutting" the graph between these two nodes, in other words, considering the start node as foreground and the end node as background. A low weight indicates that the start node is a good foreground candidate, and the finish node is a good background candidate. In this context an edge is created between the source and each foreground seed pixel / voxel. The same applies to the sink and each background seed pixel / voxel. The weight associated with each of these edges is an arbitrarily large value (the largest possible floating-point number, for example). This has the effect that seed pixels / voxels are already segmented and their classification will not be modified by refinement.

[0083] Edges are created between each node / voxel and its neighboring nodes / voxels (six for 3D and four for 2D). The weight of each of these edges depends on the image considered (filtered or not).

[0084] The set of edge weights is noted W.

[0085] The boundary terms refer to weighted edges between neighbor pixel / voxel nodes where, for example: for all pairs of adjacent voxels indexed / and j.

[0086] The regional terms refer to weighted edges between a pixel / voxel node and a terminal (source or sink) node. Prior information from individual voxel intensity can be included in the regional term. For instance, CT images are in calibrated Hounsfield units, with a maximum value of 3071 , and cortical bones generally have an intensity larger than 300. Thus, the source-to-voxel node (with indices s and / , respectively) weight: encourages considering voxels with intensity larger than 300 as foreground. Edges between foreground / background seeds and source / sink nodes are another example of regional terms.

[0087] Alternatively, in case the 2D / 3D image is filtered the graph (see step S2') has nodes and edges connecting nodes, the nodes being the pixels / voxels of the object outline metric image, each foreground seed being connected to a source and each background seed being connected to a sink, each edge having a weight defined by > -0.5, where / is the index of a voxel, j is the index of a neighbor of / , xfand x7are respectively the vectors of coordinates of the voxel / and J, Mt and Mj are the intensity of the pixel / voxel of the object outline metric image, o is a normalization factor equal for example to 0.1. The edge weight is therefore low (close to 0) when the following conditions are satisfied: a) the pixel / voxel has a metric Mt much greater than the one of its neighbour; b) the edge is oriented relatively parallel to and in the same direction as the oriented normal segmentation surface obtained in step S1 , whose shape, beyond the zone of uncertainty, is deemed reliable. Otherwise, if these conditions are not met, the edge has a weight close to 1.

[0088] Regardless of whether the image is filtered or not for the graph, the pixels or voxels of the first area A1 are foreground seeds and the pixels or voxels of the second area A2 are the background seeds of the graph.

[0089] Graph cut algorithm

[0090] Once the graph is defined, a step S4 of applying a graph cut algorithm on the defined graph is implemented for obtaining a second outline RO to classify the pixels / voxels of the uncertainty zone UZ as belonging to the background or the foreground, the foreground corresponding to the pixels / voxels of the structure.

[0091] Thus, the graph cut algorithm, fully parameterized by edge weights, calculates the minimum graph cut, i.e. , the foreground / background partitioning of all nodes that minimizes the sum of the weights of all cut links, resulting in a second outline RO. The graphcut result permits to obtain a second segmentation of the 2D / 3D initial image.

[0092] Refined segmentation

[0093] The second outline RO is then used for classifying the pixels / voxels for obtaining a refined segmentation. In other words, it is useful to verify if the result of the second segmentation obtained in step S4 is relevant. To do that, in a step S5 a classification of the pixel / voxels according to their distance from the main outline MO and the second outline RO, obtained in step S4, into the structure, another structure not relevant or "unsure".

[0094] For example, for bone segmentations in CBCTs that are reviewed by practitioners, we compare the first segmentation of step S1 with the second segmentation of step S4 and distinguish at least three cases:

[0095] - The result of the second segmentation in step S4 confirms the initial segmentation

[0096] - The results are not far apart: in this case, the second segmentation is accepted.

[0097] - The results are very distant: in this case, the user is asked to confirm the initial segmentation, or to use the second segmentation.

[0098] Alternatively, one or more datasets can be annotated by several independent annotators to establish a consensus and characterize the probability that a pixel / voxel belongs to one of the classes as a function of its distance from each of the segmentations obtained in step S1 and S4.

[0099] In other words, step S5 consists in classifying the pixels / voxels of the 2D or 3D image according to their distance to the main outline and the second outline RO which is the boundary between the foreground and the background obtained at step S4.

[0100] According to an embodiment, the classification performed at step S5 is implemented according to the following rule: with P a pixel / voxel to be classified, D_IN and D_OUT are thresholds defining margins around the main outline MO. These thresholds correspond to probabilities levels that the second outline is the actual outline of structure B. D_IN and D_OUT can be the deviations below which the second outline is (almost) always better because: 1 / more visible in the image than the main outline MO and 2 / close enough to the boundary of the first segmentation not to be the boundary of another object or artifact.

[0101] For instance, D_IN=-1 pixel / voxel and D_OUT=2 pixels / voxels in each dimension of the 2D / 3D image.

[0102] The invention is not limited to the above-described method but also extends to a data processing apparatus comprising a processor configured to perform the steps of the abovedescribed method as well as to a computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out the steps of the above-described method.

[0103] REFERENCES

[0104] Frangi, Alejandro F., et al. "Multiscale vessel enhancement filtering." Medical Image Computing and Computer-Assisted Intervention — MICCAI’98: First International Conference Cambridge, MA, USA, October 11-13, 1998 Proceedings 1. Springer Berlin Heidelberg, 1998.

[0105] Krcah, Marcel, Gabor Szekely, and Remi Blanc. "Fully automatic and fast segmentation of the femur bone from 3D-CT images with no shape prior." 2011 IEEE international symposium on biomedical imaging: from nano to macro. IEEE, 2011.

Claims

CLAIMS1. Computer implemented method for segmenting an image, comprisingSO: obtaining a 2D / 3D initial image (I) of a region of interest of an element including a structure (B);S1 : processing the 2D / 3D initial image (I) for initially segmenting the structure (B), the structure being delimited by a main outline (MO);S2: defining on the 2D / 3D image (I), a first area (A1) delimited by a first outline (1) including only pixel(s) / voxel(s) belonging to the structure (B) and a second area (A2) delimited by a second outline (2) around and outside the structure (B), the first area (A1) is obtained by reducing the main outline (MO) and the second area (A2) is obtained by expanding the main outline (MO); the main outline (MO) being located between the first outline (1) and the second outline (2), an uncertainty zone (UZ) being defined between the first outline (1) and the second outline (2), the uncertainty zone (UZ) comprising pixels / voxels to be classified as belonging to the structure (B) or not;S4: applying a graph cut algorithm on a graph where the pixels or voxels of the first area (A1) are foreground seeds and the pixels or voxels of the second area (A2) are the background seeds, for affecting each node of the graph to the foreground or the background, the foreground corresponding to the pixels / voxels of the structure (B) a second outline (RO) being defined as the boundary between the foreground and the background;S5: classifying the pixels / voxels of the 2D or 3D image according to their distance to the main outline and the second outline (RO) obtained at step S4 resulting in a refined segmentation.

2. The method according to claim 1 , wherein the distance used at step S5 is an oriented Euclidean distance.

3. The method according to claims 1 to 2, wherein the classification performed at step S5 is implemented according to the following rule:with P a pixel / voxel to be classified, D_IN and D_OUT are thresholds defining margins around the main outline (MO).

4. The method according to claims 1 to 3, comprising a step of S3: defining a graph having nodes and edges connecting nodes, the nodes being the pixels / voxels of the 2D / 3D initial image, each foreground seed being connected to a source and each background seed being connected to a sink, each edge having a weight computed from pixels / voxels of the 2D / 3D initial image.

5. The method according to claims 1 to 3, comprising a step of S2’: obtaining an object outline metric image (M, M’, M”) the object outline metric image corresponding to the 2D / 3D initial image filtered for enhancing the contrast of the pixels / voxels of the uncertainty zone (UZ) relative to the other pixels / voxels.

6. The method according to claim 5, wherein the object outline metric image (M) is defined as follows:where I is the 2D or 3D image, MO is the main outline and f is a function based on a Hessian image of the 2D / 3D initial image / , that is, an image of the Hessian matrix noted H containing all second-order derivatives of / on each pixel / voxel.

7. The method according to claims 5 to 6, comprising a step of S3: defining a graph having nodes and edges connecting nodes, the nodes being the pixels / voxels of the object outline metric image, each foreground seed being connected to a source and each background seed being connected to a sink, each edge having a weight defined bywhere / is the index of a voxel, j is the index of a neighbor of / ,and xsare respectively the vectors of coordinates of the voxel / and J, Mt and Mj are the intensity of the pixel / voxel of the object outline metric image.

8. The method according to claims 1 to 7, wherein the structure comprises at least one bone.

9. The method according to claims 1 to 8, wherein the first area is obtained by reducing the main outline of an error margin and the second area is obtained by expanding the main outline of the error margin, the error margin being associated to the initial segmentation.

10. The method according to claim 9, wherein the error margin is ±2 mm.11 . The method according to claims 1 to 10, wherein the image is a CT or CBCT image.

12. The method according to claims 1 to 11 , wherein step S1 is implemented automatically for instance by processing the 2D or 3D image by a trained neural network.

13. The method according to claims 1 to 11 , wherein step S1 is implemented manually annotating individual voxels to collecting the machine learning inference of a trained neural network.

14. Data processing apparatus comprising a processor configured to perform the steps of the method of claims 1 to 11.

15. A computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out the steps of the method of any one of claims 1 to 13.