CN108389203B - Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment - Google Patents

Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment Download PDF

Info

Publication number
CN108389203B
CN108389203B CN201810217643.XA CN201810217643A CN108389203B CN 108389203 B CN108389203 B CN 108389203B CN 201810217643 A CN201810217643 A CN 201810217643A CN 108389203 B CN108389203 B CN 108389203B
Authority
CN
China
Prior art keywords
volume
patch
point
dimensional virtual
vertices
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
Application number
CN201810217643.XA
Other languages
Chinese (zh)
Other versions
CN108389203A (en
Inventor
韩月乔
田广野
陈永健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Medical Equipment Co Ltd
Original Assignee
Qingdao Hisense Medical Equipment Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Medical Equipment Co Ltd filed Critical Qingdao Hisense Medical Equipment Co Ltd
Priority to CN201810217643.XA priority Critical patent/CN108389203B/en
Publication of CN108389203A publication Critical patent/CN108389203A/en
Application granted granted Critical
Publication of CN108389203B publication Critical patent/CN108389203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/30Polynomial surface description
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30056Liver; Hepatic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30096Tumor; Lesion

Abstract

The invention discloses a volume calculation method, a volume calculation device, a storage medium and volume calculation equipment of a three-dimensional virtual organ, and belongs to the technical field of computers. The method comprises the following steps: generating a Bezier curved surface intersected with the three-dimensional virtual organ, wherein the three-dimensional virtual organ formed by the surface patches comprises a pathological change tissue and a non-pathological change tissue which are separated by the Bezier curved surface; classifying the vertices into a first set of vertices in patches of diseased tissue or a second set of vertices in patches of non-diseased tissue according to depths between mapped points on the Bessel surface and vertices in patches mapped to the mapped points; calculating the volume of a prism formed by the mapping points and the surface patches mapped by the mapping points; and adding the volumes corresponding to all the vertexes in the first vertex set to obtain the volume of the pathological tissue, and adding the volumes corresponding to all the vertexes in the second vertex set to obtain the volume of the non-pathological tissue. The invention can improve the calculation efficiency of the volume.

Description

Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment
Technical Field
The invention relates to the technical field of computers, in particular to a volume calculation method, a volume calculation device, a storage medium and volume calculation equipment of a three-dimensional virtual organ.
Background
In recent years, a doctor has made a clinical operation plan for a lesion tissue such as a tumor by analyzing a three-dimensional virtual organ including the lesion tissue by a computer-assisted surgery system. However, since the vascular system inside the three-dimensional virtual organ is complex, the doctor cannot acquire the three-dimensional spatial relationship between the blood vessel and the lesion tissue, and therefore, the doctor can only make a surgical plan by means of two-dimensional medical images.
In the related art, a computer-assisted surgery system acquires two-dimensional cross-sectional CT (Computed Tomography) images of a three-dimensional virtual organ including lesion tissues such as a tumor, displays the two-dimensional cross-sectional CT images one by one on a screen, receives a cutting curve drawn by a user on each two-dimensional cross-sectional CT image by using a mouse, fits the cutting curves on all the two-dimensional cross-sectional CT images to obtain a cutting curved surface, and multiplies the number of pixel points on both sides of the cutting curved surface by the unit volume of the pixel points to obtain the volumes of the lesion tissues and the non-lesion tissues.
Because the cutting curved surface that the doctor hand painted is comparatively rough, so, the quantity of the pixel of two parts of cutting curved surface segmentation is inaccurate, leads to the volume that the calculation obtained inaccurate.
Disclosure of Invention
The embodiment of the invention provides a volume calculation method, a volume calculation device, a storage medium and volume calculation equipment of a three-dimensional virtual organ, which are used for solving the problem of inaccurate volume calculation caused by rough cutting of a curved surface. The technical scheme is as follows:
in a first aspect, a method for calculating a volume of a three-dimensional virtual organ is provided, the method comprising:
generating a Bezier surface intersecting the three-dimensional virtual organ, the three-dimensional virtual organ composed of patches including diseased tissue and non-diseased tissue separated by the Bezier surface;
classifying the vertices into a first set of vertices in patches of the diseased tissue or a second set of vertices in patches of the non-diseased tissue according to depths between mapped points on the Bezier surface and vertices in the patches mapped to the mapped points;
calculating the volume of the prism formed by the mapping point and the surface patch mapped by the mapping point;
and adding the volumes corresponding to all the vertexes in the first vertex set to obtain the volume of the pathological tissue, and adding the volumes corresponding to all the vertexes in the second vertex set to obtain the volume of the non-pathological tissue.
In a second aspect, there is provided a volume calculation apparatus for a three-dimensional virtual organ, the apparatus comprising:
a generating module, further configured to generate a bezier surface intersecting the three-dimensional virtual organ, the three-dimensional virtual organ composed of patches including diseased tissue and non-diseased tissue separated by the bezier surface;
a classification module to classify vertices in a patch of the diseased tissue or a patch of the non-diseased tissue into a first set of vertices in the patch of the diseased tissue or a second set of vertices in the patch of the non-diseased tissue according to depths between mapped points on the Bezier surface and the vertices in the patch mapped to the mapped points;
the calculation module is used for calculating the volume of a prism formed by the mapping points and the surface patches mapped by the mapping points;
the calculation module is further configured to add volumes corresponding to all vertices in the first vertex set to obtain a volume of the diseased tissue, and add volumes corresponding to all vertices in the second vertex set to obtain a volume of the non-diseased tissue.
In a third aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the volume calculation method for a three-dimensional virtual organ according to the first aspect.
In a fourth aspect, there is provided a volume calculation device for a three-dimensional virtual organ, comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the volume calculation method for a three-dimensional virtual organ according to the first aspect.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
because the generated Bezier curved surface is generated according to the control points, the problem that when a user manually draws the cutting curved surface, the obtained cutting curved surface is rough, so that the calculation of the volume is inaccurate can be solved, and the accuracy of the volume is improved.
The volume of the prism formed by the mapping points of the vertexes on the Bessel curved surface and the surface patches is calculated, and then the volumes of the prisms are added to obtain the volume of the pathological change tissue and the volume of the non-pathological change tissue.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for calculating a volume of a three-dimensional virtual organ according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for calculating a volume of a three-dimensional virtual organ according to another embodiment of the present invention;
FIGS. 3A and 3B are schematic diagrams of a three-dimensional virtual organ of a liver according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a Bezier curve provided by another embodiment of the present invention;
FIG. 5 is a schematic view of a Bessel surface provided by another embodiment of the present invention;
FIG. 6 is a schematic view of a Bezier surface and control stick provided by another embodiment of the present invention;
FIG. 7 is a schematic diagram of an enclosure provided by another embodiment of the present invention;
FIG. 8 is a diagram of a first 25 control points provided in accordance with another embodiment of the present invention;
FIG. 9 is a diagram of a second 25 control points provided in accordance with another embodiment of the present invention;
FIGS. 10A and 10B are schematic diagrams of deformation of a Bessel surface according to another embodiment of the present invention;
FIGS. 11A to 11H are schematic diagrams illustrating adjustment of a Bezier surface in a three-dimensional virtual organ according to another embodiment of the present invention;
FIG. 12 is a block diagram of a volume calculation apparatus for a three-dimensional virtual organ according to an embodiment of the present invention;
fig. 13 is a block diagram of a volume calculation apparatus for a three-dimensional virtual organ according to still another embodiment of the present invention;
FIG. 14 is a block diagram of a computer-assisted surgery system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a method for calculating a volume of a three-dimensional virtual organ, which can be applied to a computer-assisted surgery system, according to an embodiment of the present invention is shown. The volume calculation method of the three-dimensional virtual organ comprises the following steps:
step 101, generating a Bezier curved surface intersected with a three-dimensional virtual organ, wherein the three-dimensional virtual organ formed by patches comprises a pathological tissue and a non-pathological tissue which are separated by the Bezier curved surface.
Step 102, classifying the vertices into a first set of vertices in patches of diseased tissue or a second set of vertices in patches of non-diseased tissue according to depths between mapped points on the Bessel surface and vertices in patches mapped to the mapped points.
And 103, calculating the volume of a prism formed by the mapping points and the surface patches mapped by the mapping points.
And 104, adding the volumes corresponding to all the vertexes in the first vertex set to obtain the volume of the pathological tissue, and adding the volumes corresponding to all the vertexes in the second vertex set to obtain the volume of the non-pathological tissue.
In summary, according to the volume calculation method for a three-dimensional virtual organ provided by the embodiment of the present invention, since the generated bezier curved surface is generated according to the control point, the problem of inaccurate volume calculation due to a rough cutting curved surface obtained when the cutting curved surface is manually drawn by a user can be avoided, so as to improve the accuracy of the volume.
The volume of the prism formed by the mapping points of the vertexes on the Bessel curved surface and the surface patches is calculated, and then the volumes of the prisms are added to obtain the volume of the pathological change tissue and the volume of the non-pathological change tissue.
Referring to fig. 2, a flowchart of a method for calculating a volume of a three-dimensional virtual organ according to another embodiment of the present invention is shown, wherein the method for calculating a volume of a three-dimensional virtual organ can be applied to a computer-assisted surgery system. The volume calculation method of the three-dimensional virtual organ comprises the following steps:
step 201, generating a Bezier curved surface intersected with the three-dimensional virtual organ, wherein the three-dimensional virtual organ formed by the patches comprises a lesion tissue and a non-lesion tissue which are separated by the Bezier curved surface.
Before generating a bezier surface, a three-dimensional virtual organ including lesion tissues needs to be generated, and the three-dimensional virtual organ is composed of each patch. The diseased tissue may be a diseased tissue in an organ, such as a tumor, among others.
The computer-assisted surgery system may be a three-dimensional virtual organ obtained by three-dimensional reconstruction of a two-dimensional medical image sequence. Specifically, the computer-assisted surgery system may generate a series of patches through a shader in a GPU (Graphics Processing Unit), and stitch all the patches into a three-dimensional virtual organ. Because the processing capacity of the GPU is strong, that is, the GPU can process a large amount of data, the patch can be set as small as possible, and thus, the generated three-dimensional virtual organ can be relatively smooth. The patch may be a triangular patch or a patch with other shapes, and this embodiment is not limited.
Referring to fig. 3A and 3B, for convenience of understanding, the present embodiment is described by taking a three-dimensional virtual organ of a liver as an example, fig. 3A is a line drawing of the liver, fig. 3B is a schematic diagram of the liver, and a filling portion at the lower left of the liver in the three-dimensional virtual organ is a lesion tissue.
After the three-dimensional virtual organ is generated, a Bezier curved surface intersecting the three-dimensional virtual organ is generated, the mapping point of any vertex of each patch on the Bezier curved surface is determined, and the mapping point of the control point of the Bezier curved surface on the Bezier curved surface is determined.
Bezier surfaces are formed by two sets of orthogonal Bezier (Bezier) curve designs.
Wherein, the definition of Bezier curve is: n +1 points P in a given space0,P1,…PnBalance of
Figure BDA0001598965490000051
Be a bezier curve of order n. Wherein the content of the first and second substances,
Figure BDA0001598965490000052
and i belongs to [0, n ]]。P0,P1,…PnA control point of C (t), C (t) is for P0,P1,…PnIs calculated. For ease of understanding, a 3 rd order Bezier curve is illustrated, and referring to FIG. 4, the Bezier curve passes through P0And P3Is approaching P1And P2
After the Bezier curve is known, the Bezier surface can be described according to the tensor product form of the Bezier mixing function, and the formula of the Bezier surface is
Figure BDA0001598965490000053
And (u, v) is E [0, 1]],Pi,jThere are (m +1) × (n +1) control points. Referring to fig. 5, a diagram of a bezier surface is shown.
In this embodiment, the bezier surface is generated to simulate and cut a lesion tissue included in the three-dimensional virtual organ, so that a doctor can conveniently make an operation plan. Therefore, the bezier surface generated by the computer-assisted surgery system needs to intersect the three-dimensional virtual organ in order to isolate the diseased tissue from the non-diseased tissue.
In this embodiment, the computer-assisted surgery system may further generate a bezier curved surface of a self-adaptive size according to the size of the three-dimensional virtual organ, thereby avoiding a problem that the bezier curved surface is not easily modified when the bezier curved surface is too large, and the lesion tissue cannot be completely isolated when the bezier curved surface is too small. The following describes a procedure for generating an adaptively sized bezier surface.
Specifically, the method for generating the Bessel curved surface intersected with the three-dimensional virtual organ comprises the following five steps:
in step 2011, bounding boxes are calculated according to coordinates of patches in the three-dimensional virtual organ.
In this embodiment, since the three-dimensional virtual organ is generated by the GPU in the computer-assisted surgery system, the coordinates of the vertices of each patch in the three-dimensional virtual organ are known. The computer-assisted surgery system may find the minimum value and the maximum value of each axis direction in the coordinates of all the vertices, and generate one bounding box by using the minimum value of the three axis directions as the minimum point of the bounding box and the maximum value of the three axis directions as the maximum point of the bounding box.
Optionally, after the bounding box is generated, the computer-assisted surgery system may further select an intermediate point on a diagonal of the bounding box, and display a line segment from the intermediate point to an end point of the diagonal as a joystick, the joystick being used for updating a position and an angle at which the bezier surface intersects the three-dimensional virtual organ. Wherein the direction of the control rod can be any direction. Referring to fig. 6, the control rod is perpendicular to the bezier curve.
Step 2012, select fiducial points from the edges located in the bounding box and calculate coordinates of the fiducial points.
When the reference point is 4 points selected from each side of the bounding box, the computer-assisted surgery system selects 4 points from each side of the bounding box, and since the coordinates of each vertex of the bounding box are known, the computer-assisted surgery system can calculate the coordinates of the 4 points according to the coordinates of each vertex.
The 4 points selected by the computer-assisted surgery system may be located in the same plane or not, and the embodiment is not limited.
The bounding box of the three-dimensional virtual organ may be any shape, and the present embodiment is described only by taking the shape of the bounding box as a cube as an example, please refer to fig. 7, which shows 4 selected points, and it is assumed that the 4 points are vertex _1, vertex _2, vertex _3, and vertex _4, respectively.
And 2013, determining the coordinates of the control points according to the coordinates of the reference points.
The computer-assisted surgery system may generate n control points by using a Principal Component Analysis (PCA), where n is a positive integer, and the generation process is as follows: firstly, solving a covariance matrix of a point set (vertex _1, vertex _2, vertex _3 and vertex _ 4); and finally, generating n control points according to the eigenvalue E _ values of the covariance matrix and the corresponding eigenvectors E _ vectors, and according to the half Length (Length) of the control rod, the coordinate of the midpoint of the control rod, the eigenvalue E _ values, the eigenvectors E _ vectors and the bounding box. The covariance matrix is used for dimension reduction, so that coordinates of 4 points are reduced from three-dimensional coordinates to two-dimensional coordinates.
In one implementation, the coordinates of the control point located at the origin may be calculated by the following code.
glm::vec3Corigin_new
=vec3((Corigin_old.x-length*E_vector[1].x-length*E_vector[2].x),
(Corigin_old.y-length*E_vector[1].y-length*E_vector[2].y),
(Corigin_old.z-length*E_vector[1].z-length*E_vector[2].z))
Wherein E _ vector [1] and E _ vector [2] are two larger feature vectors, that is, E _ vector [1] may be a vector in the directions of x-axis, y-axis and z-axis, and E _ values is a value in the direction; e _ vector [2] may be a vector in the x-axis, y-axis, z-axis directions, and E _ values are its values in that direction.
After obtaining the coordinates of the origin, the computer-assisted surgery system may arrange n control points at equal intervals in an m × m grid, where the Length and width of the grid are both half the Length of the joystick (Length), and the computer-assisted surgery system may calculate the coordinates of the remaining n-1 control points by using the following code, where m × m ═ n.
for i 1to 5do
for j 1to5do
Ci,j=Corigin_new+i*(length/4)*E_vector[1]+j*(length/4)*E_vector[2]
Referring to fig. 8, taking n as 25 as an example, the positional relationship of 25 control points is shown.
Step 2014, setting the step length of the change of the abscissa u and the ordinate v, changing u and v according to the step length, and inputting the coordinates of the u, v and n control points obtained each time into a formula
Figure BDA0001598965490000071
Figure BDA0001598965490000072
The smaller the change step length of u and v is, the more points on the generated Bezier surface are, and the smoother the generated inner Seer surface is. In a possible implementation manner, the step size of u and v is 0.01, and the step size is not limited in this embodiment.
The computer-assisted surgery system inputs the coordinate sum (u, v) of each control point into the formula of the Bezier surface to obtain a series of coordinate points (x, y, z).
Step 2015, rendering each coordinate point output by the formula to obtain a Bessel curved surface.
The computer-assisted surgery system generates each patch according to the sequence of the discrete (x, y, z) coordinate points, and renders all the patches to obtain the Bessel surface.
Since the calculation amount of the part is large, in order to ensure the real-time performance of the display, the Bezier surface can be generated through the GPU.
After the bezier surface is generated, since part of the control points of the bezier surface are above the bezier surface, the mapping points of the control points of the bezier surface on the bezier surface also need to be determined, which includes the following four steps:
step 2016, arrange the control points equidistantly in an m × m grid.
The computer-assisted surgery system may acquire n control points first, and then arrange the n control points in an m × m grid at equal intervals, where m × m is n.
And 2017, calculating the length and the width of the grid according to the vertex coordinates of the grid, and calculating the coordinates of the remaining control points in the grid according to the proportional relation of the length, the width and the equal distance.
As the coordinates of the 1 st control point are known as (u-0, v-0), the coordinates of the 5 th control point are known as (u-1, v-0), the coordinates of the 20 th control point are known as (u-0, v-1), and the coordinates of the 25 th control point are known as (u-1, v-1), please refer to fig. 9, the length l _ u and the width l _ v of the grid can be calculated. Of course, n may be other values, and this embodiment is not limited.
The coordinates of the remaining n-4 control points in the grid are calculated as follows:
length _ u ═ length (ctrl _ points [4] -ctrl _ points [0 ]); length is a function of the length
length_v=length(ctrl_points[20]-ctrl_points[0]);
un/1=dot(ctrl_points[n]-ctrl_points[0],ctrl_points[4]-ctrl_points[0]) Length _ u; dot is a function of a dot product of two vectors
vn/1=dot(ctrl_points[n]-ctrl_points[0],ctrl_points[20]-ctrl_points[0])/length_v;
Thus, the control point ctrl _ points [ n ] can be obtained]Corresponding parameter value unAnd vn,(un,vn)∈[0,1]。
Step 2018, substituting the coordinates of the remaining control points into formulas
Figure BDA0001598965490000081
Figure BDA0001598965490000082
Step 2019, the output of the formula is used as the mapping point.
If ctrl _ points [ n ]]Corresponding parameter valueunAnd vnInputting the formula, the output S (u) of the formulan,vn) That is, the control point ctrl _ points [ n ]]Mapping point map _ points [ n ] on Bessel surface]。
After the Bezier surface is generated, the mapping point of any vertex of each patch on the Bezier surface can be determined, and the method comprises the following four steps:
at step 2091, the control points are arranged equidistantly in an m × m grid.
Step 2092, calculating the length and width of the mesh according to the vertex coordinates of the mesh, and calculating the coordinates of any vertex of the patch according to the proportional relation of the length, the width and the equal distance.
As the coordinates of the 1 st control point are known as (u-0, v-0), the coordinates of the 5 th control point are known as (u-1, v-0), the coordinates of the 20 th control point are known as (u-0, v-1), and the coordinates of the 25 th control point are known as (u-1, v-1), please refer to fig. 9, the length _ u and the width _ v of the grid can be calculated. Of course, n may be other values, and this embodiment is not limited.
The coordinates of any one vertex of the remaining patches in the mesh are calculated as follows:
length _ u ═ length (ctrl _ points [4] -ctrl _ points [0 ]); length is a function of the length
length_v=length(ctrl_points[20]-ctrl_points[0]);
One vertex of one patch is data _ vertex [ i ]]Corresponding parameter value is unAnd vn,(un,vn)∈[0,1];
Then u isn/1=dot(data_vertex[m]-ctrl_points[0],ctrl_points[4]-ctrl_points[0]) (length _ u); dot is a function of a dot product of two vectors
vn/1=dot(data_vertex[m]-ctrl_points[0],ctrl_points[20]-ctrl_points[0])/(length_v*length_v);
Thus, the vertex data _ vertex [ i ] can be obtained]Corresponding parameter value (u)n,vn)。
Step 2093, substituting the coordinates of the vertices into formulas
Figure BDA0001598965490000091
Figure BDA0001598965490000092
At step 2094, the output of the formula is used as the mapped point.
In step 202, the vertices are classified into a first set of vertices in patches of diseased tissue or a second set of vertices in patches of non-diseased tissue according to depths between mapped points on the Bessel surface and the vertices in the patches mapped to the mapped points.
Wherein the first set of vertices includes vertices in patches of diseased tissue and the second set of vertices includes vertices in patches of non-diseased tissue.
Classifying the vertexes into a first vertex set or a second vertex set according to the depth of each vertex and the corresponding mapping point, and the method comprises the following four steps:
step 2021, a first vector is generated according to the vertex in the patch and the minimum control point in the bezier surface, and a first projection length of the first vector on the normal vector of the bezier surface is calculated.
The normal vector is a direction vector of the control lever, and if the normal vector is (1.0, 0.0, 0.0), it represents that the normal vector is the x axis.
Assuming that the smallest control point in the bezier surface is control point 0, which is denoted as ctrl _ points [0], the vertex is data _ vertex [ m ], and the normal vector is plane _ normal, the first vector is e _ vertex [ m ] ═ data _ vertex [ m ] -ctrl _ points [0], and the first projection length is distance _ vertex [ m ] ═ dot (e _ vertex [ m ], plane _ normal).
Step 2022, generate a second vector according to the mapping point and the control point, and calculate a second projection length of the second vector on the normal vector.
Assuming that the mapping point of the vertex is e _ map _ vertex [ m ], the second vector is e _ map _ vertex [ m ] ═ map _ vertex [ m ] -ctrl _ points [0], and the second projection length is distance _ map _ vertex [ m ] ═ dot (e _ map _ vertex [ m ], plane _ normal).
Step 2023, when the first projection length is smaller than the second projection length, classifying the vertex into a first vertex set.
Step 2024, when the first projection length is greater than the second projection length, classifying the vertex into a second vertex set.
In implementation, the vertex is classified into different first vertex set and second vertex set, which can be implemented by setting a mark on the vertex, and the embodiment does not limit the form of the mark. In one implementation, the assumptions are labeled 0 and 1, and labeling a vertex as 0 indicates that the vertex belongs to the first set of vertices and labeling a vertex as 1 indicates that the vertex belongs to the second set of vertices.
In this embodiment, the classification of the vertices is merely used for illustration, and the patches to which the vertices belong may also be classified, which is not limited in this embodiment.
Step 203, calculating the volume of the prism formed by the mapping point and the surface patch mapped by the mapping point.
When the facet is a triangular facet, the prism is a triangular prism, and the shape of the prism is not limited in this embodiment.
Specifically, the method for calculating the volume of the prism formed by the mapping point and the surface patch mapped by the mapping point comprises the following five steps:
step 2031, calculating a normal vector surf of the patch according to the edge of the patch mapped by the mapping point.
Since the vertices in the patch are sequentially arranged, for example, when the patch is a triangle patch, the sequentially arranged three vertices are data _ vertex [ m ], data _ vertex [ m +1], and data _ vertex [ m +2], respectively.
The computer-assisted surgery system may calculate a vector composed of any two sides of the triangle patch, for example, direction _1 ═ data _ vertex [ m +1] -data _ vertex [ m ]; direction _2 ═ data _ vertex [ m +2] — "data _ vertex [ m +1], then the normal vector surf of the triangle patch is cross (direction _1, direction _ 2).
Step 2032, calculate the volume of the prism according to the formula 0.5 dot (surf, direction), dot is the function of the dot product of two vectors, and direction is the length of the connecting line between the mapping point and the vertex.
Taking a triangular prism as an example, the actual volume _ prism of the triangular prism is 0.5 dot (surf, direction) 0.5 | surf | direction | cos < surf, direction >.
Step 2033, convert the volume of the prism to a multiple of the volume of the unit pixel.
Taking the organ as a liver, the volume unit of the liver is ml, and the volume unit of the prism is mm3Therefore, the computer-assisted surgery system also needs to convert the volume units of the prism into the volume units of the liver.
volume _ prism _ lever ═ volume _ prism/1000 unit _ volume; the unit _ volume is a liver volume of a corresponding unit pixel obtained from any medical image.
Step 2034, when the directions of the normal vector of the facet and the normal vector of the bezier surface are the same, taking the positive value of the multiple as the final volume of the prism.
For example, when the multiple is 4 and the directions of the normal vector of the patch and the normal vector of the bezier surface are the same, it is determined that the volume of the prism is + 4.
Step 2035, when the directions of the normal vector of the surface patch and the normal vector of the bezier surface are opposite, taking the negative value of the multiple as the final volume of the prism.
For example, when the multiple is 4 and the directions of the normal vector of the patch and the normal vector of the bezier surface are opposite, the volume of the prism is determined to be-4.
Alternatively, since the bezier surface may intersect some patches, it is desirable to avoid the computation of the prism volumes corresponding to these patches. Before calculating a normal vector surf of the patch according to the edge of the patch to which the vertex belongs, the method further includes: generating a vector according to the vertex and the mapping point; and when the modulus of the vector is larger than a preset threshold value, triggering and executing the step of calculating the normal vector surf of the patch according to the edge of the patch mapped by the mapping point.
A vector formed by the vertex data _ vertex [ m ] of the patch and the mapping point map _ vertex [ m ] is direction ═ map _ vertex [ m ] -data _ vertex [ m ], and the modulo length (direction) of the vector can be calculated, if the modulo is larger than a preset threshold value, the patch is not intersected with the Bessel curved surface, and the volume of the prism corresponding to the patch is calculated; if the modulus is smaller than the preset threshold value, the intersection of the patch and the Bessel curved surface is indicated, the patch is ignored, and the next patch is continuously selected. In a possible implementation manner, the preset threshold is 0.001, and the preset threshold is not limited in this embodiment.
And step 204, adding the volumes corresponding to all the vertexes in the first vertex set to obtain the volume of the pathological tissue, and adding the volumes corresponding to all the vertexes in the second vertex set to obtain the volume of the non-pathological tissue.
Step 205, reading the display state parameters of the three-dimensional virtual organ at the current moment.
The display state parameters can be switched according to a switching operation triggered by a user. For example, the current display state parameter is used to indicate a patch for displaying a pathological tissue, and when a switching operation triggered by a user is received, the display state parameter is switched to the patch for indicating a hidden pathological tissue; and when receiving a switching operation triggered by a user, switching the display state parameter into a patch for indicating and displaying the pathological tissue.
In a specific implementation, the meaning of the numerical value of the state may be preset, for example, when the state is 0, the patch of the pathological tissue is hidden, and when the state is 1, the patch of the pathological tissue is displayed. And setting a numerical value of the state of the display state parameter according to the switching operation, and inputting the numerical value of the state into a fragment shader in the GPU.
The two adjacent switching operations may be the same or different, and this embodiment is not limited. In one possible implementation, the switching operation may be a double click mouse operation.
And step 206, when the display state parameter is used for indicating the surface patch of the pathological tissue to be displayed, displaying the Bessel curved surface, the volume of the pathological tissue and the volume of the non-pathological tissue, displaying the surface patch of the pathological tissue and the surface patch of the non-pathological tissue in different modes, displaying the mapping point, hiding the control point, and executing step 208.
When the value of the state is 1, the fragment shader renders the patch of the pathological tissue. At the moment, the computer-assisted surgery system displays the Bessel curved surface, displays the patch of the pathological change tissue with a first display effect, displays the patch of the non-pathological change tissue with a second display effect, displays the mapping point and hides the control point, wherein the first display effect is different from the second display effect.
The first display effect and the second display effect may be different in display color, for example, the color of the first display effect is the color of the three-dimensional virtual organ itself, and the color of the second display effect is purple. Of course, the first display effect and the second display effect may be distinguished from each other, and the embodiment is not limited.
Step 207, when the display state parameter is used for indicating the patch for hiding the lesion tissue, displaying the bezier surface, the volume of the lesion tissue, and the volume of the non-lesion tissue, displaying the patch and the mapping points of the non-lesion tissue, and hiding the patch and the control points of the lesion tissue, and executing step 208.
When the value of the state is 0, the fragment shader does not render the patch of the lesion tissue. At this time, the computer-assisted surgery system displays the bezier curved surface, and displays a patch and mapping points of non-diseased tissues and conceals a patch and control points of diseased tissues.
Because only the mapping points on the Bezier curved surface are displayed and the control points above the Bezier curved surface are hidden, the principle of what you see is what you get is adhered to, and a user only needs to move a certain mapping point in a certain direction, namely, the control point corresponding to the mapping point is equivalently moved in the certain direction, so that double-point linkage is realized, and the Bezier curved surface can be regenerated according to the moving condition. When the mapping points are not generated, a user can only modify the Bezier curved surface through the control points positioned above the Bezier curved surface, and the control points are large in number and complex in spatial position, so that the problem that the user cannot accurately judge which control point needs to be moved to modify the Bezier cutting curve is solved, and the generation efficiency and accuracy of the Bezier curved surface are influenced.
Step 208, calculating the volume percentage of the diseased tissue and the non-diseased tissue, and displaying the volume percentage.
In resection surgery, it is ensured that the diseased tissue is completely removed within a sufficiently large safe margin, while at the same time maximum retention of functional tissue is contemplated. If the lesion tissue is not completely removed, the disease will relapse; on the other hand, if too many normal regions are excised, the remaining functional volume is insufficient, which may cause organ failure after surgery. Therefore, the computer-assisted surgery system needs to calculate the volume of the lesion tissue and the volume of the non-lesion tissue for the user to refer to and make a safer and more reasonable surgical plan.
Wherein, the volume percentage may include a percentage of a volume of diseased tissue to a total volume of the three-dimensional virtual organ, and a percentage of a volume of non-diseased tissue to a total volume of the three-dimensional virtual organ.
In the related art, a three-dimensional virtual organ of an entity is generated through pixels, all pixels in the three-dimensional virtual organ are classified, and the volume of a pathological change tissue and the volume of a non-pathological change tissue are obtained by multiplying the number of the pixels by the volume of the pixels. In this embodiment, the computer-assisted surgery system may calculate the volume by the patch, which may reduce the time consumed by the calculation, thereby implementing real-time display of the volume and the volume percentage.
In this embodiment, the computer-assisted surgery system may also display the volume of the diseased tissue, the volume of the non-diseased tissue, and the volume percentage with different display effects. For example, the display is in different colors, in this case, the volume of the lesion tissue and the percentage of the volume of the lesion tissue to the total volume of the three-dimensional virtual organ may be displayed in purple, and the volume of the non-lesion tissue and the percentage of the volume of the non-lesion tissue to the total volume of the three-dimensional virtual organ may be displayed in the color of the three-dimensional virtual organ itself.
And step 209, calculating to obtain a bounding box according to the vertexes of the patches in the three-dimensional virtual organ.
Since the bounding box has already been generated in step 2011, the computer assisted surgery system may acquire the bounding box directly at this time. Alternatively, the computer-assisted surgery system may regenerate a bounding box according to the generation method in step 2011, which is not limited in this embodiment.
In step 210, a middle point is selected on a diagonal of the bounding box, and a line segment from the middle point to an end point of the diagonal is displayed as a control rod.
The generation manner of the control rod is described in step 2011, and is not described herein.
In step 211, when the control signal applied to the shaft of the control lever is received, it is determined that the control signal is a displacement signal, and step 213 is performed.
The mouse clicks the rod body, and the Bessel curved surface can be updated to intersect at the position of the three-dimensional virtual organ by translating up, down, left and right.
When a control signal acting on the end point of the control lever is received, step 212, determining that the control signal is an angle signal, and executing step 214.
And the mouse clicking the endpoint can rotate around the endpoint to update and control the angle of the Bessel curved surface intersected with the three-dimensional virtual organ.
And step 213, updating the position where the Bessel curved surface intersects with the three-dimensional virtual organ to obtain the target curved surface when the control signal is the displacement signal.
And 214, updating the angle of the Bessel curved surface intersected with the three-dimensional virtual organ to obtain the target curved surface when the control signal is the angle signal.
Optionally, in this embodiment, the position and the angle at which the bezier curved surface intersects with the three-dimensional virtual organ may also be directly updated on the bezier curved surface without generating a control stick, at this time, the computer-assisted surgery system receives a control signal triggered by the mouse on the bezier curved surface, and updates the position and the angle according to the control signal.
In addition to updating the position and angle of the Bezier surface intersecting the three-dimensional virtual organ through steps 209-214, the computer-aided computing system may also receive a movement signal of the mapping point acting on the control point, and update the shape of the Bezier surface according to the movement signal to obtain the target surface.
When the mapping point of the control point is moved, which is equivalent to the control point being moved, the bezier surface needs to be regenerated according to all the control points at this time, and the generation process is described in detail in the above description and is not described herein again.
It should be noted that, in this embodiment, only the position and the angle at which the bezier curved surface intersects the three-dimensional virtual organ may be updated, or only the shape of the bezier curved surface may be updated, or both the position and the angle at which the bezier curved surface intersects the three-dimensional virtual organ and the shape of the bezier curved surface may be updated, and at this time, the order of execution of the two update processes is not limited.
Referring to fig. 10A and 10B, fig. 10A is a line drawing, and fig. 10B is a schematic view showing a deformation of a bezier curve caused by moving a mapping point.
Reference is now made to fig. 11A-F, which illustrate a process for generating an adaptively sized bezier surface and cutting diseased tissue. Fig. 11A is a line drawing of generating an adaptive-size bezier surface, and fig. 11B is a schematic diagram thereof; FIG. 11C is a diagram of the mapping points controlling the deformation of the Bessel surface to wrap the lesion tissue on the lower left side of the liver, and FIG. 11D is a diagram thereof; FIG. 11E is a derived result of a liver that retains only non-diseased tissue, and FIG. 11F is a schematic illustration thereof; fig. 11G is a derived result of a liver retaining diseased tissue and non-diseased tissue, and fig. 11H is a schematic thereof.
Wherein the volume of liver resected in fig. 11B was 1467.6ml, the volume of liver remaining was 586.1ml, and the percentage resection was 71.5%; the volume of liver resected in fig. 11D was 1052.8ml, the volume of liver remaining was 900.9ml, and the percentage resection was 43.9%; the remaining percentage in fig. 11F is 45.3%; the remaining percentage in fig. 11H is 45.3%.
In summary, according to the volume calculation method for a three-dimensional virtual organ provided by the embodiment of the present invention, since the generated bezier curved surface is generated according to the control point, the problem of inaccurate volume calculation due to a rough cutting curved surface obtained when the cutting curved surface is manually drawn by a user can be avoided, so as to improve the accuracy of the volume.
The volume of the prism formed by the mapping points of the vertexes on the Bessel curved surface and the surface patches is calculated, and then the volumes of the prisms are added to obtain the volume of the pathological change tissue and the volume of the non-pathological change tissue.
The position and the angle of the Bessel curved surface intersected with the three-dimensional virtual organ are updated through the control rod, the problem that the cutting curved surface cannot be adjusted once generated is solved, and therefore the flexibility of the cutting curved surface is improved.
The volume and the volume percentage obtained by cutting are displayed in real time for the user to refer, so that a safer and more reasonable operation scheme is made.
Referring to fig. 12, a block diagram of a volume calculation device for a three-dimensional virtual organ, which can be applied in a computer-assisted surgery system, according to an embodiment of the present invention is shown. The volume calculation device of the three-dimensional virtual organ comprises:
a generating module 1201, configured to generate a bezier surface intersecting with a three-dimensional virtual organ, where the three-dimensional virtual organ composed of patches includes a diseased tissue and a non-diseased tissue separated by the bezier surface;
a classification module 1202 for classifying vertices into a first set of vertices in patches of diseased tissue or a second set of vertices in patches of non-diseased tissue according to depths between mapped points on the bezier surface and vertices in patches mapped to the mapped points;
a calculating module 1203, configured to calculate a volume of a prism formed by the mapping point and the surface patch mapped by the mapping point;
the calculating module 1203 is further configured to add volumes corresponding to all vertices in the first vertex set to obtain a volume of a diseased tissue, and add volumes corresponding to all vertices in the second vertex set to obtain a volume of a non-diseased tissue.
In summary, in the volume calculation apparatus for a three-dimensional virtual organ provided in the embodiment of the present invention, since the generated bezier curved surface is generated according to the control point, the problem of inaccurate volume calculation due to a rough cutting curved surface obtained when the cutting curved surface is manually drawn by the user can be avoided, so as to improve the accuracy of the volume.
The volume of the prism formed by the mapping points of the vertexes on the Bessel curved surface and the surface patches is calculated, and then the volumes of the prisms are added to obtain the volume of the pathological change tissue and the volume of the non-pathological change tissue.
Referring to fig. 13, a block diagram of a volume calculation device for a three-dimensional virtual organ according to another embodiment of the present invention is shown, wherein the volume calculation device for a three-dimensional virtual organ can be applied in a computer-assisted surgery system. The volume calculation device of the three-dimensional virtual organ comprises:
a generating module 1301, configured to generate a bezier surface intersecting with a three-dimensional virtual organ, where the three-dimensional virtual organ composed of patches includes a diseased tissue and a non-diseased tissue separated by the bezier surface;
a classification module 1302 for classifying vertices into a first set of vertices in patches of diseased tissue or a second set of vertices in patches of non-diseased tissue according to depths between mapped points on the bezier surface and vertices in patches mapped to the mapped points;
the calculating module 1303 is used for calculating the volume of a prism formed by the mapping points and the surface patches mapped by the mapping points;
the calculating module 1303 is further configured to add volumes corresponding to all vertices in the first vertex set to obtain a volume of a diseased tissue, and add volumes corresponding to all vertices in the second vertex set to obtain a volume of a non-diseased tissue.
Optionally, the apparatus further includes: a reading module 1304, configured to read a display state parameter of the three-dimensional virtual organ at the current time;
the display module 1305 is used for displaying the Bessel curved surface, the volume of the pathological tissue and the volume of the non-pathological tissue when the display state parameter is used for indicating to display the patch of the pathological tissue, and displaying the patch of the pathological tissue and the patch of the non-pathological tissue in the same way; when the display state parameter is used for indicating the patch of the hidden lesion tissue, the Bessel curved surface, the volume of the lesion tissue and the volume of the non-lesion tissue are displayed, the patch of the non-lesion tissue is displayed, and the patch of the hidden lesion tissue is hidden.
Optionally, the calculating module 1303 is further configured to calculate a volume percentage of the diseased tissue to the non-diseased tissue;
the device also comprises: a display module 1305 for displaying the volume percentage.
Optionally, the calculating module 1303 is specifically configured to:
calculating a normal vector surf of the patch according to the edge of the patch mapped by the mapping point;
calculating the volume of the prism according to a formula 0.5 dot (surf, direction), wherein dot is a function of multiplying two vector points, and direction is the length of a connecting line between a mapping point and a vertex;
converting the volume of the prism to a multiple of the volume of the unit pixel;
when the directions of the normal vector of the surface patch and the normal vector of the Bessel curved surface are the same, taking the positive value of the multiple as the final volume of the prism;
and when the directions of the normal vectors of the surface patches are opposite to the direction of the normal vector of the Bessel curved surface, taking the negative value of the multiple as the final volume of the prism.
Optionally, the calculating module 1303 is further configured to:
generating a vector according to the vertex and the mapping point before calculating the normal vector surf of the patch according to the edge of the patch mapped by the mapping point;
and when the modulus of the vector is larger than a preset threshold value, triggering and executing the step of calculating the normal vector surf of the patch according to the edge of the patch mapped by the mapping point.
Optionally, the classifying module 1302 is further configured to:
generating a first vector according to a vertex in the patch and a minimum control point in the Bezier surface, and calculating a first projection length of the first vector on a normal vector of the Bezier surface;
generating a second vector according to the mapping point and the control point, and calculating a second projection length of the second vector on the normal vector;
when the first projection length is smaller than the second projection length, classifying the vertex into a first vertex set;
when the first projection length is greater than the second projection length, the vertex is classified into a second set of vertices.
Optionally, the apparatus further includes:
a determining module 1306, configured to determine mapping points of control points of the bezier surface on the bezier surface;
a display module 1305, configured to display the mapping point and hide the control point;
the updating module 1307 is further configured to update the bezier surface to obtain a target surface for simulating cutting of the three-dimensional virtual organ in response to the control signal input for the mapping point.
Optionally, the updating module 1307 is specifically configured to:
when the control signal is a displacement signal, updating the position where the Bessel curved surface intersects with the three-dimensional virtual organ to obtain a target curved surface;
and when the control signal is an angle signal, updating the angle of the Bessel curved surface intersected with the three-dimensional virtual organ to obtain the target curved surface.
Optionally, the calculating module 1303 is further configured to calculate a bounding box according to coordinates of a patch in the three-dimensional virtual organ;
the device also includes: a selecting module 1308 for selecting a middle point on a diagonal of the bounding box and displaying a line segment from the middle point to an end point of the diagonal as a control rod;
a determining module 1306, further configured to determine that the control signal is a displacement signal when the control signal acting on the shaft of the control lever is received; when a control signal acting on the end point of the control lever is received, it is determined that the control signal is an angle signal.
Optionally, the generating module 1301 is specifically configured to:
calculating to obtain a bounding box according to coordinates of patches in the three-dimensional virtual organ;
selecting a reference point from the edges of the bounding box, and calculating the coordinates of the reference point;
determining the coordinates of the control points according to the coordinates of the reference points;
setting the step length of the change of the abscissa u and the ordinate v, changing u and v according to the step length, and controlling the u, v and n obtained each timeCoordinate input formula of point
Figure BDA0001598965490000181
Figure BDA0001598965490000182
And rendering each coordinate point output by the formula to obtain the Bessel curved surface.
Optionally, the apparatus further comprises:
an arrangement module 1309 for arranging the control points equidistantly in an m × m grid;
the determining module 1306 is further configured to calculate a length and a width of the mesh according to the vertex coordinates of the mesh, and calculate a coordinate of any vertex of the patch according to a proportional relationship between the length, the width, and the equal distance;
a calculation module 1303 for substituting the coordinates of the vertices into a formula
Figure BDA0001598965490000183
Figure BDA0001598965490000184
Figure BDA0001598965490000185
The output of the formula is taken as the mapping point.
In summary, in the volume calculation apparatus for a three-dimensional virtual organ provided in the embodiment of the present invention, since the generated bezier curved surface is generated according to the control point, the problem of inaccurate volume calculation due to a rough cutting curved surface obtained when the cutting curved surface is manually drawn by the user can be avoided, so as to improve the accuracy of the volume.
The volume of the prism formed by the mapping points of the vertexes on the Bessel curved surface and the surface patches is calculated, and then the volumes of the prisms are added to obtain the volume of the pathological change tissue and the volume of the non-pathological change tissue.
The position and the angle of the Bessel curved surface intersected with the three-dimensional virtual organ are updated through the control rod, the problem that the cutting curved surface cannot be adjusted once generated is solved, and therefore the flexibility of the cutting curved surface is improved.
The volume and the volume percentage obtained by cutting are displayed in real time for the user to refer, so that a safer and more reasonable operation scheme is made.
FIG. 14 shows a block diagram of a computer-assisted surgery system 1400 provided by an exemplary embodiment of the present invention. The computer assisted surgery system 1400 may be a portable mobile computer assisted surgery system.
Generally, the computer-assisted surgery system 1400 includes: a processor 1401, and a memory 1402.
Processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1401 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content that the display screen needs to display.
Memory 1402 may include one or more computer-readable storage media, which may be non-transitory. Memory 1402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1402 is used to store at least one instruction for execution by processor 1401 to implement a method of volumetric computation of a three-dimensional virtual organ as provided by method embodiments herein.
In some embodiments, the computer-assisted surgery system 1400 may further optionally include: a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402, and the peripheral device interface 1403 may be connected by buses or signal lines. Each peripheral device may be connected to the peripheral device interface 1403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1404, touch display 1405 and power supply 1409.
The peripheral device interface 1403 can be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1401 and the memory 1402. In some embodiments, the processor 1401, memory 1402, and peripheral interface 1403 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 1401, the memory 1402, and the peripheral device interface 1403 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 1404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 1404 may communicate with other computer-assisted surgery systems via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1405 is a touch display screen, the display screen 1405 also has the ability to capture touch signals at or above the surface of the display screen 1405. The touch signal may be input to the processor 1401 for processing as a control signal. At this point, the display 1405 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 1405 may be one, providing the front panel of the computer-assisted surgery system 1400; in other embodiments, the display 1405 may be at least two, each disposed on a different surface of the computer-assisted surgery system 1400 or in a folded design; in still other embodiments, the display 1405 may be a flexible display disposed on a curved surface or a folded surface of the computer-assisted surgery system 1400. Even further, the display 1405 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display 1405 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 1409 is used to power the various components of the computer-assisted surgery system 1400. The power source 1409 may be alternating current, direct current, disposable or rechargeable. When the power source 1409 comprises a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in FIG. 14 does not constitute a limitation of the computer-assisted surgery system 1400 and may include more or fewer components than shown, or some components in combination, or in a different arrangement of components.
An embodiment of the present invention provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the above volume calculation method for a three-dimensional virtual organ.
An embodiment of the present invention provides a volume calculation device for a three-dimensional virtual organ, which includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the above volume calculation method for a three-dimensional virtual organ.
It should be noted that: in the volume calculation device for a three-dimensional virtual organ according to the above embodiment, when performing volume calculation of a three-dimensional virtual organ, only the division of the functional modules is illustrated, and in practical applications, the function allocation may be performed by different functional modules according to needs, that is, the internal structure of the volume calculation device for a three-dimensional virtual organ may be divided into different functional modules to perform all or part of the functions described above. In addition, the volume calculation device for a three-dimensional virtual organ provided in the above embodiments and the volume calculation method for a three-dimensional virtual organ belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent replacements, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for volumetric computation of a three-dimensional virtual organ, the method comprising:
calculating to obtain a bounding box according to coordinates of patches in the three-dimensional virtual organ;
selecting a reference point from the edges of the bounding box, and calculating the coordinates of the reference point;
determining coordinates of the control point according to the coordinates of the reference point, wherein determining the coordinates of the control point according to the coordinates of the reference point comprises: calculating a covariance matrix of the reference point, and generating the control point according to a half of the length of the control rod, coordinates of a midpoint of the control point, an eigenvalue of the covariance matrix, a corresponding eigenvector and the bounding box;
generating a Bezier curved surface intersected with the three-dimensional virtual organ according to the control points, wherein the three-dimensional virtual organ composed of patches comprises a lesion tissue and a non-lesion tissue which are separated by the Bezier curved surface;
determining a mapping point of any vertex of the patch on the Bezier curved surface;
classifying the vertices into a first set of vertices in patches of the diseased tissue or a second set of vertices in patches of the non-diseased tissue according to depths between mapped points on the Bezier surface and vertices in the patches mapped to the mapped points;
calculating the volume of the prism formed by the mapping point and the surface patch mapped by the mapping point;
and adding the volumes corresponding to all the vertexes in the first vertex set to obtain the volume of the pathological tissue, and adding the volumes corresponding to all the vertexes in the second vertex set to obtain the volume of the non-pathological tissue.
2. The method of claim 1, further comprising:
reading the display state parameters of the three-dimensional virtual organ at the current moment;
when the display state parameter is used for indicating that the patch of the pathological tissue is displayed, displaying the Bessel curved surface, the volume of the pathological tissue and the volume of the non-pathological tissue, and displaying the patch of the pathological tissue and the patch of the non-pathological tissue in different modes;
when the display state parameter is used for indicating to hide the patch of the pathological tissue, displaying the Bessel curved surface, the volume of the pathological tissue, the volume of the non-pathological tissue and the patch of the non-pathological tissue, and hiding the patch of the pathological tissue.
3. The method of claim 1, further comprising:
calculating a volume percentage of the diseased tissue to the non-diseased tissue;
displaying the volume percentage.
4. The method of claim 1, wherein the calculating the volume of the prism formed by the mapping point and the patch mapped by the mapping point comprises:
calculating a normal vector surf of the patch according to the edge of the patch mapped by the mapping point;
calculating the volume of the prism according to a formula 0.5 dot (direct), wherein dot is a function of point multiplication of two vectors, and the direction is the length of a connecting line of the mapping point and the vertex;
converting the volume of the prism to a multiple of the volume of a unit pixel;
when the directions of the normal vector of the surface patch and the normal vector of the Bezier curved surface are the same, taking the positive value of the multiple as the final volume of the prism;
and when the direction of the normal vector of the surface patch is opposite to that of the normal vector of the Bezier curved surface, taking the negative value of the multiple as the final volume of the prism.
5. The method of claim 4, further comprising, before said computing the normal vector surf of the patch from the edge of the patch to which the vertex belongs:
generating a vector according to the vertex and the mapping point;
and when the modulus of the vector is larger than a preset threshold value, triggering and executing the step of calculating the normal vector surf of the patch according to the edge of the patch mapped by the mapping point.
6. The method of claim 1, wherein the classifying the vertices into a first set of vertices in the patch of diseased tissue or a second set of vertices in the patch of non-diseased tissue according to depths between mapped points on the Bezier surface and vertices in the patch mapped to the mapped points comprises:
generating a first vector according to a vertex in the patch and a minimum control point in the Bezier surface, and calculating a first projection length of the first vector on a normal vector of the Bezier surface;
generating a second vector according to the mapping point and the control point, and calculating a second projection length of the second vector on the normal vector;
when the first projection length is less than the second projection length, classifying the vertex into the first set of vertices;
when the first projection length is greater than the second projection length, classifying the vertex into the second set of vertices.
7. The method according to any one of claims 1 to 6, further comprising:
determining mapping points of control points of the Bezier surface on the Bezier surface;
displaying the mapping point and hiding the control point;
and responding to a control signal input aiming at the mapping point, and updating the Bessel curved surface to obtain a target curved surface for simulating and cutting the three-dimensional virtual organ.
8. The method of claim 7, wherein said updating the Bezier surface to obtain a target surface for simulating cutting of the three-dimensional virtual organ in response to the control signal input for the mapping point comprises:
when the control signal is a displacement signal, updating the position of the Bessel curved surface intersected with the three-dimensional virtual organ;
when the control signal is an angle signal, updating the angle of the Bessel curved surface intersected with the three-dimensional virtual organ.
9. The method of claim 8, further comprising:
selecting a middle point on a diagonal line of the bounding box, and displaying a line segment from the middle point to an end point of the diagonal line as a control rod;
determining that the control signal is the displacement signal when the control signal acting on the shaft of the control lever is received;
determining that the control signal is the angle signal when the control signal acting on the end point of the control lever is received.
10. The method according to any one of claims 1 to 6, wherein the generating a Bezier surface intersecting the three-dimensional virtual organ from the control points comprises:
setting the changing step length of the abscissa u and the ordinate v, changing the u and the v according to the step length, and inputting the coordinates of the u, the v and the control point obtained each time into a formula
Figure FDA0002319936900000031
Figure FDA0002319936900000041
And rendering each coordinate point output by the formula to obtain the Bessel curved surface.
11. The method according to any one of claims 1 to 6, further comprising:
arranging the control points equidistantly in an m x m grid;
calculating the length and the width of the mesh according to the vertex coordinates of the mesh, and calculating the coordinate of any vertex of the patch according to the proportional relation of the length, the width and the equal distance;
substituting the coordinates of the vertices into a formula
Figure FDA0002319936900000042
Figure FDA0002319936900000043
And taking the output of the formula as the mapping point.
12. An apparatus for calculating a volume of a three-dimensional virtual organ, the apparatus comprising:
the generating module is used for calculating to obtain a bounding box according to the coordinates of the patch in the three-dimensional virtual organ; selecting a reference point from the edges of the bounding box, and calculating the coordinates of the reference point; determining coordinates of the control point according to the coordinates of the reference point, wherein determining the coordinates of the control point according to the coordinates of the reference point comprises: calculating a covariance matrix of the reference point, and generating the control point according to a half of the length of the control rod, coordinates of a midpoint of the control point, an eigenvalue of the covariance matrix, a corresponding eigenvector and the bounding box; generating a Bezier curved surface intersected with the three-dimensional virtual organ according to the control points, wherein the three-dimensional virtual organ composed of patches comprises a lesion tissue and a non-lesion tissue which are separated by the Bezier curved surface;
the classification module is used for determining a mapping point of any vertex of the patch on the Bezier curved surface; classifying the vertices into a first set of vertices in patches of the diseased tissue or a second set of vertices in patches of the non-diseased tissue according to depths between mapped points on the Bezier surface and vertices in the patches mapped to the mapped points;
the calculation module is used for calculating the volume of a prism formed by the mapping points and the surface patches mapped by the mapping points;
the calculation module is further configured to add volumes corresponding to all vertices in the first vertex set to obtain a volume of the diseased tissue, and add volumes corresponding to all vertices in the second vertex set to obtain a volume of the non-diseased tissue.
13. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a volume calculation method of a three-dimensional virtual organ according to any one of claims 1 to 11.
14. A volume calculation device for a three-dimensional virtual organ, comprising a processor and a memory, wherein the memory has stored therein at least one instruction, which is loaded and executed by the processor to implement the volume calculation method for a three-dimensional virtual organ according to any one of claims 1 to 11.
CN201810217643.XA 2018-03-16 2018-03-16 Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment Active CN108389203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810217643.XA CN108389203B (en) 2018-03-16 2018-03-16 Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810217643.XA CN108389203B (en) 2018-03-16 2018-03-16 Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN108389203A CN108389203A (en) 2018-08-10
CN108389203B true CN108389203B (en) 2020-06-16

Family

ID=63067910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810217643.XA Active CN108389203B (en) 2018-03-16 2018-03-16 Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN108389203B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111189294A (en) * 2018-11-14 2020-05-22 宁波泽锦电器科技有限公司 Self-adaptive cooling system of refrigerator
CN117315375B (en) * 2023-11-20 2024-03-01 腾讯科技(深圳)有限公司 Virtual part classification method, device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1040451A2 (en) * 1998-07-01 2000-10-04 Koninklijke Philips Electronics N.V. Computer graphics animation method and device
CN101510316A (en) * 2009-03-26 2009-08-19 山东理工大学 Deformation design method for product STL model
WO2009111135A1 (en) * 2008-03-06 2009-09-11 Immersion Medical, Inc. Determining location and orientation of an object positioned on a surface
CN101661630A (en) * 2009-09-25 2010-03-03 南京大学 Method for measuring significance of surface of three-dimensional mesh model
CN102388403A (en) * 2009-04-03 2012-03-21 皇家飞利浦电子股份有限公司 Interactive iterative closest point algorithm for organ segmentation
CN103473805A (en) * 2013-09-18 2013-12-25 内蒙古科技大学 Method for measuring size of three-dimensional reconstruction liver model on basis of improved region growing algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1040451A2 (en) * 1998-07-01 2000-10-04 Koninklijke Philips Electronics N.V. Computer graphics animation method and device
WO2009111135A1 (en) * 2008-03-06 2009-09-11 Immersion Medical, Inc. Determining location and orientation of an object positioned on a surface
CN101510316A (en) * 2009-03-26 2009-08-19 山东理工大学 Deformation design method for product STL model
CN102388403A (en) * 2009-04-03 2012-03-21 皇家飞利浦电子股份有限公司 Interactive iterative closest point algorithm for organ segmentation
CN101661630A (en) * 2009-09-25 2010-03-03 南京大学 Method for measuring significance of surface of three-dimensional mesh model
CN103473805A (en) * 2013-09-18 2013-12-25 内蒙古科技大学 Method for measuring size of three-dimensional reconstruction liver model on basis of improved region growing algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"任意三角网格模型体积的快速精确计算方法";王泉德;《计算机工程与应用》;20090621;第3章 *
"肝脏的不规则模拟切除—设计与实现";郑雅雯;《中国优秀硕士学位论文全文数据库 医药卫生科技辑》;20140715;正文第3-5章 *

Also Published As

Publication number Publication date
CN108389203A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN108389202B (en) Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment
US11416069B2 (en) Device and system for volume visualization and interaction in a virtual reality or augmented reality environment
US10872460B1 (en) Device and system for volume visualization and interaction in a virtual reality or augmented reality environment
Konrad-Verse et al. Virtual resection with a deformable cutting plane.
JP2007528529A (en) Method and system for identifying the surface of a 3D dataset (&#34;voxel partitioning&#34;)
US20050237336A1 (en) Method and system for multi-object volumetric data visualization
CN113496539B (en) Texture mapping method and system based on three-dimensional grid model parameter design
JP6886448B2 (en) Devices, systems and methods for simulation and visualization of ablation zones
CN108389203B (en) Volume calculation method and device of three-dimensional virtual organ, storage medium and equipment
CN113436303A (en) Method of rendering a volume and embedding a surface in the volume
US20220346888A1 (en) Device and system for multidimensional data visualization and interaction in an augmented reality virtual reality or mixed reality environment
CN108428230B (en) Method, device, storage medium and equipment for processing curved surface in three-dimensional virtual organ
CN111430012B (en) System and method for semi-automatically segmenting 3D medical images using real-time edge-aware brushes
Hachaj et al. Visualization of perfusion abnormalities with GPU-based volume rendering
US10650604B1 (en) Method, device and system for volume visualization and interaction in a virtual reality environment
US20230054394A1 (en) Device and system for multidimensional data visualization and interaction in an augmented reality virtual reality or mixed reality image guided surgery
CN108399942A (en) Display methods, device, storage medium and the equipment of three-dimensional organ
WO2014016894A1 (en) Shape data generation method and device
JP2010538729A (en) Path neighborhood rendering
JP6297753B2 (en) Virtual interactive definition of volume shape
Dietrich et al. Real-time interactive visualization and manipulation of the volumetric data using GPU-based methods
Kirmizibayrak et al. Interactive visualization and analysis of multimodal datasets for surgical applications
Williams A method for viewing and interacting with medical volumes in virtual reality
Lichtenberg et al. Distance Field Visualization and 2D Abstraction of Vessel Tree Structures with on-the-fly Parameterization.
Reitinger Virtual liver surgery planning: simulation of resections using virtual reality techniques

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