CN110956698B - Method, system and electronic device for generating tumor in blood vessel digital model - Google Patents
Method, system and electronic device for generating tumor in blood vessel digital model Download PDFInfo
- Publication number
- CN110956698B CN110956698B CN201911146350.8A CN201911146350A CN110956698B CN 110956698 B CN110956698 B CN 110956698B CN 201911146350 A CN201911146350 A CN 201911146350A CN 110956698 B CN110956698 B CN 110956698B
- Authority
- CN
- China
- Prior art keywords
- tumor
- blood vessel
- model
- mesh
- grid
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 206010028980 Neoplasm Diseases 0.000 title claims abstract description 321
- 210000004204 blood vessel Anatomy 0.000 title claims abstract description 154
- 238000000034 method Methods 0.000 title claims abstract description 110
- 230000001788 irregular Effects 0.000 claims abstract description 23
- FGUUSXIOTUKUDN-IBGZPJMESA-N C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 Chemical compound C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 FGUUSXIOTUKUDN-IBGZPJMESA-N 0.000 claims abstract description 10
- 239000011159 matrix material Substances 0.000 claims description 49
- 238000000605 extraction Methods 0.000 claims description 17
- 238000009499 grossing Methods 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000005484 gravity Effects 0.000 claims description 10
- 230000002792 vascular Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 7
- 238000000354 decomposition reaction Methods 0.000 claims description 6
- 238000007670 refining Methods 0.000 claims description 6
- 230000002441 reversible effect Effects 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 4
- 230000002093 peripheral effect Effects 0.000 claims description 3
- 230000009467 reduction Effects 0.000 claims description 2
- 230000001131 transforming effect Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 description 21
- 238000010586 diagram Methods 0.000 description 15
- 230000009466 transformation Effects 0.000 description 8
- 238000005070 sampling Methods 0.000 description 6
- 238000012549 training Methods 0.000 description 6
- 230000003902 lesion Effects 0.000 description 5
- CIWBSHSKHKDKBQ-JLAZNSOCSA-N Ascorbic acid Chemical compound OC[C@H](O)[C@H]1OC(=O)C(O)=C1O CIWBSHSKHKDKBQ-JLAZNSOCSA-N 0.000 description 4
- 238000012805 post-processing Methods 0.000 description 4
- OAICVXFJPJFONN-UHFFFAOYSA-N Phosphorus Chemical compound [P] OAICVXFJPJFONN-UHFFFAOYSA-N 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 2
- 208000006288 Vascular Tissue Neoplasms Diseases 0.000 description 2
- 208000029185 blood vessel neoplasm Diseases 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000036285 pathological change Effects 0.000 description 2
- 231100000915 pathological change Toxicity 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 201000011531 vascular cancer Diseases 0.000 description 2
- 201000008450 Intracranial aneurysm Diseases 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000001575 pathological effect Effects 0.000 description 1
- 230000002980 postoperative effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 210000004872 soft tissue Anatomy 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013334 tissue model Methods 0.000 description 1
- 206010055031 vascular neoplasm Diseases 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/50—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for simulation or modelling of medical disorders
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Public Health (AREA)
- Software Systems (AREA)
- Computer Graphics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Biomedical Technology (AREA)
- Architecture (AREA)
- Computer Hardware Design (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Geometry (AREA)
- Pathology (AREA)
- General Engineering & Computer Science (AREA)
- Epidemiology (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Image Generation (AREA)
Abstract
The application relates to a method, a system and an electronic device for generating a tumor in a blood vessel digital model. The method comprises the following steps: step a: selecting a tumor position on the blood vessel digital model; step b: calculating an approximate radius of the vessel digital model at the tumor location; step c: constructing a smooth and regular tumor mesh model; step d: editing the surface of the tumor grid model, and constructing irregular deformation on the surface of the tumor grid; step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model; step f: the method has the advantages that the grid simplification of strict boundary protection is carried out on the tumor grid model, the generation result of the tumor in the blood vessel digital model is obtained, the problem of limited case data sources does not exist, the method can be used almost without any learning cost, the tumor can be constructed at almost any position in the normal blood vessel digital model, the degree of freedom is high, and the operation is simple and efficient.
Description
Technical Field
The present application relates to a method, a system and an electronic device for generating a tumor in a digital vascular model, and belongs to the technical field of virtual surgery.
Background
Research shows that 80% of errors in surgical teaching training are caused by human factors, so that the surgical teaching training method is extremely important for training the surgical skills of doctors. Surgical skill training with virtual surgical systems is an emerging and efficient approach.
Virtual surgery systems are a typical application of virtual reality technology in the medical field. The virtual operation is an operation system which is started from medical image data, reconstructs a virtual human soft tissue model by using computer graphics, simulates a virtual medical environment and interacts with the virtual medical environment by using touch interaction equipment. The doctor can observe the expert's operation process on the virtual operation system, also can practice repeatedly. Virtual operation makes the time of operation training very shorten, has reduced the demand to expensive subject, can avoid traditional operation risk height simultaneously, and patient's misery is big, shortcoming such as postoperative effect is unsatisfactory.
One of the current technical difficulties of virtual surgical systems is how to obtain the case model required in the virtual surgical system. In an intracranial aneurysm operation simulation training system, a case model refers to a pathological change blood vessel digital model, and the existing technical scheme for obtaining the pathological change blood vessel digital model mainly comprises the following three types:
(1) Three-dimensional reconstruction
The method is based on CT/MRI/DSA scanning images of actual cases to carry out blood vessel segmentation, and then a three-dimensional reconstruction technology is adopted to obtain a three-dimensional blood vessel digital model with tumor lesions. However, in the three-dimensional reconstruction method, due to various factors, relatively large noise often exists in a scanned image, automatic segmentation and identification of blood vessels are difficult, and a universal method is difficult to find. Therefore, the blood vessel model obtained by the method is rough and needs manual intervention and post-processing before being used for virtual surgery. The method for acquiring the case model is based on the premise that the image of the case is possessed, the acquisition is difficult due to the problem of privacy of patients, and a post-processing method for a rough model acquired by three-dimensional reconstruction needs to be mastered.
(2) Editing with three-dimensional editing software
The method is based on the acquired three-dimensional blood vessel digital model which is subjected to three-dimensional reconstruction and post-processing, and the three-dimensional blood vessel digital model is edited through three-dimensional editing software such as 3ds Max or Maya, so that different types of lesion blood vessel models are acquired. The method can obtain case models with rich pathological feature types, however, the method of editing through three-dimensional software needs an operator to learn the software of the three-dimensional editing software such as 3Ds Max or Maya, and the like, and needs to know the structure of the blood vessel digital model, so that higher learning cost is needed.
(3) Direct editing
The method is also established on the basis of the acquired three-dimensional blood vessel digital model which is subjected to three-dimensional reconstruction and post-processing, and the vascular tumor lesion is simply and quickly constructed through the steps of tumor position selection, tumor hole cutting, tumor grid generation and the like. Although the direct editing method can quickly and conveniently generate the tumor lesion blood vessel digital model, the method cannot be adapted to blood vessel digital models with different radiuses, the transition of the generated tumor and the blood vessel digital model at the connecting part is unnatural, and the generated tumor is greatly different from a real tumor.
Disclosure of Invention
The present application provides a method, a system and an electronic device for generating a tumor in a digital model of a blood vessel, which aim to solve at least one of the above technical problems in the prior art to a certain extent.
In order to solve the above problems, the present application provides the following technical solutions:
a method of generating a tumor in a digital model of a blood vessel, comprising the steps of:
step a: selecting a tumor position on the blood vessel digital model;
step b: calculating the approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: smoothing the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step a, the tumor position is selected in a specific manner: clicking a point on the blood vessel digital model, and taking the position information of the point as screen coordinate information; converting the screen coordinate information into world coordinate information, and associating the world coordinate information with the position of the virtual cameraArranging and connecting into a ray; calculating the triangular patch on the digital model of the blood vessel intersected with the ray, and calculating the position T of the geometric center point of three vertexes of the triangle c At the position T c I.e. the tumor location chosen on the vessel digital model.
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step b, the approximate radius calculation method specifically includes:
step b1: taking the tumor position selected on the blood vessel digital model as the center, obtaining m triangular patches with the peripheral radius within R, and calculating the vector product of the normal vector of the 1 st triangular patch and the normal vector of the 2 nd triangular patchCalculating the cross product of the normal vector of the 2 nd triangular patch and the normal vector of the 3 rd triangular patchBy analogy, m-1 vector products can be calculatedAnd then calculate their mean
And b2: taking the triangular patch f0 of the tumor position coordinate selected from the blood vessel digital model, and calculating the coordinate G of the center of gravity 0 (x 0 ,y 0 ,z 0 ) By passingAnd G 0 To obtain a pass G 0 And is perpendicular toThe equation of point normal of the plane of (a), namely:
A(x-x 0 )+B(y-y 0 )+C(z-z 0 )=0
step b3: setting upA positive real number alpha, finding all barycentric coordinates G in all triangular patches constituting the vascular digital model i (x i ,y i ,z i ) Satisfies the inequality-alpha is less than or equal to A (x-x) i )+B(y-y i )+C(z-z i ) Forming a set F by triangular patches less than or equal to alpha, calculating the average value of barycentric coordinates of all triangular patches in F to obtain a point O 0 ;
And b4: calculating the gravity center and the point O of all triangular patches in the set F 0 Then average R of the linear distances therebetween 0 The average value R 0 I.e. the approximate radius of the digital model of the blood vessel at the selected tumor location.
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step c, the constructing a smooth and regular tumor mesh model specifically includes:
step c1: to select tumor position T on the blood vessel digital model c For the center of sphere, a virtual sphere of radius R is generated, R = α R 0 α is a value between 0 and 1;
and c2: performing collision detection on the virtual sphere and the blood vessel digital model to obtain all triangle sets S intersected with the virtual sphere, and solving an average normal vector D of all triangle patches in the set S t The normal vector is the growth direction of the tumor;
and c3: deleting all triangular patches in the set S from the blood vessel digital model to obtain an irregular boundary, wherein all vertexes on the boundary are set as S bd ;
And c4: set the vertexes S bd Each vertex on (A) and the center of sphere T c Connecting the lines, and respectively obtaining the intersection point set S of the corresponding connecting line and the virtual sphere int ;
And c5: set the vertex S bd Set of sum intersections S int The top points are triangulated to form a circle of triangular mesh, and the intersection points are collected to form a set S int The vertex in (1) is used as the vertex of the intersection position of the tumor and the blood vessel;
step c6: calculating the position P of the tumor center T And the tumor peak position P H :
P T =T c +(R 2 -r 2 )D t
P H =P T +RD t
In the above formula, R is the tumor radius, R = μ R, μ is a constant greater than 1, R = α R 0 ,R 0 Approximate radius of the vessel digital model at the selected tumor location;
step c7: set the intersection points S int Middle vertex and tumor vertex position P H Connecting to form a conical mesh, wherein the triangle set forming the mesh is S 0 To set S 0 Each triangle in the triangle set is subdivided to obtain a new triangle set S 1 Then to the set S 1 Each triangle in the set of triangles is subjected to the same subdivision operation, the operation is performed for N rounds, and the final triangle set S is obtained N I.e. a regular tumor mesh model.
The technical scheme adopted by the embodiment of the application further comprises the following steps: the subdividing operation of each triangle specifically includes: for each triangle in the set, if two of the three vertices A and B belong to the set of intersections S int Then, the midpoints X and Y of the other two sides except the side formed by the vertexes A and B are taken to be connected, any one of the midpoints X and Y is taken to be connected with any one of the vertexes A and B, the original triangle is divided into 3, and X and Y are newly added vertexes; if none of the three vertices of the triangle belongs to the set of vertices S int Then, the middle points X, Y and Z of the three sides are taken and connected pairwise, the original triangle is divided into 4 triangles, and X, Y and Z are newly added vertexes; moving newly added vertexes X and Y or X, Y and Z to ray P respectively T X and P T Y or P T X、P T Y and P T And the final position of the Z and the virtual sphere is obtained at the intersection point of the Z and the virtual sphere.
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step d, the constructing irregular deformation on the surface of the tumor grid specifically includes:
step d1: taking the generated tumor mesh model as an input mesh S of mesh deformation operation;
step d2: dividing a tumor grid into m parts, and randomly selecting q control points in each part; for each control point, selecting triangular surface patches in a certain range around the control point on the tumor mesh, and taking the vertexes of the triangular surface patches as free point sets corresponding to the control point;
step d3: setting the position constraint information of the control point as: the current control point moves along the normal direction of the point or the reverse direction of the normal direction by the distance of lambdar; wherein λ is a constant between greater than 0 and less than 1, R is the tumor radius;
step d4: and combining the input grid information, the control points and the free point set information corresponding to the control points and the fixed position constraint information to carry out rigidity-guaranteed grid deformation.
The technical scheme adopted by the embodiment of the application further comprises the following steps: the rigidity-maintaining grid deformation specifically comprises:
the first step is as follows: obtaining adjacent information of input grid S, making vertex v i Form a unit C with its 1-neighborhood triangular patch i ;
The second step is that: defining the rigid energy of each unit, and summing to obtain the overall rigid energy:
in the above formula, S is the input grid, and S' is the deformed input grid; e (S') is the stiffness energy of the entire mesh; n is the number of vertices in the input mesh S, C i Is a vertex v i A unit formed by its 1-neighborhood triangular patch, C i 'the cell after deformation, E (C') the stiffness energy of a cell, N (i) the relative vertex v i Set of adjacent vertices, p i Is a vertex v i Coordinate of (a), p i The coordinate after deformation is p i ′,p j Is a vertex v j Coordinate of (a), p j The coordinate after deformation is p j ′,ω ij Is an edge e ij Using the weight of the excess tangentα ij And beta ij Is an edge e ij Two opposite corners of (a); r i Is a unit C i Transforming the rotation matrixes before and after;
the third step: determining an initial guess of the transformed vertex coordinates; for a selected control point, its initial guess is a fixed position constraint set previously; for the free point, by minimizing | | | Lp' - δ | | | non-phosphor 2 Determining an initial guess, wherein δ = Lp, p is a coordinate of a vertex in the initial mesh input by the user, and p' is a coordinate of a vertex in the mesh after the coordinates of the control point have been changed according to the fixed position constraint; | Lp' -delta | purple light 2 To achieve the minimum, lp' = Lp, where the matrix L is defined as follows:
in the above formula, ω ij Is an edge e ij Using the weight of the remainderN (i) is associated with the vertex v i A set of adjacent vertices; by further calculation and simplification, one can obtain: a. The T AX free =A T (Lp-BX fixed ) Solving the equation system to obtain X free I.e. the initial guess of the free point;
the fourth step: using the transformed vertex coordinates p i ' calculating the optimal rotation matrix of all deformation units by using singular value decomposition;
the fifth step: solving a linear equation set by using the current optimal rotation matrix to obtain a new vertex coordinate; when R is i After determination, by solving a system of linear equationsObtaining p 'which minimizes E (S'), for each p i The following equation can be derived:
the linear combination on the left side of the above equation is the discrete laplace-bertelia operator for p', so the system of equations can be written as: lp' = b; solving the equation set to obtain p';
and a sixth step: and the fourth step and the fifth step are executed iteratively until the integral rigidity energy is less than the set threshold value.
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step e, the fairing process includes:
step e1: selecting a triangular patch and an n-neighborhood triangular patch of a tumor hole boundary on a blood vessel mesh model, and taking a digital mesh model formed by the triangular patches as the input of a first step of mesh fairing operation:
acquiring adjacency information of the digital mesh model, and recording the adjacency point set of each vertex i as N (i);
calculating the weight of each adjacent point of each vertex:
according to the adjacency information and w ij Calculating the laplace coordinates L (i) of each point in the digital mesh model:
in the above formula, p i Is the coordinate of vertex i, p j Coordinates of an adjacent point j being a vertex i;
original coordinate p i Updated to λ L (i) + p i (ii) a Wherein λ is a positive real number less than 1;
iterating the grid fairing step by m 1 Secondly;
step e2: selecting all triangular patches on the tumor, triangular patches at the tumor hole boundary on the blood vessel mesh model and n-neighborhood triangular patches thereof again, taking a digital mesh model formed by the triangular patches as the input of mesh fairing, and iterating the mesh fairing operation to perform m 2 Wherein m is 1 Should be much larger than m 2 。
The technical scheme adopted by the embodiment of the application further comprises the following steps: in the step f, the mesh reduction for strictly preserving the boundary of the tumor mesh model specifically includes:
step f1: calculating error matrix Q for all initial vertices to obtain all valid edges (v) 1 ,v 2 );
Step f2: for each effective edge (v) 1 ,v 2 ) Calculating the optimal extraction target v and the cost of extracting the edge;
step f3: storing all edges into a heap according to the size of the extraction cost;
step f4: each time the least expensive edge is removed, the vertex v is removed 1 ,v 2 Is combined toAnd update all ANDExtracting cost and the best extracting position of the connected effective edges, and calculating the number of triangular patches in the tumor mesh after the edge with the minimum cost is removed;
step f5: repeating steps f1 to f4 until the number of existing faces is smaller than a set threshold.
Another technical scheme adopted by the embodiment of the application is as follows: a system for generating a tumor in a digital model of a blood vessel, comprising:
tumor position selection module: the tumor position is selected on the blood vessel digital model;
an approximate radius calculation module: calculating an approximate radius of the vessel numerical model at the tumor position based on a plane-based point-normal equation;
tumor grid construction module: the method comprises the steps of generating a virtual sphere by taking a selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere is collided with a blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
tumor mesh deformation module: the system is used for editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
a grid fairing processing module: the system is used for smoothing the joint of the tumor mesh model and the blood vessel digital model;
a grid simplification module: and the grid simplification module is used for strictly guaranteeing the boundary of the tumor grid model to obtain the generation result of the tumor in the blood vessel digital model.
The embodiment of the application adopts another technical scheme that: an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the following operations of the method of generating a tumor in a digital model of a blood vessel as described above:
a, step a: selecting a tumor position on the blood vessel digital model;
step b: calculating an approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the center of the virtual sphere, and constructing a smooth and regular tumor mesh model by an iterative triangle thinning method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
Compared with the prior art, the embodiment of the application has the advantages that: the method, the system and the electronic equipment for generating the tumor in the blood vessel digital model are used for enriching case models which can be adopted in the field of virtual surgery and enabling the operation to be simple and efficient by designing an automatic generation and optimization method of the blood vessel tumor model. Compared with the prior art, the method has the following advantages:
1. the method has the advantages that the problem of limited source of case data does not exist, the method can be used almost without any learning cost, tumors can be constructed at almost any position in a normal blood vessel digital model, and the degree of freedom is high;
2. the method can calculate the approximate radius of any position of the blood vessel digital model, and can set the tumor radius and the hole radius in a self-adaptive manner according to the radius of the blood vessel model at the selected position when the tumor is generated, and manual setting is not needed each time;
3. after generating a tumor grid through longitude and latitude sampling, randomly selecting a certain number of control points on the tumor grid, and constructing irregular deformation on the surface of a tumor by keeping rigid deformation, so that richer tumor forms can be simulated;
4. after the tumor grid is generated, the transition of the joint of the tumor and the blood vessel model is smoother through two-step grid fairing, and the shape of the joint of the real tumor and the blood vessel is more consistent;
5. after the tumor grid is generated, grid simplification of strict boundary guarantee is carried out, so that grid density of the tumor grid and grid density of the blood vessel grid are not greatly different.
Drawings
FIG. 1 is a flow chart of a method of generating a tumor in a digital model of a blood vessel according to an embodiment of the present application;
FIG. 2 is a diagram showing the relationship between R and R in the generated tumor mesh model;
FIG. 3 (a) is a schematic diagram of a grid between two arcs on a tumor grid, and FIG. 3 (b) is a schematic diagram of a portion of the tumor grid when it is divided into 3 portions;
FIG. 4 is a flow chart of rigid mesh deformation;
FIG. 5 shows the vertex v i And its corresponding unit C i A schematic diagram;
FIG. 6 is a schematic diagram of a process of performing rigid deformation on a tumor mesh;
FIG. 7 is a schematic view of a first step of grid smoothing operation;
FIG. 8 is a schematic diagram of a mesh fairing process at the junction of a tumor mesh and a digital model of a blood vessel;
FIG. 9 is a simplified flow chart of a trellis;
FIG. 10 is a schematic diagram of the final effect of generating a tumor in a digital model of blood vessels;
FIG. 11 is a schematic structural diagram of a system for generating a tumor in a digital model of a blood vessel according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a hardware device of a method for generating a tumor in a digital vascular model according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Please refer to fig. 1, which is a flowchart illustrating a method for generating a tumor in a digital vascular model according to an embodiment of the present application. The method for generating the tumor in the blood vessel digital model comprises the following steps:
step 100: selecting a tumor position on the blood vessel digital model;
in step 100, the tumor position is selected in the following specific manner: clicking a point on the blood vessel digital model, and taking the position information of the point as screen coordinate information; converting the screen coordinate information into world coordinate information, and connecting the world coordinate information and the position of the virtual camera into a ray; calculating the triangular patch on the digital model of the blood vessel intersected with the ray, and calculating the position T of the geometric center point of three vertexes of the triangle c At the position T c I.e. the tumor location chosen on the vessel digital model.
Step 200: calculating the approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
in step 200, the approximate radius of the blood vessel digital model at any position can be obtained through a series of simple calculations such as a plane-based normal equation, and the tumor radius and the hole radius can be adaptively set according to the approximate radius when a tumor is generated. The approximate radius calculation method specifically includes:
step 201: taking the tumor position selected on the blood vessel digital model as the center, obtaining m triangular patches with the surrounding radius within R, and calculating the vector product of the normal vector of the 1 st triangular patch and the normal vector of the 2 nd triangular patchCalculating the vector product of the normal vector of the 2 nd triangular patch and the normal vector of the 3 rd triangular patchBy analogy, m-1 vector products can be calculatedAnd then calculate their mean
Step 202: number of vesselsTriangle patch f of tumor position coordinate selected from character model 0 Calculating the coordinates G of the center of gravity thereof 0 (x 0 ,y 0 ,z 0 ) By passingAnd G 0 To obtain a via G 0 And is perpendicular toThe equation of point normal of the plane of (a), namely:
A(x-x 0 )+b(y-y 0 )+C(z-z 0 )=0 (1)
the plane is considered to be approximately perpendicular to the direction of vessel extension.
Step 203: setting a proper positive real number alpha, and finding all barycentric coordinates G in all triangular patches forming the blood vessel digital model i (x i ,y i ,z i ) Satisfies the inequality-alpha is less than or equal to A (x-x) i )+B(y-y i )+C(z-z i ) Forming a set F by triangular patches less than or equal to alpha, calculating the average value of barycentric coordinates of all triangular patches in F to obtain a point O 0 ;
Step 204: calculating the gravity center and the point O of all triangular patches in the set F 0 Then the straight-line distance between them is averaged to obtain the average value R 0 The average value R 0 I.e. the approximate radius of the vessel numerical model at the selected tumor location.
Step 300: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refinement method;
in step 300, the method for constructing a tumor mesh model specifically includes:
step 301: to select tumor position T on the blood vessel digital model c Generating a virtual sphere with a radius R for the center of the sphere, R = alpha R 0 α is a value between 0 and 1;
step 302: performing collision detection on the virtual sphere and the blood vessel digital model to obtain all triangle sets S intersected with the virtual sphere, and solving an average normal vector D of all triangle patches in the set S t The normal vector is the growth direction of the tumor;
step 303: deleting all triangular patches in the set S from the blood vessel digital model to obtain an irregular boundary, wherein all vertexes on the boundary are set as S bd ;
Step 304: set the vertex S bd Each vertex on (A) and the center of sphere T c Connecting the lines, and respectively obtaining the intersection point set S of the corresponding connecting line and the virtual sphere int ;
Step 305: set the vertex S bd Set of sum intersections S int The top points are triangulated to form a circle of triangular mesh, and the intersection points are collected to form a set S int The vertex in (1) is used as the vertex of the intersection position of the tumor and the blood vessel;
step 306: calculating the position P of the center of the tumor sphere T And the tumor peak position P H :
P T =T c +(R 2 -r 2 )D t (2)
P H =P T +RD t (3)
In the above formula, R is the tumor radius, R = μ R, μ is a constant greater than 1, R = α R 0 ,R 0 The relationship of R to R in the generated tumor mesh model is shown in fig. 2 for the approximate radius of the vessel numerical model at the selected tumor location.
Step 307: set the intersection points S int Apex of (1) and tumor apex position P H Connecting to form a conical mesh, wherein the triangle set forming the mesh is S 0 To set S 0 Each triangle in the triangle set is subdivided to obtain a new triangle set S 1 Then to the set S 1 Each triangle in the set of triangles is subjected to the same subdivision operation, the operation is performed for N rounds, and the final triangle set S is obtained N I.e. a regular tumor mesh model.
Further, the present application sets S triangles i (i∈[0,N]) The subdivision operation specifically includes:
(1) For each triangle in the set, if two of the three vertices (assumed to be vertices A and B) belong to intersection set S int Then, the midpoints (assumed to be X and Y) of the other two sides except the side formed by the vertexes A and B are connected, any one of the midpoints X and Y is connected with any one of the vertexes A and B, the original triangle is divided into 3, and X and Y are newly added vertexes; if none of the three vertices of the triangle belongs to the set of vertices S int Then, the midpoints of the three sides (assumed to be X, Y and Z) are taken and connected in pairs, and the original triangle is divided into 4 triangles, wherein X, Y and Z are newly added vertexes.
(2) Moving newly added vertexes X and Y or X, Y and Z to ray P respectively T X and P T Y or P T X、P T Y and P T And the final position of the Z and the virtual sphere is obtained at the intersection point of the Z and the virtual sphere.
Step 400: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
in step 400, irregular deformation can simulate a more abundant tumor morphology. The concrete construction mode comprises the following steps:
step 401: setting an input grid, selecting control points, setting a free point set corresponding to each control point, setting fixed position constraints of the control points, and performing rigidity-guaranteed grid deformation;
step 402: taking the generated tumor grid model as an input grid S of grid deformation operation;
step 403: selecting a control point; the method for constructing the tumor grid by combining longitude and latitude sampling can easily obtain a strip grid M consisting of triangular patches between two adjacent arcs on the tumor grid i (i =1, 2.. Multidot., n, n number of vertices in the set P), furthermore, a plurality of the above stripe-shaped meshes M can be obtained i A set of constructs. According to this method, the tumor grid is divided into m sections, each section havingThe last part of the strip-shaped grid is provided withThe strip-shaped grids. As shown in fig. 3, fig. 3 (a) is a schematic diagram of a grid between two circular arcs on a tumor grid, and fig. 3 (b) is a schematic diagram of a grid of a tumor grid divided into 3 parts. Dividing a tumor grid into m parts, and randomly selecting q control points in each part; for each control point, selecting triangular patches in a certain range around the control point on the tumor mesh, and taking the vertexes of the triangular patches as a free point set corresponding to the control point.
Step 404: setting fixed position constraint information; the positions of the control points are set as: the position of the current control point after moving the lambada R distance along the normal direction or the reverse direction of the normal direction of the point; wherein λ is a constant between greater than 0 and less than 1, R is the tumor radius; the user can customize lambda, and the larger the lambda is, the larger the degree of irregular deformation of the tumor surface is.
Step 405: and combining the input grid information, the control points and the free point set information corresponding to the control points and the fixed position constraint information to carry out rigidity-guaranteed grid deformation. The rigid grid deformation maintaining process is shown in fig. 4, and specifically includes the following steps:
the first step is as follows: obtaining adjacent information of input grid S, making vertex v i Form a unit C with its 1-neighborhood triangular patch i As shown in fig. 5; if unit C i And rigid transformation is carried out, the vertex position relation before and after transformation can be represented by a rotation matrix, namely the following conditions are satisfied:wherein p is i Is a vertex v i The position of (a); p is a radical of i Position after deformation is p i ′,R i Is a unit C i Rotation matrices before and after transformation, N (i) being the sum of the vertices v i A set of adjacent vertices. When the deformation is not rigid, the optimum rotation moment can still be foundArray R i So that equation p i ′-p j ′=R i (p i -p j ) The difference between the left side and the right side is minimum.
The second step is that: defining the rigid energy of each unit, and summing to obtain the overall rigid energy:
in the above formula, S is the input grid, and S' is the deformed input grid; e (S') is the stiffness energy of the entire mesh; n is the number of vertices in the input mesh S, C i Is a vertex v i A unit formed by 1-neighborhood triangular patch, C i 'the cell after deformation, E (C') the stiffness energy of a cell, N (i) the relative vertex v i Set of adjacent vertices, p i Is a vertex v i Coordinate of (a), p i The coordinate after deformation is p i ′,p j Is a vertex v j Coordinate of (a), p j The coordinate after deformation is p j ′,ω ij Is an edge e ij Using the weight of the remainderα ij And beta ij Is an edge e ij Two opposite corners of (a); r is i Is a unit C i The rotation matrices before and after transformation.
By minimizing the stiffness energy E (S'), a most rigid deformation of the mesh is possible. In equation E (S'), only the vertex-modified coordinate p i ' sum rotation matrix R i Is an unknown quantity.
The third step: determining an initial guess of the transformed vertex coordinates; for the selected control point, its initial guess is the fixed position constraint set previously. For the free point, by minimizing | | | Lp' - δ | | | non-phosphor 2 An initial guess is determined where δ = Lp, p is the coordinates of the vertices in the initial mesh input by the user, and p' is the coordinates of the vertices in the mesh after the control point coordinates have been changed according to the fixed position constraint described above. | Lp' -delta | ceiling 2 To achieve the minimum, lp' = Lp, where the matrix L is defined as follows:
in the formula (5), w ij Is an edge e ij Using the weight of the excess tangentN (i) is associated with the vertex v i A set of adjacent vertices.
From Lp' = Lp find an initial guess of the free point coordinates in the grid S, the equation can be rewritten as: AX free +BX fixed = Lp. Wherein A is a matrix composed of columns corresponding to subscripts of free vertexes in the matrix L, and X free Is the coordinate of free vertex and is unknown quantity, B is the matrix formed from the columns correspondent to fixed vertex subscript in matrix L, X fixed The coordinates of the vertices are fixed, including the control points and the remaining vertices in the mesh S.
By further calculation and simplification, one can obtain: a. The T AX free =A T (Lp-BX fixed ) Solving the system of equations to obtain X free I.e. the initial guess of the free point.
Finally, the rotation matrix R needs to be updated iteratively i And vertex coordinates p after vertex modification i ′。
The fourth step: using the transformed vertex coordinates p i ', calculating the optimal rotation matrix of all deformation units by using singular value decomposition; for a certain cell C i Record e ij =p i -p j Correspondingly, cell C after deformation i ' in, note e ij ′=p i ′-p j ' simplified by j to represent the set j ∈ N (i). The stiffness energy E (C') of a certain unit can be written as:
wherein R is not contained i The term (2) can be regarded as a constant in the process of finding the optimal rotation matrix, so that the discussion can be omitted, and the above formula can be written as follows:
order toIt is known that when R is i S i In the case of a symmetrical semi-positive timing matrix, tr (R) i S') can be maximized, and thus can be derived from S i Singular value decomposition S of i =U i ∑ i V i T In which R is deduced i :
R i =V i U i T (8)
The rotation matrix R of each unit is calculated according to the method i 。
The fifth step: solving a linear equation set by using the current optimal rotation matrix to obtain a new vertex coordinate; when R is i After determination, by solving a system of linear equationsObtaining p 'minimizing E (S'), for each p i ' the following equation can be derived:
the linear combination on the left side of the above equation is the discrete laplace-bertelia operator for p', so the system of equations can be written as: lp' = b; solving the system of equations to obtain p'.
And a sixth step: the fourth step and the fifth step are executed in an iterative mode until the integral rigidity energy is smaller than a set threshold value; in the next iteration, new R and p 'are solved by taking the newly obtained p' as a known quantity, and the process is repeated until the grid rigidity energy is smaller than a threshold value specified by a user.
The process of performing rigid deformation on the tumor mesh is shown in fig. 6, in which (a) a fixed-position constraint is set, (b) an initial guess of the deformation of the mesh model is made, and (c) the mesh model after p and R are iteratively updated for a certain number of times. It should be noted that, in the selection process of the control point in the present application, the control point can be selected randomly in a certain manner, and the control point can be selected in a human-computer interaction manner selected by a user mouse; the fixed position constraint process, in addition to setting a fixed offset λ R, may set the offset by noting the distance the user controls the movement of the mouse.
Step 500: smoothing the joint of the tumor mesh model and the blood vessel digital model;
in step 500, the smoothing process is divided into the following two steps:
first step grid smoothing: after the tumor is constructed by the longitude and latitude sampling method, the triangular patch close to the bottom on the tumor grid (i.e. the triangular patch at the connection part of the tumor and the blood vessel digital model) is easy to obtain. In addition, a triangular patch of the tumor hole boundary on the blood vessel mesh model and an n-neighborhood triangular patch thereof are selected. And taking the digital mesh model formed by the triangular patches as the input of the first step mesh fairing operation.
The first step of the grid fairing operation process is shown in fig. 7, and specifically comprises the following steps:
step 501: acquiring adjacency information of the digital mesh model, and recording the adjacency point set of each vertex i as N (i);
step 502: calculating the weight of each adjacent point of each vertex:
in the formula (10), the first and second groups,α ij and beta ij Are the two opposite corners of the edge (i, j).
Step 503: according to adjacency information and w ij Calculating the laplace coordinates L (i) of each point in the digital mesh model:
in the formula (11), p i Is the coordinate of vertex i, p j The coordinates of the adjacent point j to vertex i.
Step 504: the original coordinate p i Updated to λ L (i) + p i (ii) a Wherein λ is a positive real number less than 1;
step 505: iterating the grid fairing step by m 1 Then, a second smoothing operation is performed.
Second step grid smoothing: selecting all triangular patches on the tumor, triangular patches at the tumor hole boundary on the blood vessel mesh model and n-neighborhood triangular patches thereof again, taking a digital mesh model formed by the triangular patches as the input of mesh fairing, and iterating the mesh fairing operation to perform m 2 Wherein m is 1 Should be much greater than m 2 . The mesh fairing process at the junction of the tumor mesh and the blood vessel digital model is shown in fig. 8, fig. 8 (a) is the original tumor mesh, fig. 8 (b) is the tumor mesh after the first step of fairing, and fig. 8 (c) is the tumor mesh after the second step of fairing.
Step 600: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
In step 600, after the tumor mesh is generated, mesh simplification with strict boundary guarantee is performed, so that there is no too large difference between mesh densities of the tumor mesh and the blood vessel mesh. Taking the whole tumor grid as an input grid, performing QEM (quadratic error metric) grid simplification of strict guarantee boundary, and the flow is shown in fig. 9, and specifically includes the following steps:
step 601: calculating error matrix Q for all initial vertices to obtain all valid edges (v) 1 ,v 2 ) (valid edge means edge of link);
in step 601, specifically, a calculation is required and oneThe plane equations ax + by + cz + d =0 and a for all planes with vertices adjacent 2 +b 2 +c 2 =1, stores parameters a, b, c, d, and constructs vector p = (a, b, c, d) T Calculating a quadratic basic error matrix K for each plane p :
All K of one vertex p The sum constitutes the error matrix Q for that point.
Step 602: for each effective edge (v) 1 ,v 2 ) Calculating the optimal extraction target v and the cost of extracting the edge;
in step 602, if the edge (v) 1 ,v 2 ) For a boundary edge, its decimation cost is set to infinity. For non-boundary valid edges (v) 1 ,v 2 ) Assuming it shrinks to a point v, rememberWherein Q 1 And Q 2 Are each v 1 And v 2 The error matrix of (2), then the decimation cost of the edge should beThe cost is differentiated, and the value of upsilon when the derivative is 0 is calculatedI.e. solving the equation:
in the formula (13), q ij Are the corresponding elements in the matrix Q. If the coefficient matrix is reversible, the optimal extraction target v can be obtained by solving the equation 0 If the coefficient matrix is not invertible, letGet v 1 And v 2 The midpoint of (a).
Step 603: storing all edges into a heap according to the size of the extraction cost;
step 604: each time the edge with the minimum extraction cost is removed, the vertex v is removed 1 ,v 2 Is incorporated intoAnd update all ANDAnd calculating the number of triangular patches in the tumor mesh after the edge with the minimum removal cost is removed according to the extraction cost and the optimal extraction position of the connected effective edges.
Step 605: and repeating the steps until the number of the existing surfaces is smaller than a set threshold value.
The final effect of tumor generation in the digital model of blood vessels after all the above steps is shown in fig. 10.
Please refer to fig. 11, which is a schematic structural diagram of a system for generating a tumor in a digital vascular model according to an embodiment of the present application. The system for generating the tumor in the blood vessel digital model comprises a tumor position selecting module, an approximate radius calculating module, a tumor grid constructing module, a tumor grid deformation module, a grid fairing processing module and a grid simplifying module.
Tumor position selection module: the tumor position is selected on the blood vessel digital model; the tumor position selection mode specifically comprises the following steps: clicking a point on the blood vessel digital model, and taking the position information of the point as screen coordinate information; converting the screen coordinate information into world coordinate information, and connecting the world coordinate information and the position of the virtual camera into a ray; calculating the triangular patch on the digital model of the blood vessel intersected with the ray, and calculating the position T of the geometric center point of three vertexes of the triangle c The position T c I.e. the tumor location chosen on the vessel digital model.
An approximate radius calculation module: calculating an approximate radius of the vessel numerical model at the tumor position based on a plane-based point-normal equation; the approximate radius calculation mode specifically comprises the following steps:
1. taking the tumor position selected on the blood vessel digital model as the center, obtaining m triangular patches with the peripheral radius within R, and calculating the vector product of the normal vector of the 1 st triangular patch and the normal vector of the 2 nd triangular patchCalculating the vector product of the normal vector of the 2 nd triangular patch and the normal vector of the 3 rd triangular patchBy analogy, m-1 vector products can be calculatedAnd then calculate their mean
2. Taking a triangular patch f of the tumor position coordinate selected on the blood vessel digital model 0 Calculating the coordinates G of the center of gravity thereof 0 (x 0 ,y 0 ,z 0 ) By passingAnd G 0 To obtain a pass G 0 And is perpendicular toThe equation of point normal of the plane of (a), namely:
A(x-x 0 )+B(y-y 0 )+C(z-z 0 )=0 (1)
the plane is considered to be approximately perpendicular to the direction of vessel extension.
3. Setting a proper positive real number alpha, and finding out all barycentric coordinates G in all triangular patches forming the blood vessel digital model i (x i ,y i ,z i ) Satisfies the inequality-alpha is less than or equal to A (x-x) i )+B(y-y i )+C(z-z i ) A set F is formed by the triangular patches with the alpha value less than or equal to alpha, the average value of barycentric coordinates of all the triangular patches in the set F is calculated to obtain a point O 0 ;
4. Calculating the gravity center and the point O of all triangular patches in the set F 0 Then the straight-line distance between them is averaged to obtain the average value R 0 The average value R 0 I.e. the approximate radius of the digital model of the blood vessel at the selected tumor location.
Tumor grid construction module: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle thinning method; the method for constructing the tumor grid model specifically comprises the following steps:
1. with tumor position T selected on the vessel digital model c Generating a virtual sphere with a radius R for the center of the sphere, R = alpha R 0 α is a value between 0 and 1;
2. performing collision detection on the virtual sphere and the blood vessel digital model to obtain a triangle set S intersected with the virtual sphere, and solving an average normal vector D of all triangle patches in the set S t The normal vector is the growth direction of the tumor;
3. deleting all triangular patches in the set S from the blood vessel digital model to obtain an irregular boundary, wherein all vertexes on the boundary are set as S bd ;
4. Set the vertexes S bd Each vertex on (A) and the center of sphere T c Connecting the lines, and respectively obtaining a set S of intersection points of the corresponding lines and the virtual sphere int ;
5. Set the vertexes S bd Set of sum intersections S int The top points are triangulated to form a circle of triangular mesh, and the intersection points are collected to form a set S int The vertex in (2) is taken as the vertex of the intersection position of the tumor and the blood vessel;
6. calculating the position P of the center of the tumor sphere T And the tumor peak position P H :
P T =T c +(R 2 -r 2 )D t (2)
P H =P T +RD t (3)
In the above formula, R is the tumor radius, R = μ R, μ is a constant greater than 1, R = α R 0 ,R 0 The relationship of R to R in the generated tumor mesh model is shown in fig. 2 for the approximate radius of the vessel numerical model at the selected tumor location.
7. Set the intersection points S int Middle vertex and tumor vertex position P H Connecting to form a conical mesh, wherein the triangle set forming the mesh is S 0 To set S 0 Each triangle in the triangle set is subdivided to obtain a new triangle set S 1 Then to the set S 1 Each triangle in the set of triangles is subjected to the same subdivision operation, the operation is performed for N rounds, and the final triangle set S is obtained N I.e. a regular tumor mesh model.
Further, the present application is directed to triangle set S i (i∈[0,N]) The subdivision operation of (2) specifically includes:
(1) For each triangle in the set, if two of the three vertices (assumed to be vertices A and B) belong to intersection set S int Then, the midpoints (assumed to be X and Y) of the other two sides except the side formed by the vertexes A and B are connected, any one of the midpoints X and Y is connected with any one of the vertexes A and B, the original triangle is divided into 3, and X and Y are newly added vertexes; if none of the three vertices of the triangle belong to the set of vertices S int Then, the middle points (assumed as X, Y, Z) of the three sides are taken and connected two by two, and the original triangle is divided into 4 triangles, wherein X, Y and Z are newly added vertexes.
(2) Moving newly added vertexes X and Y or X, Y and Z to ray P respectively T X and P T Y or P T X、P T Y and P T And the final position of the Z and the virtual sphere is obtained at the intersection point of the Z and the virtual sphere.
Tumor mesh deformation module: the method is used for editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation; the concrete construction mode comprises the following steps:
1. setting an input grid, selecting control points, setting a free point set corresponding to each control point, setting fixed position constraints of the control points, and performing rigidity-guaranteed grid deformation;
2. taking the generated tumor mesh model as an input mesh S of mesh deformation operation;
3. selecting a control point; the method for constructing the tumor grid by combining longitude and latitude sampling can easily obtain a strip grid M consisting of triangular patches between two adjacent arcs on the tumor grid i (i =1, 2.. Multidot., n, the number of vertices in the set P), furthermore, a plurality of the above-mentioned strip-shaped meshes M can be obtained i A set of constructs. According to this method, the tumor grid is divided into m sections, each section havingThe last part of the strip-shaped grid is provided withThe strip-shaped grids. Fig. 3 (a) is a schematic diagram of a grid between two circular arcs on a tumor grid, and fig. 3 (b) is a schematic diagram of a grid of a tumor grid divided into 3 parts. Dividing a tumor grid into m parts, and randomly selecting q control points in each part; for each control point, selecting triangular patches in a certain range around the control point on the tumor mesh, and taking the vertexes of the triangular patches as a free point set corresponding to the control point.
4. Setting fixed position constraint information; the positions of the control points are set as: the current control point moves along the normal direction of the point or the reverse direction of the normal direction by the distance of lambdar; wherein λ is a constant between greater than 0 and less than 1, R is the tumor radius; the user can self-define lambda, and the larger the lambda is, the larger the degree of irregular deformation of the tumor surface is.
5. And combining the input grid information, the control points and the corresponding free point set information thereof and the fixed position constraint information to carry out rigid grid deformation. The rigid grid deformation maintaining process specifically comprises the following steps:
the first step is as follows: obtaining adjacent information of input grid S, making vertex v i Form a unit C with its 1-neighborhood triangular patch i As shown in fig. 5; if unit C i After rigid transformation is carried out, the vertex position relation before and after transformation can be represented by a rotation matrix, namely the following conditions are met:wherein p is i Is a vertex v i The position of (a); p is a radical of i Position after deformation is p i ′,R i Is a unit C i Rotation matrices before and after transformation, N (i) being the sum of the vertices v i A set of adjacent vertices. When the deformation is not rigid, the optimal rotation matrix R can still be found i So that equation p i ′-p j ′=R i (p i -p j ) The difference between the left side and the right side is minimum.
The second step is that: defining the rigid energy of each unit, and summing to obtain the overall rigid energy:
in the above formula, S is the input grid, and S' is the deformed input grid; e (S') is the stiffness energy of the entire mesh; n is the number of vertices in the input mesh S, C i Is a vertex v i A unit formed by its 1-neighborhood triangular patch, C i 'the cell after deformation, E (C') the stiffness energy of a cell, N (i) the relative vertex v i Set of adjacent vertices, p i Is a vertex v i Coordinate of (a), p i The coordinate after deformation is p i ′,p j Is a vertex v j Coordinate of (a), p j The coordinate after deformation is p j ′,w ij Is an edge e ij Using the weight of the excess tangentα ij And beta ij Is an edge e ij Two opposite corners of (a); r is i Is a unit C i The rotation matrices before and after transformation.
By minimizing the stiffness energy E (S'), a most rigid deformation of the mesh is possible. In the formula E (S'), only the vertex post-deformation coordinates p i ' and rotation matrix R i Is an unknown quantity.
The third step: determining an initial guess of the transformed vertex coordinates; for a selected control point, its initial guess is a fixed position constraint that was set previously. For the free point, by minimizing | | | Lp' - δ | | | non-phosphor 2 An initial guess is determined where δ = LP, p is the coordinates of the vertices in the initial mesh input by the user, and p' is the coordinates of the vertices in the mesh after the control point coordinates have been changed according to the fixed position constraint described above. | Lp' -delta | ceiling 2 To achieve the minimum, lp' = Lp, where the matrix L is defined as follows:
in the formula (5), w ij Is an edge e ij Using the weight of the remainderN (i) is associated with the vertex v i A set of adjacent vertices.
From Lp' = Lp find an initial guess of the free point coordinates in the grid S, the equation can be rewritten as: AX free +BX fixed = Lp. Wherein A is a matrix composed of columns corresponding to subscripts of free vertexes in the matrix L, and X is free Is the coordinate of free vertex and is unknown quantity, B is the matrix formed by the columns corresponding to fixed vertex subscript in matrix L, X fixed The coordinates of the vertices are fixed, including the control points and the remaining vertices in the mesh S.
By further calculation and simplification, one can obtain: a. The T AX free =AT(Lp-BX fixed ) Solving the system of equations to obtain X free I.e. the initial guess of the free point.
Finally, the rotation matrix R needs to be updated iteratively i And vertex coordinates p after vertex modification i ′。
The fourth step: using the transformed vertex coordinates p i ' calculating the optimal rotation matrix of all deformation units by using singular value decomposition; for a certain cell C i Record e ij =p i -p j Correspondingly, cell C after deformation i ' in, note e ij ′=p i ′-p j ' simplified by j to represent the set j ∈ N (i). The stiffness energy E (C') of a certain unit can be written as:
wherein R is not contained i The term (2) can be regarded as a constant in the process of finding the optimal rotation matrix, so that the discussion can be omitted, and the above formula can be written as follows:
order toIt is known that when R is i S i In the case of a symmetrical semi-positive timing matrix, tr (R) i S') can be maximized, and thus can be derived from S i Singular value decomposition of S i =U i ∑ i V i T In which R is deduced i :
R i =V i U i T (8)
The rotation matrix R of each unit is calculated according to the method i 。
The fifth step: solving a linear equation set by using the current optimal rotation matrix to obtain a new vertex coordinate; when R is i After determination, by solving a system of linear equationsObtaining p 'which minimizes E (S'), for each p i The following equation can be derived:
the linear combination on the left side of the above equation is the discrete Laplace-Belladiella operator for p', so the system of equations can be written as: lp' = b; solving the system of equations can obtain p'.
And a sixth step: the fourth step and the fifth step are executed iteratively until the integral rigidity energy is less than a set threshold value; in the next iteration, new R and p 'are solved by taking the newly obtained p' as a known quantity, and the process is repeated until the grid rigidity energy is smaller than a threshold value specified by a user.
The process of performing rigid deformation on the tumor mesh is shown in fig. 6, in which (a) a fixed-position constraint is set, (b) an initial guess of the deformation of the mesh model is made, and (c) the mesh model after p and R are iteratively updated for a certain number of times. It should be noted that, in the selection process of the control point in the application, the control point can be selected randomly in a certain manner, and the control point can be selected in a human-computer interaction manner of mouse selection by a user; the fixed position constraint process, in addition to setting a fixed offset λ R, can set the offset by noting the distance the user controls the mouse movement.
A grid fairing processing module: the device is used for smoothing the joint of the tumor mesh model and the blood vessel digital model; the fairing treatment process comprises the following two steps:
first step grid smoothing: after the tumor is constructed by the longitude and latitude sampling method, the triangular patch close to the bottom on the tumor grid (i.e. the triangular patch at the connection part of the tumor and the blood vessel digital model) is easy to obtain. In addition, a triangular patch of the tumor hole boundary on the blood vessel mesh model and an n-neighborhood triangular patch thereof are selected. And taking the digital mesh model formed by the triangular patches as the input of the first step mesh fairing operation.
The first step of grid fairing operation specifically comprises:
1. acquiring adjacency information of the digital mesh model, and recording an adjacency point set of each vertex i as N (i);
2. calculating the weight of each adjacent point of each vertex:
in the formula (10), the first and second groups,α ij and beta ij Are the two opposite corners of the edge (i, j).
3. According to the adjacency information and w ij Calculating the laplace coordinates L (i) of each point in the digital mesh model:
in the formula (11), p i Is the coordinate of vertex i, p j The coordinates of the adjacent point j to vertex i.
4. The original coordinate p i Updated to λ L (i) + p i (ii) a Wherein λ is a positive real number less than 1;
5. iterating the grid fairing step by m 1 Then, a second smoothing operation is performed.
Second step grid smoothing: selecting all triangular patches on the tumor, triangular patches at the tumor hole boundary on the blood vessel mesh model and n-neighborhood triangular patches thereof again, taking a digital mesh model formed by the triangular patches as the input of mesh fairing, and iterating the mesh fairing operation to perform m 2 Wherein m is 1 Should be much larger than m 2 . The mesh fairing process at the junction of the tumor mesh and the blood vessel digital model is shown in fig. 8, fig. 8 (a) is the original tumor mesh, fig. 8 (b) is the tumor mesh after the first step of fairing, and fig. 8 (c) is the tumor mesh after the second step of fairing.
A grid simplification module: the method is used for carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model; after the tumor grid is generated, grid simplification of strict boundary protection is carried out, so that grid density of the tumor grid and grid density of the blood vessel grid are not greatly different. Taking the whole tumor grid as an input grid, performing QEM (secondary error metric) grid simplification of strict margin, specifically including:
1. calculating error matrix Q for all initial vertices to obtain all valid edges (v) 1 ,v 2 ) (valid edge means edge of link); specifically, it is necessary to calculate the plane equations ax + by + cz + d =0 and a for all planes adjacent to one vertex 2 +b 2 +c 2 =1, stores parameters a, b, c, d, and constructs vector p = (a, b, c, d) T Calculating a quadratic basic error matrix K for each plane p :
All K of one vertex p The sum constitutes the error matrix Q for that point.
2. For each effective edge (v) 1 ,v 2 ) Calculating the optimal extraction target v and the cost of extracting the edge; if edge (v) 1 ,v 2 ) For a boundary edge, its decimation cost is set to infinity. For non-boundary valid edges (v) 1 ,v 2 ) Assuming it shrinks to a point v, rememberWherein Q 1 And Q 2 Are each v 1 And v 2 The error matrix of (2), then the decimation cost of the edge should beThe cost is derived and the value of v is calculated when the derivative is 0I.e. solving the equation:
in the formula (13), q ij Are the corresponding elements in the matrix Q. If the coefficient matrix is reversible, the optimal extraction target v can be obtained by solving the equation 0 If the coefficient matrix is not invertible, letGet v 1 And v 2 The midpoint of (a).
3. Storing all edges into a heap according to the size of the extraction cost;
4. each time the edge with the minimum extraction cost is removed, the vertex v is removed 1 ,v 2 Is combined toAnd update all ANDAnd calculating the number of triangular patches in the tumor mesh after the edge with the minimum removal cost according to the extraction cost and the optimal extraction position of the connected effective edges.
5. Repeating the steps until the number of the existing surfaces is smaller than a set threshold value;
experiments prove that the method is feasible and high in efficiency, and the time for generating the tumor lesion on the blood vessel digital model is within 1 s.
Fig. 12 is a schematic structural diagram of a hardware device of a method for generating a tumor in a digital vascular model according to an embodiment of the present application. As shown in fig. 12, the device includes one or more processors and memory. Taking a processor as an example, the apparatus may further include: an input system and an output system.
The processor, memory, input system, and output system may be connected by a bus or other means, as exemplified by the bus connection in fig. 12.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor executes various functional applications and data processing of the electronic device, i.e., the processing method of the above method embodiments, by running non-transitory software programs, instructions and modules stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, which may be connected to the processing system over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input system may receive input numeric or character information and generate a signal input. The output system may include a display device such as a display screen.
The one or more modules are stored in the memory and, when executed by the one or more processors, perform the following for any of the above method embodiments:
a, step a: selecting a tumor position on the blood vessel digital model;
step b: calculating the approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: smoothing the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory (non-volatile) computer storage medium having stored thereon computer-executable instructions that may perform the following operations:
step a: selecting a tumor position on the blood vessel digital model;
step b: calculating an approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strictly boundary-guaranteed grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
Embodiments of the present application provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the following:
step a: selecting a tumor position on the blood vessel digital model;
step b: calculating an approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strictly boundary-guaranteed grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
The method, the system and the electronic equipment for generating the tumor in the blood vessel digital model are used for enriching the case models which can be adopted in the field of virtual surgery and enabling the operation to be simple and efficient by designing the automatic generation and optimization method of the blood vessel tumor model. Compared with the prior art, the method has the following advantages:
1. the method has the advantages that the problem of limited source of case data does not exist, the method can be used almost without any learning cost, tumors can be constructed at almost any position in a normal blood vessel digital model, and the degree of freedom is high;
2. the method can calculate the approximate radius of any position of the blood vessel digital model, and can set the tumor radius and the hole radius in a self-adaptive manner according to the radius of the blood vessel model at the selected position when the tumor is generated, and manual setting is not needed each time;
3. after generating a tumor grid through longitude and latitude sampling, randomly selecting a certain number of control points on the tumor grid, and constructing irregular deformation on the surface of a tumor by keeping rigid deformation, so that richer tumor forms can be simulated;
4. after the tumor grid is generated, the transition of the joint of the tumor and the blood vessel model is smoother through two-step grid fairing, and the shape of the joint of the real tumor and the blood vessel is more consistent;
5. after the tumor grid is generated, grid simplification of strict boundary guarantee is carried out, so that grid density of the tumor grid and grid density of the blood vessel grid are not greatly different.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (11)
1. A method of generating a tumor in a digital model of a blood vessel, comprising the steps of:
step a: selecting a tumor position on the blood vessel digital model;
step b: calculating an approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle refining method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
2. The method for generating tumor in the digital vascular model according to claim 1, wherein in the step a, the tumor position is selected by: clicking a point on the blood vessel digital model, and taking the position information of the point as screen coordinate information; converting the screen coordinate information into world coordinate information, and connecting the world coordinate information and the position of the virtual camera into a ray; calculating the triangular patch on the digital model of the blood vessel intersected with the ray, and calculating the position T of the geometric center point of three vertexes of the triangle c At the position T c I.e. the tumor location chosen on the vessel digital model.
3. The method for generating tumor in the digital vascular model according to claim 2, wherein in the step b, the approximate radius calculation method specifically comprises:
step b1: the tumor position selected on the blood vessel digital model is taken as the center to obtain the peripheral radius of the tumor position as R init W triangular patches in R, and calculating the vector product of the normal vector of the 1 st triangular patch and the normal vector of the 2 nd triangular patchCalculating the cross product of the normal vector of the 2 nd triangular patch and the normal vector of the 3 rd triangular patchBy analogy, W-1 can be calculated m-1 Product of vectorAnd then calculate their mean
Step b2: taking a triangular patch f of the tumor position coordinate selected on the blood vessel digital model 0 Calculating the coordinates G of the center of gravity thereof 0 (x 0 ,y 0 ,z 0 ) By passingAnd G 0 To obtain a pass G 0 And is perpendicular toThe equation of point normal of the plane of (a), namely:
A′(x-x 0 )+B′(y-y 0 )+C′(z-z 0 )=0
step b3: setting a positive real number beta α Finding all barycentric coordinates G in all triangular patches constituting the digital model of the blood vessel i (x i ,y i ,z i ) Satisfies the inequality-beta is less than or equal to A' (x-x) i )+B′(y-y i )+C′(z-z i ) The triangular patches with the gravity center not larger than beta form a set F, the average value of the gravity center coordinates of all the triangular patches in the set F is calculated to obtain a point O 0 ;
And b4: calculating the gravity center and the point O of all triangular patches in the set F 0 Then the straight-line distance between them is averaged to obtain the average value R 0 The average value R 0 I.e. the approximate radius of the vessel numerical model at the selected tumor location.
4. The method for generating tumor in the blood vessel digital model according to claim 3, wherein in the step c, the constructing of the smooth and regular tumor mesh model specifically comprises:
step c1: with tumor position T selected on the vessel digital model c For the center of the sphere, a virtual sphere with radius r is generatedBody, R = α R 0 α is a value between 0 and 1;
step c2: performing collision detection on the virtual sphere and the blood vessel digital model to obtain all triangle sets S intersected with the virtual sphere col S, solving the average normal vector D of all triangular patches in the set S t The normal vector is the growth direction of the tumor;
and c3: will gather S col Deleting all triangular patches in the S from the blood vessel digital model to obtain an irregular boundary, wherein the set of all vertexes on the boundary is S bd ;
And c4: set the vertex S bd Each vertex on and the center of sphere T c Connecting the lines, and respectively obtaining the intersection point set S of the corresponding connecting line and the virtual sphere int ;
And c5: set the vertex S bd Set of sum intersections S int The top points are triangulated to form a circle of triangular mesh, and the intersection points are collected to form a set S int The vertex in (2) is taken as the vertex of the intersection position of the tumor and the blood vessel;
step c6: calculating the position P of the tumor center T And the tumor apex position P H :
P T =T c +(R 2 -r 2 )D t
P H =P T +RD t
In the above formula, R is the tumor radius, R = μ R, μ is a constant greater than 1, R = α R 0 ,R 0 The approximate radius of the vessel digital model at the selected tumor position;
step c7: set the intersection points S int Middle vertex and tumor vertex position P H Connecting to form a conical mesh, wherein the triangle set forming the mesh is S 0 To set S 0 Each triangle in the triangle set is subdivided to obtain a new triangle set S 1 Then to the set S 1 Each triangle in the set of triangles is subjected to the same subdivision operation, the operation is performed for N rounds, and the final triangle set S is obtained N I.e. a regular tumor mesh model.
5. The method for generating a tumor in a digital vascular model according to claim 4, wherein the subdividing each triangle specifically comprises: for each triangle in the set, if two of the three vertices A and B belong to the set of intersections S int Connecting the midpoints X and Y of the other two sides except the side consisting of the vertexes A and B, connecting any one of the midpoints X and Y with any one of the vertexes A and B, and dividing the original triangle into 3 points, wherein X and Y are newly added vertexes; if none of the three vertices of the triangle belongs to the set of vertices S int Then, the midpoints X, Y and Z of the three sides are taken and connected pairwise, the original triangle is divided into 4 triangles, and X, Y and Z are newly added vertexes; moving newly added vertexes X and Y or X, Y and Z to ray P respectively T X and P T Y or P T X、P T Y and P T And the final position of the Z and the virtual sphere is obtained at the intersection point of the Z and the virtual sphere.
6. The method according to claim 4, wherein the constructing irregular deformations on the surface of the tumor grid in step d specifically comprises:
step d1: generating a tumor mesh model S N An input mesh as a mesh morphing operation;
and d2: dividing a tumor grid into m parts, and randomly selecting q control points in each part; for each control point, selecting triangular surface patches in a certain range around the control point on the tumor mesh, and taking the vertexes of the triangular surface patches as free point sets corresponding to the control point;
step d3: setting the position constraint information of the control point as: the current control point moves along the normal direction of the point or the reverse direction of the normal direction by the distance of lambdar; wherein λ is a constant between greater than 0 and less than 1, R is the tumor radius;
step d4: and combining the input grid information, the control points and the free point set information corresponding to the control points and the fixed position constraint information to carry out rigidity-guaranteed grid deformation.
7. The method of generating a tumor in a digital model of a blood vessel as claimed in claim 6, wherein the rigid mesh deformation specifically comprises:
the first step is as follows: obtaining adjacency information of input mesh to make vertex v i Form a unit C with its 1-neighborhood triangular patch i ;
The second step is that: defining the rigid energy of each unit, and summing to obtain the overall rigid energy:
in the above formula, S' is the deformed input grid; e (S') is the stiffness energy of the entire mesh; n is the number of vertices in the input mesh, C i Is a vertex v i A unit formed by its 1-neighborhood triangular patch, C i ' is the unit after deformation, E (C) i ') is the stiffness energy of a unit, N (i) is the sum of the vertices v i Set of adjacent vertices, p i Is a vertex v i Coordinate of (a), p i The coordinate after deformation is p i ′,p j Is a vertex v j Coordinate of (a), p j The coordinate after deformation is p j ′,w ij Is an edge e ij Using the weight of the remainderα ij And beta ij Is an edge e ij Two opposite corners of (a); r i Is a unit C i Transforming the rotation matrixes before and after;
the third step: determining an initial guess of the transformed vertex coordinates; for a selected control point, its initial guess is a fixed position constraint set previously; for the free point, by minimizing | | | Lp' - δ | | | light yellow 2 Determining an initial guess, where δ = Lp, p is the coordinates of the vertices in the initial mesh input by the user, and p' is the control point coordinates after they have been changed according to the fixed position constraint described aboveCoordinates of vertices in the mesh; | Lp' -delta | purple light 2 To achieve the minimum, lp' = Lp, where the matrix L is defined as follows:
in the above formula, w ij Is an edge e ih Using the weight of the remainderN (i) is associated with the vertex v i A set of adjacent vertices; by further calculation and simplification, one can obtain: a. The T AX free =A T (Lp-BX fixed ) Solving the system of equations to obtain X free I.e. the initial guess of the free point;
the fourth step: using the transformed vertex coordinates p i ', calculating the optimal rotation matrix of all deformation units by using singular value decomposition;
the fifth step: solving a linear equation set by using the current optimal rotation matrix to obtain a new vertex coordinate; when R is i After determination, by solving a system of linear equationsObtaining p 'which minimizes E (S'), for each p i The following equation can be derived:
the linear combination on the left side of the above equation is the discrete Laplace-Belladiella operator for p', so the system of equations is written as: lp' = b; solving the equation set to obtain p';
and a sixth step: and the fourth step and the fifth step are executed iteratively until the integral rigidity energy is less than the set threshold value.
8. The method for generating tumor in the digital model of blood vessel as claimed in claim 6, wherein in the step e, the fairing processing procedure comprises:
step e1: selecting a triangular patch of a tumor hole boundary on a blood vessel mesh model and an n-neighborhood triangular patch thereof, and taking a digital mesh model formed by the triangular patches as the input of a first-step mesh fairing operation:
acquiring adjacency information of the digital mesh model, and recording the adjacency point set of each vertex i as N (i);
calculating the weight of each adjacent point of each vertex:
according to adjacency information and w ij Calculating the laplace coordinates L (i) of each point in the digital mesh model:
in the above formula, p i Is the coordinate of vertex i, p j Coordinates of an adjacent point j being a vertex i;
the original coordinate p i Updated to λ L (i) + p i (ii) a Wherein λ is a positive real number less than 1;
iterating the grid fairing step by m 1 Secondly;
step e2: selecting all triangular patches on the tumor, triangular patches at the tumor hole boundary on the blood vessel mesh model and n-neighborhood triangular patches thereof, taking a digital mesh model formed by the triangular patches as the input of mesh fairing, and iterating the mesh fairing operation to perform m 2 Wherein m is 1 Ying YuanGreater than m 2 。
9. The method of claim 8, wherein in the step f, the mesh reduction for strictly bounding the tumor mesh model specifically comprises:
step f1: calculating error matrix Q for all initial vertexes to obtain all effective edges (v) 1 ,v 2 );
Step f2: for each effective edge (v) 1 ,v 2 ) Calculating the optimal extraction target v and the cost of extracting the edge;
step f3: storing all edges into a heap according to the size of the extraction cost;
step f4: each time the edge with the minimum extraction cost is removed, the vertex v is removed 1 ,v 2 Is incorporated intoAnd update all of the ANDsExtracting cost and the best extracting position of the connected effective edges, and calculating the number of triangular patches in the tumor mesh after the edge with the minimum cost is removed;
step f5: repeating steps f1 to f4 until the number of existing faces is smaller than a set threshold.
10. A system for generating a tumor in a digital model of a blood vessel, comprising:
tumor position selection module: the tumor position is selected on the blood vessel digital model;
an approximate radius calculation module: calculating an approximate radius of the vessel numerical model at the tumor position based on a plane-based point-normal equation;
tumor grid construction module: the system is used for generating a virtual sphere by taking the selected tumor position as the sphere center, deleting collision triangles after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the virtual sphere center, and constructing a smooth and regular tumor mesh model by an iterative triangle thinning method;
tumor mesh deformation module: the system is used for editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
a grid fairing processing module: the system is used for smoothing the joint of the tumor mesh model and the blood vessel digital model;
a grid simplification module: and the grid simplification module is used for strictly guaranteeing the boundary of the tumor grid model to obtain the generation result of the tumor in the blood vessel digital model.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the following operations of the method of generating a tumor in a digital model of a blood vessel as set forth in any one of the preceding claims 1 to 9:
step a: selecting a tumor position on the blood vessel digital model;
step b: calculating the approximate radius of the blood vessel digital model at the tumor position based on a point-method equation of a plane;
step c: generating a virtual sphere by taking the selected tumor position as a sphere center, deleting a collision triangle after the virtual sphere collides with the blood vessel digital model, generating a cavity in a mode of growing to the center of the virtual sphere, and constructing a smooth and regular tumor mesh model by an iterative triangle thinning method;
step d: editing the surface of the tumor grid model, selecting a certain number of control points, and constructing irregular deformation on the surface of the tumor grid through rigid deformation;
step e: performing fairing treatment on the joint of the tumor mesh model and the blood vessel digital model;
step f: and carrying out strict boundary-preserving grid simplification on the tumor grid model to obtain a generation result of the tumor in the blood vessel digital model.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911146350.8A CN110956698B (en) | 2019-11-21 | 2019-11-21 | Method, system and electronic device for generating tumor in blood vessel digital model |
PCT/CN2020/128855 WO2021098617A1 (en) | 2019-11-21 | 2020-11-13 | Method for generating tumor in digital blood vessel model, system, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911146350.8A CN110956698B (en) | 2019-11-21 | 2019-11-21 | Method, system and electronic device for generating tumor in blood vessel digital model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110956698A CN110956698A (en) | 2020-04-03 |
CN110956698B true CN110956698B (en) | 2023-02-10 |
Family
ID=69977874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911146350.8A Active CN110956698B (en) | 2019-11-21 | 2019-11-21 | Method, system and electronic device for generating tumor in blood vessel digital model |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110956698B (en) |
WO (1) | WO2021098617A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110956698B (en) * | 2019-11-21 | 2023-02-10 | 中国科学院深圳先进技术研究院 | Method, system and electronic device for generating tumor in blood vessel digital model |
CN114366295B (en) * | 2021-12-31 | 2023-07-25 | 杭州脉流科技有限公司 | Microcatheter path generation method, shaping method of shaping needle, computer device, readable storage medium, and program product |
CN114996996B (en) * | 2022-05-19 | 2024-05-17 | 电子科技大学 | 3D capillary growth method based on phase field model |
CN116563490B (en) * | 2023-03-27 | 2024-01-23 | 浙江大学 | Full-automatic quadrilateral boundary layer grid generation method based on rigid mapping |
CN117010042B (en) * | 2023-09-28 | 2023-12-29 | 武汉必盈生物科技有限公司 | Extension method and device for external fixation wrist of 3D printing |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105869218A (en) * | 2016-03-28 | 2016-08-17 | 中国科学院深圳先进技术研究院 | Method and apparatus for editing tumor lesion of blood vessel digital model |
CN106920282A (en) * | 2015-12-25 | 2017-07-04 | 中国科学院深圳先进技术研究院 | The edit methods and system of a kind of blood vessel mathematical model |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101768526B1 (en) * | 2012-07-27 | 2017-08-17 | 삼성전자주식회사 | Method and apparatus for creating model of patient specified target organ based on blood vessel structure |
CN103093503B (en) * | 2013-02-08 | 2015-08-05 | 河北大学 | Based on the method for building up of the pulmonary parenchyma region surface model of CT image |
CN105243945A (en) * | 2015-11-19 | 2016-01-13 | 王峻峰 | Tumor grid organ model 3D printing method |
CN110956698B (en) * | 2019-11-21 | 2023-02-10 | 中国科学院深圳先进技术研究院 | Method, system and electronic device for generating tumor in blood vessel digital model |
-
2019
- 2019-11-21 CN CN201911146350.8A patent/CN110956698B/en active Active
-
2020
- 2020-11-13 WO PCT/CN2020/128855 patent/WO2021098617A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106920282A (en) * | 2015-12-25 | 2017-07-04 | 中国科学院深圳先进技术研究院 | The edit methods and system of a kind of blood vessel mathematical model |
CN105869218A (en) * | 2016-03-28 | 2016-08-17 | 中国科学院深圳先进技术研究院 | Method and apparatus for editing tumor lesion of blood vessel digital model |
Also Published As
Publication number | Publication date |
---|---|
WO2021098617A1 (en) | 2021-05-27 |
CN110956698A (en) | 2020-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110956698B (en) | Method, system and electronic device for generating tumor in blood vessel digital model | |
CN109285225B (en) | Medical image-based virtual reality assisted surgery establishing method | |
Cheng et al. | A morphing-Based 3D point cloud reconstruction framework for medical image processing | |
CN106875462B (en) | Real-time digital organ cutting method based on meta-sphere model and hybrid driving method | |
CN113781667B (en) | Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium | |
CN110889901B (en) | Large-scene sparse point cloud BA optimization method based on distributed system | |
CN114792326A (en) | Surgical navigation point cloud segmentation and registration method based on structured light | |
CN111369662A (en) | Three-dimensional model reconstruction method and system for blood vessels in CT (computed tomography) image | |
CN117635634A (en) | Image processing method, device, electronic equipment, chip and storage medium | |
Cameron et al. | Patient-Specific Anatomic Models-Geometric Surface Generation from Three-Dimensional Medical Images Using a Specified Polygonal Budget | |
Selmi et al. | 3D interactive ultrasound image deformation for realistic prostate biopsy simulation | |
CN110689080A (en) | Planar atlas construction method of blood vessel structure image | |
Zhang et al. | Skeleton Based As-Rigid-As-Possible Volume Modeling. | |
CN112381825B (en) | Method for focal zone image geometric feature extraction and related products | |
CN115457205A (en) | Method, device, equipment and medium for constructing three-dimensional visceral organ model | |
CN107085866A (en) | The analog simulation method and system of a kind of straight bone CT images of human body | |
CN114119928A (en) | Grid operation-based lung organ three-dimensional model optimization method and system | |
CN114283159A (en) | Image data processing method, computer device and storage medium | |
Nakashima et al. | Interactive Deformation of Structurally Complex Heart Models Constructed from Medical Images. | |
Cameron et al. | Surface generation for virtual reality displays with a limited polygonal budget | |
CN111445585B (en) | Three-dimensional shape corresponding method and device based on dual convex hull domain | |
Mingshi et al. | Assisted system for precise surgery based on medical image computing and VR | |
Trabelsi et al. | 3D Active Shape Model for CT-scan liver segmentation | |
CN109036567B (en) | Soft tissue deformation simulation method based on subspace condensation algorithm | |
CN108261240A (en) | The preoperative planning of minimally invasive cardiac surgery and operation virtual reality simulation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |