A three-dimensional mesh model generation method, device, storage medium and electronic device
By repairing and excision of the initial three-dimensional grid model, the expected effect after resection is generated, and the problem that the existing technology cannot pre-construct the human structure information after surgical changes is solved, and convenient resection simulation tools are provided, which improves the User experience.
Patent Information
- Application Number
- CN202410903991.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The prior art cannot construct the human structure information after the surgery changes in advance, resulting in users being unable to accurately understand the expected effects after the surgery, affecting the user experience.
By obtaining the initial three-dimensional grid model, topological defect repair, target resection area is determined, and Boolean and non-resection treatment is performed to generate a three-dimensional grid model after resection, providing resection surgery simulation, and feedback the expected results in advance.
Provide users with convenient and real-time resection simulation tools, allowing users to preview the execution effect of the surgical plan conveniently, quickly and accurately, and improve user experience.
Smart Images

Figure CN118447188B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a three-dimensional mesh model generation method, device, storage medium and electronic device. Background Art
[0002] 3D reconstruction technology is a process of converting two-dimensional images or sensor data into a three-dimensional model to create a three-dimensional representation of an object, scene or environment.
[0003] At present, three-dimensional reconstruction of medical images is performed before surgery through three-dimensional reconstruction technology in computer vision and computer graphics. Specifically, the human body structure information is generated into a three-dimensional model from two-dimensional medical images, providing users with richer and more intuitive human body structure information.
[0004] However, this three-dimensional reconstruction method can only generate a three-dimensional model from two-dimensional medical images using existing human body structure information. It is unable to pre-construct the human body structure information after surgical changes, which will result in users being unable to accurately understand the expected effects after the surgery, thus affecting the user experience. Summary of the invention
[0005] In view of this, the present application provides a three-dimensional mesh model generation method, device, storage medium and electronic device, the main purpose of which is to improve the current existing technology that can only generate a three-dimensional model from the existing human body structure information from the two-dimensional medical image, and cannot pre-construct the human body structure information after the surgical change, which will cause the user to be unable to accurately understand the expected effect after the operation, thereby affecting the technical problem of user experience.
[0006] In a first aspect, the present application provides a method for generating a three-dimensional mesh model, comprising:
[0007] Obtain an initial three-dimensional mesh model;
[0008] Performing topological defect repair on the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be cut off, wherein the three-dimensional mesh model to be cut off has a preset manifold topological property;
[0009] Determining at least one target resection area corresponding to the initial three-dimensional mesh model;
[0010] The three-dimensional mesh model to be cut off is subjected to Boolean and non-cutting processing in sequence according to the at least one target cut-off area to generate a three-dimensional mesh model after the cut-off.
[0011] In a second aspect, the present application provides a three-dimensional mesh model generation device, comprising:
[0012] An acquisition module is configured to acquire an initial three-dimensional mesh model;
[0013] A repair module is configured to repair topological defects of the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be cut off, wherein the three-dimensional mesh model to be cut off has a preset manifold topological property;
[0014] A determination module, configured to determine at least one target resection area corresponding to the initial three-dimensional mesh model;
[0015] The generating module is configured to perform Boolean and non-cutting processing on the three-dimensional mesh model to be cut off in sequence according to the at least one target cut-off area, so as to generate a three-dimensional mesh model after the cut-off.
[0016] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the three-dimensional mesh model generation method of the first aspect.
[0017] In a fourth aspect, the present application provides an electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the three-dimensional mesh model generation method of the first aspect when executing the computer program.
[0018] By means of the above technical scheme, the present application provides a method, device, storage medium and electronic device for generating a three-dimensional mesh model, firstly obtaining an initial three-dimensional mesh model; performing topological defect repair on the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be removed, wherein the three-dimensional mesh model to be removed has a preset manifold topological property; determining at least one target removal area corresponding to the initial three-dimensional mesh model; performing Boolean and non-resection processing on the three-dimensional mesh model to be removed in turn according to the at least one target removal area, and generating a three-dimensional mesh model after removal. Compared with the current prior art, the present application repairs the topological defects of the three-dimensional mesh model to obtain a three-dimensional network model to be removed that can be removed, determines at least one target removal area, accurately inputs the removal area through simple interactive operations, removes at least one target removal area in turn on the basis of the three-dimensional network model to be removed, and calculates the three-dimensional model after removal of these areas, so as to simulate the removal surgery on the three-dimensional mesh model of the human anatomical structure, generate the expected effect after removal in advance, and can feedback to the user for preview, so as to provide a convenient and real-time removal simulation tool for the removal surgery planning, thereby allowing the user to conveniently, quickly and accurately preview the execution effect of the surgical plan, assist the user in surgical planning, and improve the user experience.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 A schematic diagram of a process for generating a three-dimensional mesh model provided in an embodiment of the present application is shown;
[0023] Figure 2 A schematic diagram of a process for generating a three-dimensional mesh model provided in an embodiment of the present application is shown;
[0024] Figure 3 A schematic diagram showing an example provided by an embodiment of the present application;
[0025] Figure 4 A schematic diagram showing an example provided by an embodiment of the present application;
[0026] Figure 5 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0027] Figure 6 A schematic structural diagram of a three-dimensional mesh model generating device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0029] In order to improve the technical problem that the existing technology can only generate a three-dimensional model from the existing human body structure information from the two-dimensional medical image, but cannot pre-construct the human body structure information after the operation, which will cause the user to be unable to accurately understand the expected effect after the operation, thereby affecting the user experience. This embodiment provides a three-dimensional mesh model generation method, such as Figure 1 As shown, the method includes:
[0030] Step 101: Obtain an initial three-dimensional mesh model.
[0031] In an embodiment of the present application, the initial three-dimensional mesh model is a three-dimensional reconstruction based on medical images, and a three-dimensional stereoscopic model is generated from two-dimensional medical images.
[0032] Correspondingly, mesh models, as one of the representation methods of 3D reconstruction results, are often used in scenes that require clear anatomical boundaries, such as 3D reconstruction of human structures such as thoracic organs, abdominal organs, and urinary system.
[0033] Step 102: repairing the topological defects of the initial three-dimensional mesh model to obtain the three-dimensional mesh model to be cut off.
[0034] The three-dimensional mesh model to be cut off has a preset manifold topological property.
[0035] In some examples, topology repair is an important concept in the fields of computer graphics, 3D modeling, computer-aided design (CAD), and computer vision, which involves identifying and correcting geometric or topological errors in 3D models to ensure that the model is watertight, continuous, has no self-intersections, no dangling edges, and has correct connections. These errors may be caused by errors in the model creation, conversion, scanning, or data transmission process.
[0036] Specifically, topological defect types may include: Holes, Dangling Edges, Self-Intersections, Non-manifold Geometry, Overlap, and Inconsistent Normals. Holes are holes that should not exist inside the model and need to be filled or closed; Dangling Edges are edges or vertices that are not correctly connected; Self-intersections are parts of the model that intersect with itself; Non-manifolds are structures that do not conform to the definition of manifolds, such as disconnected boundaries or more than two faces sharing a boundary; Overlapping Edges are overlapping faces or edges; Inconsistent Normals are incorrect surface normal vectors.
[0037] Accordingly, repair methods can include using automatic repair tools such as MeshFixup, MeshLab, AutodeskMeshmixer, Netfabb Studio built-in automatic identification and repair algorithms; manual editing, specifically by manually selecting errors and repairing them in professional software such as Blender, Maya, and 3ds Max; filling holes based on algorithms such as boundary detection, loop cutting, edge flipping, and bridging algorithms; based on smoothing, after reducing model noise, small defects may be exposed or reduced; resampling (Remeshing) to reconstruct the surface, sometimes as a last resort, to rebuild the model, especially when the original data is severely damaged; topological simplification (Simplification) to reduce complexity while trying to maintain the shape, sometimes it can naturally repair errors. Repairing topological defects is not only a need for aesthetics and presentation, but also the basis for subsequent manufacturing, simulation, analysis, reverse engineering, rendering and other applications. High-quality models ensure data accuracy and processing reliability.
[0038] It should be noted that the preset manifold topological property can be a topological property of 2-manifold watertightness. Specifically, manifold is an important concept, and watertightness is a topological property that describes a manifold. Manifold watertightness means that the manifold has no gaps or holes in topology, and is continuous and complete. Specifically, an n-dimensional manifold is a topological space that locally looks like Euclidean space. For example, if you zoom in on a small area, it looks like a flat rectangular space, although the whole may be curved or have a more complex global structure. Manifolds can be open, closed, bounded or unbounded, and can also have additional structures such as differential forms or Riemann forms. An n-dimensional manifold is watertight, and there is no point that can be regarded as an "edge" and cannot "leak" out. This property ensures that the manifold is continuous and closed, without openings or breakpoints, and is an ideal basis for mathematical analysis and geometric operations, such as integration, defining differential forms, and homology of manifolds.
[0039] Step 103: Determine at least one target resection region corresponding to the initial three-dimensional mesh model.
[0040] In this embodiment, the target resection area is an area that needs to be resected based on the initial three-dimensional mesh model.
[0041] Step 104 : performing Boolean AND non-cutting processing on the three-dimensional mesh model to be cut off in sequence according to at least one target cut-off region to generate a three-dimensional mesh model after cutting off.
[0042] In the embodiment of the present application, "AND" and "NOT" are two basic Boolean operators. The "AND" operator indicates that the output is true only when both inputs are true (1); the "NOT" operator inverts the input value, true becomes false, and false becomes true. If you want to express "AND NOT", you may want to say a concept similar to "NOT (A AND NOT B)", which is actually equivalent to "A OR B" (or logic), which is a logic that the result is true if at least one of the two inputs is true.
[0043] Exemplarily, performing Boolean AND non-cutting processing on the three-dimensional mesh model to be cut according to at least one target cut-off region in turn can be to determine whether there is an intersection between the at least one target cut-off region and the three-dimensional mesh model to be cut off, and if so, subtract the intersection.
[0044] Compared with the current existing technology, this embodiment repairs the topological defects of the three-dimensional mesh model to obtain a three-dimensional network model to be resected, determines at least one target resection area, accurately inputs the resection area through simple interactive operations, and sequentially resects at least one target resection area based on the three-dimensional network model to be resected, calculates the three-dimensional model after resection of these areas, and can simulate the resection surgery on the three-dimensional mesh model of the human anatomical structure, generate the expected effect after resection in advance, and feed it back to the user for preview, thereby providing a convenient and real-time resection simulation tool for resection surgery planning, thereby allowing the user to conveniently, quickly and accurately preview the execution effect of the surgical plan, assisting the user in surgical planning, and improving the user experience.
[0045] In order to further illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 2 The specific method shown includes:
[0046] Step 201: Obtain an initial three-dimensional mesh model.
[0047] Exemplarily, a user A for whom a three-dimensional model needs to be constructed is determined, a two-dimensional image of user A is constructed, and an initial three-dimensional model A corresponding to user A is generated.
[0048] Step 202: divide the initial three-dimensional mesh model to obtain a plurality of substructures that meet preset division conditions.
[0049] Among them, multiple substructures are not connected to each other.
[0050] In an embodiment of the present application, the preset division condition is that the multiple substructures obtained by division are the minimum division substructures corresponding to the initial three-dimensional mesh model. Specifically, the three-dimensional mesh model is divided into independent minimum substructures, which usually refers to decomposing a complex three-dimensional geometric model into multiple independent simple components or units.
[0051] Specifically, it can be completed through methods such as mesh segmentation, voxel decomposition, connected component analysis, boundary representation, topology optimization and simplification. Specifically, mesh segmentation is the process of dividing a complex mesh model into multiple meaningful or uniform small pieces. This can be achieved through different algorithms, such as segmentation based on geometric features (such as surface curvature changes, boundary detection), clustering algorithms (such as K-means, DBSCAN), waterline segmentation, etc. After segmentation, each part can be regarded as an unconnected structure; voxel decomposition is to convert the three-dimensional model into a voxel (three-dimensional pixel) grid format, and each voxel can be regarded as an independent minimum structure. Depending on the size of the voxel, the model can be finely or coarsely segmented, and the voxels are not connected by default; connected component analysis is to identify unconnected parts in a graph or mesh, that is, to find all directly connected vertices or faces through an algorithm, and the remaining ones are independent structures. This is often used to detect broken models, denoise, clean up or separate independent objects; boundary representation is to convert the model into a boundary representation (such as B-rep), which allows the model to be represented as a series of faces and boundaries, which is easy to analyze and split into independent faces or bodies; topology optimization and simplification is to remove redundant materials while maintaining the overall shape and function of the model. The resulting structure is often the smallest unit that is not connected to each other. The choice of these methods depends on application requirements, such as whether fidelity, computational efficiency, memory limitations, processing complexity or the ultimate goal (such as physical simulation, rendering, analysis). In actual operation, multiple techniques may be combined, such as segmentation followed by optimization or simplification, and then processing according to specific needs.
[0052] Step 203: repair the topological defects of the multiple substructures respectively, so that the repaired multiple substructures have preset manifold topological properties, and generate a three-dimensional mesh model to be cut off.
[0053] Optionally, after step 203, the method of this embodiment further includes: converting the three-dimensional mesh model to be cut off into a manifold form to obtain a manifold three-dimensional mesh model to be cut off, and storing the manifold three-dimensional mesh model to be cut off.
[0054] Exemplarily, based on step 201, the initial three-dimensional model A is divided to obtain multiple substructures B, and topological defects of each substructure B are repaired respectively, so that the repaired multiple substructures have a 2-manifold watertight topological property, and the three-dimensional mesh model C to be cut off is obtained. The three-dimensional mesh model C to be cut off is converted to obtain a manifold three-dimensional mesh model D to be cut off, and the manifold three-dimensional mesh model D to be cut off is stored.
[0055] Step 204: Determine at least one target resection region corresponding to the initial three-dimensional mesh model.
[0056] Optionally, step 204 may specifically include: obtaining a two-dimensional image corresponding to the initial three-dimensional mesh model, and determining a target resection point in the two-dimensional image; matching the target resection point in the initial three-dimensional mesh model, and generating at least one target resection area corresponding to the target resection point; determining a manifold three-dimensional closure corresponding to each target resection area, and storing at least one manifold three-dimensional closure.
[0057] Among them, the target resection points corresponding to the initial three-dimensional mesh model are not coplanar with each other.
[0058] For this embodiment, based on step 203, to determine the target resection area, it is necessary to determine the target resection point on the two-dimensional image, correspond the target resection point to the initial three-dimensional grid image A, generate and store the three-dimensional closure corresponding to each resection area.
[0059] Step 205 : performing Boolean and non-cutting processing on the three-dimensional mesh model to be cut off in sequence according to at least one target cut-off region to generate a three-dimensional mesh model after the cut-off.
[0060] Optionally, step 205 may specifically include: for the first resection process, determining the manifold three-dimensional closure corresponding to the first resection and the BVH tree corresponding to the three-dimensional mesh model to be resected; based on the BVH tree corresponding to the three-dimensional mesh model, performing a resection process on the manifold three-dimensional closure corresponding to the first resection in the manifold three-dimensional mesh model to be resected through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the first resection.
[0061] In an embodiment of the present application, a bounding volume hierarchy (BVH) is an efficient data structure for accelerating spatial queries in fields such as computer graphics, robotics, computer vision, and machine learning, especially collision detection and coverage testing for objects or geometric bodies in three-dimensional space.
[0062] Specifically, a BVH tree is a binary tree in which each node is associated with an axis-aligned bounding box (usually an axis-aligned bounding box, such as an AABB or OBB), which contains at least the bounding boxes of all child nodes of the node. The root node of the tree usually encloses the entire scene or data set. During the construction process, a split plane is selected to divide the bounding box space of the current node into two parts, usually based on some heuristic, such as maximizing the volume balance of child nodes, minimizing the surface area ratio, minimizing the SAH separation surface, etc., to optimize performance. Each subspace is further split recursively until a preset threshold is reached or a termination condition is met, such as reaching a leaf node that contains only a single object or a minimum number of objects. Query operations such as collision detection or nearest neighbor search can be performed, starting from the root node, using the intersection test of the bounding box to quickly exclude branches that are unlikely to have intersections, and only go deep into subtrees that may have intersections, greatly reducing the search space. BVH trees can be dynamic and can be updated by inserting or deleting nodes as the data set changes, although this is usually more complicated than static construction.
[0063] Exemplarily, based on step 204, during the first resection, it is necessary to determine the three-dimensional closure of the manifold corresponding to the first resection and the BVH tree corresponding to the three-dimensional mesh model to be resected, and perform Boolean AND NOT operations to perform resection. During the operation, optimization is performed based on intermediate data structures such as BVH trees. The intersection judgment of the manifold to be calculated and the point set closure will be performed first, and non-intersecting structures will not enter the actual calculation steps to save computing performance.
[0064] In some examples, step 205 specifically also includes: for other resection processes except the first one, determining the BVH tree corresponding to the manifold three-dimensional closure of the current resection and the manifold three-dimensional mesh model obtained by the previous resection; based on the BVH tree corresponding to the manifold three-dimensional mesh model obtained by the previous resection, performing a resection process on the manifold three-dimensional closure corresponding to the current resection in the manifold three-dimensional mesh model obtained by the previous resection through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the current resection.
[0065] For example, in a process where multiple resections are required, it is necessary to determine the BVH tree corresponding to the manifold three-dimensional mesh model obtained in the previous resection and the manifold three-dimensional closure that needs to be cut off in this resection, perform Boolean and non-resection processing, and obtain the manifold three-dimensional mesh model required for the next resection.
[0066] For this embodiment, after step 205, the method of this embodiment also includes: comparing the manifold three-dimensional mesh model obtained after resection with the manifold three-dimensional mesh model to be resected, and determining an updated model area corresponding to the manifold three-dimensional mesh model to be resected; meshing the updated model area, updating the initial three-dimensional mesh model according to the updated model area after meshing, and generating a three-dimensional mesh model after resection.
[0067] The cut-off three-dimensional mesh model is used for display in a preset visualization interface.
[0068] It should be noted that after each resection operation, the current result manifold needs to be partially converted into a mesh model and transferred to the visualization interface, such as Figure 3 and Figure 4 The figure below is a comparison of the before and after resection (such as the visualization interface of the front-end or overall software under the front-end and back-end separation architecture). In order to reduce the bandwidth for copying and transmission, although the Boolean operation is performed on the entire scene, the structures that do not intersect with the closure of the point set input at that time do not participate in the calculation, and the corresponding result manifolds of these structures after the current operation will not enter the subsequent meshing, transmission and scene update process. The mesh models before and after the operation are distinguished by structure ID and other methods. After each operation result is returned to the visualization interface, only the structure ID contained in the result is replaced to reduce the performance consumption of scene update.
[0069] Compared with the current existing technology, this embodiment repairs the topological defects of the three-dimensional mesh model to obtain a three-dimensional network model to be resected, determines at least one target resection area, accurately inputs the resection area through simple interactive operations, and sequentially resects at least one target resection area based on the three-dimensional network model to be resected, calculates the three-dimensional model after resection of these areas, and can simulate the resection surgery on the three-dimensional mesh model of the human anatomical structure, generate the expected effect after resection in advance, and provide real-time feedback to the user for preview, thereby providing a convenient and real-time resection simulation tool for resection surgery planning, thereby allowing the user to conveniently, quickly and accurately preview the execution effect of the surgical plan, assisting the user in surgical planning, and improving the user experience.
[0070] In order to illustrate the specific implementation process of this embodiment, the following specific application examples are given: Figure 5 As shown, but not limited to:
[0071] First, the mesh model obtained by 3D reconstruction is topologically repaired. Specifically, the 3D mesh model is first divided into unconnected minimum substructures. For each substructure, their topological defects (including holes, self-intersections, non-2-manifold edges, etc.) are repaired so that each substructure satisfies the 2-manifold watertight topological property. Then, the correspondence between the repaired structure and the pre-repaired structure is saved, or the repaired structure is directly used to replace the pre-repaired structure, finally forming a mesh model with good topology.
[0072] Accept user input and generate a well-defined resection area, then perform mesh model Boolean operations to generate a resection model, specifically including: converting the obtained topologically well-defined mesh model into a manifold storage form, or directly using the generated topologically well-defined manifold as an intermediate result, and calculating the BVH tree of the mesh model to optimize and facilitate subsequent calculations. Then the user clicks on several points on the two-dimensional layer or other two-dimensional representation of the original medical image. These points are mapped to the three-dimensional space through the physical information of the medical image, and it is required that these points are not all coplanar. Define the simulated resection area as the three-dimensional closure of these points, so that there is no ambiguity in the correspondence between the user input and the three-dimensional semantics, and the resection area of any shape can be defined through multiple operations that are not affected by the order. After each user input is completed, the point set closure of the current input is converted into a manifold storage form, and then the result manifold obtained from the previous operation (or the initial) is used to perform a Boolean AND NOT (i.e., subtraction) operation with the manifold generated by this point set to obtain the result manifold after excluding the point set area. The calculation process is optimized based on intermediate data structures such as BVH trees. The intersection judgment will be performed on the manifold to be calculated and the point set closure first. Non-intersecting structures will not enter the actual calculation steps to save computing performance, and the results of the intersection judgment will be saved for subsequent use.
[0073] The results are simplified and the result data is transmitted to the presentation layer with lower transmission bandwidth requirements. Specifically, after each user input and operation, the current result manifold is partially converted into a mesh model and transmitted to the visualization interface (such as the visualization interface of the front-end or overall software under the front-end and back-end separation architecture). In order to reduce the bandwidth for copying and transmission, although the Boolean operation is performed on the entire scene, the structure that does not intersect with the closure of the input point set does not participate in the calculation (as described in step 2), and the corresponding result manifolds of these structures after the current operation will not enter the subsequent meshing, transmission and scene update process. The mesh models before and after the operation are distinguished by means of structure ID, etc. After each operation result is returned to the visualization interface, only the structure ID contained in the result is replaced to reduce the performance consumption of scene update.
[0074] Compared with the current existing technology, this embodiment repairs the topological defects of the three-dimensional mesh model to obtain a three-dimensional network model to be resected, determines at least one target resection area, accurately inputs the resection area through simple interactive operations, and sequentially resects at least one target resection area based on the three-dimensional network model to be resected, calculates the three-dimensional model after resection of these areas, and can simulate the resection surgery on the three-dimensional mesh model of the human anatomical structure, generate the expected effect after resection in advance, and provide real-time feedback to the user for preview, thereby providing a convenient and real-time resection simulation tool for resection surgery planning, thereby allowing the user to conveniently, quickly and accurately preview the execution effect of the surgical plan, assisting the user in surgical planning, and improving the user experience.
[0075] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a three-dimensional mesh model generation device, such as Figure 6 As shown, the device includes: an acquisition module 31, a repair module 32, a determination module 33, and a generation module 34.
[0076] An acquisition module 31 is configured to acquire an initial three-dimensional mesh model;
[0077] A repair module 32 is configured to repair topological defects of the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be removed, wherein the three-dimensional mesh model to be removed has a preset manifold topological property;
[0078] A determination module 33 is configured to determine at least one target resection area corresponding to the initial three-dimensional mesh model;
[0079] The generating module 34 is configured to perform Boolean and non-cutting processing on the three-dimensional mesh model to be cut off in sequence according to the at least one target cut-off area, so as to generate a three-dimensional mesh model after the cut-off.
[0080] In some examples of the present embodiment, the repair module 32 is specifically configured to divide the initial three-dimensional mesh model to obtain a plurality of substructures that meet preset division conditions, wherein the plurality of substructures are not connected to each other; and to perform topological defect repair on the plurality of substructures respectively so that the repaired plurality of substructures have the preset manifold topological properties, thereby generating the three-dimensional mesh model to be removed.
[0081] In some examples of this embodiment, the repair module 32 is further configured to convert the three-dimensional mesh model to be resected into a manifold form to obtain a manifold three-dimensional mesh model to be resected, and store the manifold three-dimensional mesh model to be resected.
[0082] In some examples of this embodiment, the determination module 33 is specifically configured to obtain a two-dimensional image corresponding to the initial three-dimensional mesh model, determine the target resection points in the two-dimensional image, wherein the target resection points corresponding to the initial three-dimensional mesh model are not coplanar with each other; correspond the target resection points in the initial three-dimensional mesh model to generate at least one target resection area corresponding to the target resection points; determine the manifold three-dimensional closure corresponding to each target resection area, and store at least one manifold three-dimensional closure.
[0083] In some examples of the present embodiment, the generation module 34 is specifically configured to determine, for the first resection process, the manifold three-dimensional closure corresponding to the first resection and the BVH tree corresponding to the three-dimensional mesh model to be resected; based on the BVH tree corresponding to the three-dimensional mesh model, the manifold three-dimensional closure corresponding to the first resection is resected in the manifold three-dimensional mesh model to be resected through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the first resection.
[0084] In some examples of the present embodiment, the generation module 34 is further specifically configured to determine, for other resection processes except the first one, the BVH tree corresponding to the manifold three-dimensional closure corresponding to the current resection and the manifold three-dimensional mesh model obtained by the previous resection; based on the BVH tree corresponding to the manifold three-dimensional mesh model obtained by the previous resection, the manifold three-dimensional closure corresponding to the current resection is resected in the manifold three-dimensional mesh model obtained by the previous resection through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the current resection.
[0085] In some examples of the present embodiment, the generation module 34 is further specifically configured to compare the manifold three-dimensional mesh model obtained after resection with the manifold three-dimensional mesh model to be resected, and determine an updated model region corresponding to the manifold three-dimensional mesh model to be resected; mesh the updated model region, and update the initial three-dimensional mesh model according to the updated model region after meshing to generate the three-dimensional mesh model after resection, which is used to be displayed in a preset visualization interface.
[0086] It should be noted that for other corresponding descriptions of the functional units involved in the three-dimensional mesh model generation device provided in this embodiment, please refer to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0087] Based on the above Figure 1 to Figure 2 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 to Figure 2 The method shown.
[0088] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0089] Based on the above Figure 1 to Figure 2 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a personal computer, a server, a laptop computer, a smart phone, an intelligent robot or other intelligent terminal, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 to Figure 2 The method shown.
[0090] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0091] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0092] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0093] Based on the above Figure 1 to Figure 2 The present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned Figure 1 to Figure 2 The method shown, the method implemented when the computer program is executed by the processor can refer to the various embodiments of the present application, and will not be described in detail here.
[0094] Through the description of the above implementation methods, the technical personnel in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. Compared with the current existing technology, this embodiment repairs the topological defects of the three-dimensional mesh model to obtain a three-dimensional network model to be resected, determines at least one target resection area, accurately inputs the resection area through simple interactive operations, and sequentially resects at least one target resection area on the basis of the three-dimensional network model to be resected, calculates the three-dimensional model after resection of these areas, and can simulate the resection surgery on the three-dimensional mesh model of the human anatomical structure, generate the expected effect after resection in advance, and can feed back to the user for preview, providing a convenient and real-time resection simulation tool for resection surgery planning, thereby allowing the user to conveniently, quickly and accurately preview the execution effect of the surgical plan, assist the user in surgical planning, and improve the user experience.
[0095] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0096] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A three-dimensional mesh model generation method, characterized in that: include: Obtain an initial three-dimensional mesh model; Performing topological defect repair on the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be cut off, wherein the three-dimensional mesh model to be cut off has a preset manifold topological property; Determining at least one target resection area corresponding to the initial three-dimensional mesh model; According to the at least one target resection area, the three-dimensional mesh model to be resected is subjected to Boolean and non-resection processing in sequence to generate a three-dimensional mesh model after resection, including: for a first resection process, determining a manifold three-dimensional closure corresponding to the first resection and a bounding box hierarchy BVH tree corresponding to the three-dimensional mesh model to be resected; Based on the BVH tree corresponding to the three-dimensional mesh model, the manifold three-dimensional closure corresponding to the first resection is resected in the manifold three-dimensional mesh model to be resected through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the first resection; for other resection processes except the first one, the BVH tree corresponding to the manifold three-dimensional closure corresponding to the current resection and the manifold three-dimensional mesh model obtained by the previous resection is determined; based on the BVH tree corresponding to the manifold three-dimensional mesh model obtained by the previous resection, the manifold three-dimensional closure corresponding to the current resection is resected in the manifold three-dimensional mesh model obtained by the previous resection through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the current resection.
2. The method according to claim 1, characterized in that The step of repairing the topological defects of the initial three-dimensional mesh model to obtain the three-dimensional mesh model to be cut off includes: Dividing the initial three-dimensional mesh model to obtain a plurality of substructures satisfying a preset division condition, wherein the plurality of substructures are not connected to each other; Topological defects of the plurality of substructures are repaired respectively, so that the repaired plurality of substructures have the preset manifold topological properties, and the three-dimensional mesh model to be removed is generated.
3. The method according to claim 2, characterized in that After the topological defects of the plurality of substructures are repaired respectively so that the repaired plurality of substructures have the preset manifold topological properties and the three-dimensional mesh model to be cut is generated, the method further includes: The three-dimensional mesh model to be cut off is converted into a manifold form to obtain a manifold three-dimensional mesh model to be cut off, and the manifold three-dimensional mesh model to be cut off is stored.
4. The method according to claim 3, characterized in that The determining of at least one target resection area corresponding to the initial three-dimensional mesh model comprises: Acquire a two-dimensional image corresponding to the initial three-dimensional mesh model, and determine target resection points in the two-dimensional image, wherein the target resection points corresponding to the initial three-dimensional mesh model are not coplanar with each other; Matching the target resection point in the initial three-dimensional mesh model to generate at least one target resection area corresponding to the target resection point; The manifold three-dimensional closure corresponding to each target resection area is determined, and at least one manifold three-dimensional closure is stored.
5. The method according to claim 1, characterized in that The method further comprises: Comparing the manifold three-dimensional mesh model obtained after the excision with the manifold three-dimensional mesh model to be excised, and determining an updated model region corresponding to the manifold three-dimensional mesh model to be excised; The updated model region is meshed, and the initial three-dimensional mesh model is updated according to the updated model region after meshing to generate the resected three-dimensional mesh model, which is used for display in a preset visualization interface.
6. A three-dimensional mesh model generation device, characterized in that: include: An acquisition module is configured to acquire an initial three-dimensional mesh model; A repair module is configured to repair topological defects of the initial three-dimensional mesh model to obtain a three-dimensional mesh model to be cut off, wherein the three-dimensional mesh model to be cut off has a preset manifold topological property; A determination module, configured to determine at least one target resection area corresponding to the initial three-dimensional mesh model; A generating module is configured to perform Boolean and non-cutting processing on the three-dimensional mesh model to be cut according to the at least one target cut-off area in turn to generate a three-dimensional mesh model after cutting, including: for a first cutting process, determining a manifold three-dimensional closure corresponding to the first cutting and a bounding box hierarchy BVH tree corresponding to the three-dimensional mesh model to be cut; Based on the BVH tree corresponding to the three-dimensional mesh model, the manifold three-dimensional closure corresponding to the first resection is resected in the manifold three-dimensional mesh model to be resected through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the first resection; for other resection processes except the first one, the BVH tree corresponding to the manifold three-dimensional closure corresponding to the current resection and the manifold three-dimensional mesh model obtained by the previous resection is determined; based on the BVH tree corresponding to the manifold three-dimensional mesh model obtained by the previous resection, the manifold three-dimensional closure corresponding to the current resection is resected in the manifold three-dimensional mesh model obtained by the previous resection through Boolean AND NOT operations to obtain the manifold three-dimensional mesh model after the current resection.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
