Bone structure cutting line determination method and device, equipment and storage medium

CN118762148APending Publication Date: 2024-10-11BEIJING TINAVI MEDICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410859603.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The existing technology lacks accuracy when determining the bone structure cutting line, which affects the effect of robotic surgery.

Method used

By obtaining the 3D mask point cloud and cutting plane of the target bone structure, 3D rasterization is performed to determine the edge voxels, and an isosurface is constructed based on these voxels, and the cutting intersection is determined based on the cutting plane.

Benefits of technology

It improves the accuracy of determining the cutting line of the bone structure, ensures the accuracy of the cutting plane and cutting edge, and reduces surgical errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762148A_ABST
    Figure CN118762148A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a bone structure cutting line determination method and device, equipment and a storage medium. The method comprises the steps of obtaining a three-dimensional mask point cloud of a target bone structure and a cutting plane in a three-dimensional space where the three-dimensional mask point cloud is located; performing three-dimensional rasterization processing on a space region where the three-dimensional mask point cloud is located, and determining a plurality of voxels; based on the spatial relationship between the first vertex of each voxel and the three-dimensional mask point cloud, determining an edge voxel located in an edge region of the three-dimensional mask point cloud, and based on each first vertex of the edge voxel, constructing a polygon, so as to construct a contour surface corresponding to the three-dimensional mask point cloud by each polygon; and determining a cutting intersection line of the target bone structure based on the cutting plane and the contour surface. According to the technical scheme, the determination accuracy of the cutting line of the bone structure is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a method, device, equipment and storage medium for determining a bone structure cutting line. Background Art

[0002] Bone structure resection is one of the clinical methods for treating related diseases. In order to reduce the burden on doctors, robots are introduced to participate in surgery. Before performing bone structure resection, the cutting line of the bone structure to be resected must be determined first for the robot to perform cutting positioning.

[0003] Taking laminectomy for the treatment of degenerative lumbar spinal stenosis as an example, one method for determining the bone structure cutting line is to estimate the lamina area to be removed based on the position of the articular process, but the positioning error of the cutting line is large; another method for determining the bone structure cutting line is to establish a bounding box of the lamina area and obtain the edge of the bounding box through projection as the cutting line of the lamina, but it also cannot guarantee the accuracy of the cutting line.

[0004] Therefore, how to improve the accuracy of determining the cutting line of the bone structure is an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and storage medium for determining a bone structure cutting line.

[0006] The present disclosure provides a method for determining a bone structure cutting line, the method comprising:

[0007] Acquire a three-dimensional mask point cloud of the target bone structure and a cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located;

[0008] Performing three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine multiple voxels;

[0009] Based on the spatial relationship between the first vertex of each voxel and the three-dimensional mask point cloud, determine the edge voxels in the edge area of ​​the three-dimensional mask point cloud, and construct polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from the polygons;

[0010] Based on the cutting plane and the isosurface, the cutting intersection line of the target bone structure is determined.

[0011] In some embodiments, based on the spatial relationship between the first vertices of each voxel and the three-dimensional mask point cloud, edge voxels in the edge area of ​​the three-dimensional mask point cloud are determined, and a polygon is constructed based on each first vertex of the edge voxel, including:

[0012] The polygon is a triangle. For any voxel, execute:

[0013] Determine, based on a spatial relationship between each first vertex of the voxel and the three-dimensional mask point cloud, a vertex number of a first vertex outside the three-dimensional mask point cloud among each first vertices;

[0014] If the vertex number is not empty, the voxel is determined to be an edge voxel, and based on the vertex number, the first data table is queried to determine the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, so as to characterize the topological relationship between each second vertices; wherein the first data table records the edge numbers corresponding to the triangles constituted by each first vertex with different numbers and different vertex numbers;

[0015] Based on the vertex number, query the second data table to determine the two target endpoints corresponding to the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, and determine the second vertex corresponding to the corresponding edge number based on the two target endpoints; wherein the second data table records the edge number corresponding to the triangle constituted by each first vertex with different numbers and different vertex numbers, and the two endpoints corresponding to the edge number;

[0016] Based on the topological relationship and each second vertex, a triangle corresponding to the edge voxel is constructed.

[0017] In some embodiments, based on the vertex number, querying the first data table to determine the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located includes:

[0018] Based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number;

[0019] Using a decimal number as an index, query the first array subscript of the first data table; wherein the first data table is a two-dimensional array;

[0020] Based on the array element corresponding to the queried first data subscript, the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located is determined.

[0021] In some embodiments, based on the vertex number, querying the second data table to determine two target endpoints corresponding to the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located includes:

[0022] Based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number;

[0023] Using the decimal number as the index, query the second array subscript of the second data table; wherein the second data table is a two-dimensional array;

[0024] Based on the hexadecimal number of the array element corresponding to the queried second data subscript, the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located and the two target endpoints corresponding to the corresponding edge number are determined.

[0025] In some embodiments, determining a cutting intersection line of a target bone structure based on a cutting plane and an isosurface includes:

[0026] Traversing the second vertex of each polygon in the isosurface, if it is determined that the traversed second vertex is in the cutting plane, retaining the traversed second vertex;

[0027] The retained second vertices form a cutting intersection line.

[0028] In some embodiments, determining that the traversed second vertex is in the cutting plane includes:

[0029] Determine the normal vector of the cutting plane, and determine the vertex vector between the second vertex traversed and any point in the cutting plane;

[0030] If the dot product of the normal vector and the vertex vector is zero, it is determined that the second vertex traversed is in the cutting plane.

[0031] In some embodiments, determining a normal vector of the cutting plane includes:

[0032] Determine any three corner points in the cutting plane and construct two corner point vectors from each corner point;

[0033] Determine the normal vector based on the cross product of the two corner vectors.

[0034] In some embodiments, after acquiring the three-dimensional mask point cloud of the target bone structure, the method further includes:

[0035] The 3D mask point cloud is smoothed to update the 3D mask point cloud.

[0036] In some embodiments, the target bone structure is a lamina in the spine.

[0037] The present disclosure also provides a device for determining a bone structure cutting line, the device comprising:

[0038] A data acquisition module, used for acquiring a three-dimensional mask point cloud of a target bone structure and a cutting plane in a three-dimensional space where the three-dimensional mask point cloud is located;

[0039] A volume element determination module is used to perform three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine multiple volume elements;

[0040] An isosurface construction module is used to determine edge voxels in the edge area of ​​the three-dimensional mask point cloud based on the spatial relationship between the first vertices of each voxel and the three-dimensional mask point cloud, and to construct polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from the polygons;

[0041] The cutting intersection line determination module is used to determine the cutting intersection line of the target bone structure based on the cutting plane and the isosurface.

[0042] In some embodiments, the polygon is a triangle, and the isosurface construction module is specifically used to perform, for any voxel:

[0043] Determine, based on a spatial relationship between each first vertex of the voxel and the three-dimensional mask point cloud, a vertex number of a first vertex outside the three-dimensional mask point cloud among each first vertices;

[0044] If the vertex number is not empty, the voxel is determined to be the edge voxel, and based on the vertex number, the first data table is queried to determine the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, so as to characterize the topological relationship between each second vertices; wherein the first data table records the edge numbers corresponding to the triangles constituted by each first vertex with different numbers and different vertex numbers;

[0045] Based on the vertex number, query the second data table to determine the two target endpoints corresponding to the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, and determine the second vertex corresponding to the corresponding edge number based on the two target endpoints; wherein the second data table records the edge number corresponding to the triangle constituted by each first vertex with different numbers and different vertex numbers, and the two endpoints corresponding to the edge number;

[0046] Based on the topological relationship and each second vertex, a triangle corresponding to the edge voxel is constructed.

[0047] In some embodiments, the isosurface construction module is specifically configured to determine a decimal number corresponding to a vertex number based on a binary number of the vertex number;

[0048] Using a decimal number as an index, query the first array subscript of the first data table; wherein the first data table is a two-dimensional array;

[0049] Based on the array element corresponding to the queried first data subscript, the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located is determined.

[0050] In some embodiments, the isosurface construction module is specifically configured to determine a decimal number corresponding to a vertex number based on a binary number of the vertex number;

[0051] Using the decimal number as the index, query the second array subscript of the second data table; wherein the second data table is a two-dimensional array;

[0052] Based on the hexadecimal number of the array element corresponding to the queried second data subscript, the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located and the two target endpoints corresponding to the corresponding edge number are determined.

[0053] In some embodiments, the cutting intersection determination module is specifically used to traverse the second vertex of each polygon in the isosurface, and if it is determined that the traversed second vertex is in the cutting plane, the traversed second vertex is retained;

[0054] The retained second vertices form a cutting intersection line.

[0055] In some embodiments, the cutting intersection determination module is specifically used to determine the normal vector of the cutting plane and determine the vertex vector between the traversed second vertex and any point in the cutting plane;

[0056] If the dot product of the normal vector and the vertex vector is zero, it is determined that the second vertex traversed is in the cutting plane.

[0057] In some embodiments, the cutting intersection line determination module is specifically used to determine any three corner points in the cutting plane, and construct two corner point vectors from each corner point;

[0058] Determine the normal vector based on the cross product of the two corner vectors.

[0059] In some embodiments, the device further includes: a point cloud processing module, configured to perform smoothing processing on the three-dimensional mask point cloud to update the three-dimensional mask point cloud.

[0060] In some embodiments, the target bone structure is a lamina in the spine.

[0061] The present disclosure also provides an electronic device, the electronic device comprising:

[0062] Processor and memory;

[0063] The processor is used to execute the steps of the method in any embodiment of the present disclosure by calling the program or instruction stored in the memory.

[0064] The embodiments of the present disclosure also provide a computer-readable storage medium, which stores a program or instruction. The program or instruction enables a computer to execute the steps of the method in any embodiment of the present disclosure.

[0065] The bone structure cutting line determination scheme provided by the embodiment of the present disclosure obtains a three-dimensional mask point cloud of the target bone structure and a cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located; performs three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine multiple voxels; based on the spatial relationship between the first vertex of each voxel and the three-dimensional mask point cloud, determines the edge voxels in the edge area of ​​the three-dimensional mask point cloud, and constructs polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from each polygon; based on the cutting plane and the isosurface, determines the cutting intersection line of the target bone structure; determines the cutting intersection line of the target bone structure based on the cutting plane and the isosurface, and the isosurface is formed by the polygon constructed based on the first vertex of the edge voxel. Since the edge voxel is in the edge area of ​​the three-dimensional mask point cloud of the target bone structure, it can be ensured that the points on the obtained isosurface are in the edge area of ​​the target bone structure, so that the planned cutting plane and the cutting edge of the bone structure to be removed can be accurately obtained, thereby improving the accuracy of determining the cutting line of the bone structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0068] Figure 1 A schematic flow chart of a method for determining a bone structure cutting line provided in an embodiment of the present disclosure;

[0069] Figure 2 A schematic diagram of a voxel provided in an embodiment of the present disclosure;

[0070] Figure 3 A schematic diagram of vertex number representation of an edge and a first vertex of a voxel provided in an embodiment of the present disclosure;

[0071] Figure 4 A schematic diagram of the configuration of a triangle in a voxel provided in an embodiment of the present disclosure;

[0072] Figure 5 A schematic flow chart of a method for determining a bone structure cutting line provided in an embodiment of the present disclosure;

[0073] Figure 6 A schematic diagram of a cutting intersection line of a target bone structure provided by an embodiment of the present disclosure;

[0074] Figure 7 A schematic diagram of the structure of a device for determining a bone structure cutting line provided in an embodiment of the present disclosure;

[0075] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0076] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described in detail below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0077] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0078] The bone structure cutting line determination method provided in the embodiment of the present disclosure can be applied to the planning and positioning of the bone structure cutting position in the relevant surgery with the help of robots. The bone structure cutting line determination method provided in the embodiment of the present disclosure can be performed by a bone structure cutting line determination device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device with certain data processing capabilities, such as a laptop computer, a desktop computer, a server or a controller of a medical device.

[0079] Figure 1 is a flow chart of a method for determining a bone structure cutting line provided by an embodiment of the present disclosure. Figure 1 The method for determining the bone structure cutting line specifically includes:

[0080] S110, obtaining a three-dimensional mask point cloud of the target bone structure and a cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located.

[0081] Among them, the target bone structure is any bone structure to be cut. For example, in the embodiment of the present disclosure, the target bone structure can be a vertebral plate in the spine, or it can be other bone structures that need to determine the cutting line for cutting, and the embodiment of the present disclosure is not limited.

[0082] Specifically, the bone structure can be scanned by a related scanning device and then reconstructed to obtain a three-dimensional mask point cloud of the target bone structure. For example, image data of the bone structure including the target bone structure is obtained, the bone structure is scanned by a related scanning device to obtain three-dimensional point cloud data corresponding to the bone structure, the image data is segmented and detected to obtain mask information of the target bone structure; the three-dimensional point cloud data is processed using the mask information of the target bone structure, and only the point cloud data corresponding to the mask information is retained to obtain the three-dimensional mask point cloud of the target bone structure. Among them, the segmentation and detection of the image data can be implemented using methods in related technologies, such as using a trained neural network, which will not be described in detail in the embodiments of the present disclosure.

[0083] Exemplarily, in the case where the target bone structure is the lamina in the spine, taking one section of the spine as an example, the image data of the vertebrae is acquired, and the image data of the vertebrae is segmented and detected to obtain the mask information of the lamina; the vertebrae are scanned using relevant scanning equipment to obtain three-dimensional point cloud data corresponding to the vertebrae; the three-dimensional point cloud data of the vertebrae is processed using the mask information of the lamina, and only the three-dimensional point cloud data corresponding to the mask information of the lamina is retained to obtain the three-dimensional mask point cloud of the lamina.

[0084] Optionally, after the three-dimensional mask point cloud of the target bone structure is acquired, in order to eliminate interference noise, the three-dimensional mask point cloud may be smoothed to update the three-dimensional mask point cloud.

[0085] In some cases, the three-dimensional mask point cloud of the target bone structure can be smoothed by using one-dimensional Gaussian functions in the three directions of the X, Y, and Z of the human body coordinate system, for example, according to the following formula (1):

[0086]

[0087] Among them, μ represents the mean and σ represents the variance.

[0088] It should be noted that the smoothing of the three-dimensional mask point cloud of the target bone structure may not be performed in the order of X, Y, and Z, and the calculation order may be arbitrarily combined. Alternatively, the smoothing may be performed using a three-dimensional smoothing algorithm in the related art, which is not specifically limited in the embodiments of the present disclosure.

[0089] In an embodiment of the present disclosure, as an optional implementation method for obtaining a cutting plane in the three-dimensional space where a three-dimensional mask point cloud is located, it includes: obtaining the coordinates of four corner points, and using the coordinates of the four corner points to determine the cutting plane, wherein the coordinates of the four corner points are known data that can be directly obtained.

[0090] As another optional implementation for obtaining the cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located, it includes: obtaining the plane center matrix C, the plane normal vector matrix N, the vector matrix O in the three directions of the X-axis, Y-axis, and Z-axis in the human body coordinate system based on known data, and the matrix B composed of the distances of the four corner points of the cutting plane relative to the center of the plane.

[0091] Where, C = (21.45 255.23 -236.72);

[0092] N = (0.97 -0.24 -0.016);

[0093]

[0094] B=(59.89 56.91 0.0).

[0095] The X-axis direction of the human body coordinate system is from one transverse process to the other transverse process, the Y-axis direction is from the spinal process to the vertebral body, and the Z-axis direction is from the sacrum to the cervical vertebra.

[0096] The three-dimensional coordinates of the four corner points in the human body coordinate system are calculated using the plane center matrix C, plane normal vector matrix N, vector matrix O, and matrix B as shown in the following formulas (2) to (5).

[0097]

[0098] In the above formulas (2) to (5), x min Indicates the minimum X coordinate value among the four corner points, x max Indicates the maximum X coordinate value among the four corner points, y min Indicates the minimum Y coordinate value among the four corner points, y max Indicates the maximum Y coordinate value among the four corner point coordinates. After the three-dimensional coordinates of the four corner points in the human body coordinate system are determined, the cutting plane in the human body coordinate system can be obtained by connecting the four corner points.

[0099] The disclosed embodiment obtains a three-dimensional mask point cloud of the target bone structure and removes point clouds of other bone structures, thereby preventing the point clouds of other bone structures from interfering with the determination of the cutting line of the target bone structure.

[0100] S120 , performing three-dimensional rasterization processing on the spatial region where the three-dimensional mask point cloud is located to determine a plurality of voxels.

[0101] The three-dimensional rasterization process can be understood as voxelization, and each voxel obtained is a hexahedron, which can be a cube. For example, the three-dimensional rasterization process of the spatial region where the three-dimensional mask point cloud is located includes: sampling in the spatial region where the three-dimensional mask point cloud is located, and every 8 adjacent sampling points form a cube, that is, a voxel is obtained, and the 8 sampling points are the 8 first vertices of the voxel, such as Figure 2 As shown in , the coordinates of each first vertex can be obtained in the human body coordinate system. Since the sampling points themselves are discrete, the value of any point in a voxel can only be obtained by trilinear interpolation of these 8 first vertices.

[0102] Alternatively, a known related algorithm may be used to perform three-dimensional rasterization processing, which is not limited in the embodiments of the present disclosure.

[0103] It should be noted that the sampling rate in the three-dimensional rasterization process can be set. Different sampling rates will result in different sizes of obtained voxels. The embodiments of the present disclosure do not limit the sampling rate.

[0104] In some embodiments, after determining a plurality of voxels, the first vertex and edge of each voxel may be stored in a corresponding relationship table as shown in Table 1 below. The corresponding relationship table includes the corresponding relationship between the edge of the voxel and the first vertices as the two endpoints of the edge. For example, Figure 3 The storage of the voxel, edges and first vertices is shown in Table 1, wherein the 8 first vertices of the voxel are represented by vertex numbers "0", "1", "2", "3", "4", "5", "6", and "7", and the 12 edges are represented by edge numbers "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", and "e11", respectively.

[0105] Table 1

[0106] Edge Number First vertex index e0 (0,1) e1 (1,2) e2 (2,3) e3 (3,0) e4 (4,5) e5 (5,6) e6 (6,7) e7 (7,4) e8 (0,4) e9 (1,5) e10 (2,6) e11 (3,7)

[0107] Among them, "e" represents an edge, which is used to distinguish it from a vertex. In the above table, "e0" represents an edge numbered 0, "e1" represents an edge numbered 1, and "e2" represents an edge numbered 2. The first vertex index corresponding to edge e0 is (0,1), indicating that the two first vertices numbered "0" and "1" are the two endpoints of edge e0. The first vertex index corresponding to edge e1 is (1,2), indicating that the two first vertices numbered "1" and "2" are the two endpoints of edge e1. Examples are not given one by one here.

[0108] S130. Based on the spatial relationship between the first vertices of each voxel and the three-dimensional mask point cloud, determine the edge voxels in the edge area of ​​the three-dimensional mask point cloud, and construct polygons based on the first vertices of the edge voxels to construct an isosurface corresponding to the three-dimensional mask point cloud from the polygons.

[0109] It should be noted that the polygon may be a triangle, a quadrilateral, a pentagon, etc., which is not limited here.

[0110] Among them, there are at least two spatial relationships between the first vertex of the voxel and the three-dimensional mask point cloud, one of which is that the first vertex is outside the three-dimensional mask point cloud, and the other is that the first vertex is inside the three-dimensional mask point cloud. Edge voxels include: voxels with some first vertices outside the three-dimensional mask point cloud and some first vertices inside the three-dimensional mask point cloud, and some first vertices refer to at least one first vertex. That is, if at least one of the eight first vertices of a certain voxel is inside the three-dimensional mask point cloud and at least one is outside the three-dimensional mask point cloud, then the voxel is an edge voxel; if all the eight first vertices of a certain voxel are outside the three-dimensional mask point cloud, then the voxel is a non-edge voxel; if all the eight first vertices of a certain voxel are inside the three-dimensional mask point cloud, then the voxel is also a non-edge voxel.

[0111] A polygon is constructed based on each first vertex of the edge voxel, and an isosurface corresponding to the three-dimensional mask point cloud is constructed through the polygon of each edge voxel, that is, the discrete point cloud is converted into a continuous three-dimensional surface.

[0112] S140: Determine a cutting intersection line of the target bone structure based on the cutting plane and the isosurface.

[0113] That is, the intersection line of the isosurface and the cutting plane is determined as the cutting intersection line. Generally, there are countless solutions for the intersection of two planes, because each point on the intersection line is a solution. In the disclosed embodiment, the method of interval sampling in the plane can be adopted, and a plane is represented by points in multiple planes, and the points in each isosurface are traversed to construct the cutting intersection line by judging whether the point is located in the cutting plane.

[0114] Exemplarily, the second vertices of each polygon in the isosurface are traversed, and if it is determined that the traversed second vertices are in the cutting plane, the traversed second vertices are retained; and the cutting intersection line is formed by the retained second vertices.

[0115] Exemplarily, determining whether the traversed second vertex is in the cutting plane includes: determining the normal vector of the cutting plane, and determining the vertex vector between the traversed second vertex and any point in the cutting plane; if the dot product result of the normal vector and the vertex vector is zero, then it is determined that the traversed second vertex is in the cutting plane; if the dot product result of the normal vector and the vertex vector is not zero, then it is determined that the traversed second vertex is not in the cutting plane.

[0116] The method of determining the normal vector of the cutting plane includes: determining any three corner points in the cutting plane, and constructing two corner point vectors from the corner points; and determining the normal vector based on the cross product result of the two corner point vectors.

[0117] For example, assuming that the coordinates of the point in the isosurface are P(i, j, k), two direction vectors can be identified by cutting the three vertices of the isosurface of the plane. The normal vector of the isosurface can be calculated by cross-multiplying the two vectors. The calculation method is as follows:

[0118]

[0119]

[0120]

[0121] Among them, A, B, and C are the three vertices of the isosurface, x1 is the X coordinate value of point A, y1 is the Y coordinate value of point A, x2 is the X coordinate value of point B, y2 is the Y coordinate value of point B, x3 is the X coordinate value of point C, and y3 is the Y coordinate value of point C. Calculate Is the result 0? If it is 0, then they are in the same plane and the point P is one of the intersection points.

[0122] The above-mentioned technical scheme of the embodiment of the present disclosure obtains a three-dimensional mask point cloud of the target bone structure and a cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located; performs three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine multiple voxels; based on the spatial relationship between the first vertex of each voxel and the three-dimensional mask point cloud, determines the edge voxels in the edge area of ​​the three-dimensional mask point cloud, and constructs polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from each polygon; based on the cutting plane and the isosurface, determines the cutting intersection line of the target bone structure; realizes the determination of the cutting intersection line of the target bone structure based on the cutting plane and the isosurface, and the isosurface is formed by triangles constructed based on the first vertices of the edge voxels. Since the edge voxels are in the edge area of ​​the three-dimensional mask point cloud of the target bone structure, it can be ensured that the points on the obtained isosurface are in the edge area of ​​the target bone structure, thereby accurately obtaining the planned cutting plane and the cutting edge of the bone structure to be removed, thereby improving the accuracy of determining the cutting line of the bone structure.

[0123] Since the voxels have characteristics such as rotation and mapping invariance, the polygons constructed based on the first vertices of the edge voxels in the method in the above embodiment may have repeated configurations. In the following embodiments, the polygon is a triangle as an example for illustration. The first vertex of each edge voxel has two possible states, one is that the first vertex is outside the three-dimensional mask point cloud, and the other is that the first vertex is inside the three-dimensional mask point cloud. Each edge voxel has 8 first vertices, so there are 2^8=256 states in total. According to the characteristics of rotation and mapping invariance, the triangle states constructed in the edge voxels can be summarized into 15 configurations, such as Figure 4 As shown, in Figure 4 The edge voxels shown include 15 basic triangular configurations, and of course may include other deformed configurations, which are no longer shown in the embodiment of the present disclosure, wherein the darker vertex represents the first vertex inside the three-dimensional mask point cloud.

[0124] In some embodiments of the present disclosure, Figure 4 For any one of the edge voxels shown, the edge and the first vertex of the edge voxel are stored based on the following method, and the following method is only described by taking any one of the edge voxels as an example.

[0125] For edge voxels, first determine the vertex number of the first vertex, and determine the vertex state of the first vertex of the edge voxel based on the vertex number and the spatial relationship between each first vertex in the edge voxel and the three-dimensional mask point cloud. The vertex state is used to characterize the relationship between each first vertex in the edge voxel and the three-dimensional mask point cloud. The vertex state of the first vertex is represented by an 8-bit binary number, and each bit in the 8-bit binary number indicates whether the first vertex with the corresponding vertex number is inside the three-dimensional mask point cloud. If it is inside the three-dimensional mask point cloud, it is 0, and if it is outside the three-dimensional mask point cloud, it is 1. The 8-bit binary number is represented from right to left according to the order of vertex numbers from small to large. For example, the first vertex corresponding to the smallest vertex number "0" is represented by the rightmost bit of the 8-bit binary number. Figure 3 Taking the shown volume element as an example, if the first vertex numbered "1", "2", "3", and "6" is outside the three-dimensional mask point cloud, and the first vertex numbered "0", "4", "5", and "7" is inside the three-dimensional mask point cloud, then the vertex state of the first vertex of the edge volume element is expressed as: 01001110, that is, the binary number of the vertex number is obtained.

[0126] In the embodiment of the present disclosure, the vertex state of the first vertex is represented by a binary number to obtain the binary number of the vertex number, the 8-bit binary number representing the vertex state of the first vertex is converted into a decimal number as an array subscript (sort number), and a two-dimensional array is constructed based on the edge number of the edge where the second vertex of the triangle in the edge voxel is located, to obtain a first data table, as shown below:

[0127]

[0128] Among them, the last bit (-1) of each element in the two-dimensional array indicates the end, and the bits before (-1) indicate the edge numbers of the edges where the three second vertices of the triangle are located. For example, the array element [2,11,3,-1] with an index of 8 indicates that a triangle is constructed in the corresponding edge voxel, and the second vertices of the triangle are located on the edges of the edge voxel numbered 2, 11, and 3 respectively; the element [3,8,1,1,8,9,-1] with an index of 4 indicates that the corresponding edge voxel constructs two triangles, where the vertices of one triangle are located on the edges of the edge voxel numbered 3, 8, and 1 respectively, and the vertices of the other triangle are located on the edges of the edge voxel numbered 1, 8, and 9 respectively. The order of the edge numbers in the array elements determines the topological relationship of the points that constitute the triangle.

[0129] Similarly, a second data table for characterizing the edge numbers of the edges where the second vertices constituting the triangle are located and the two target endpoints corresponding to the corresponding edge numbers can be constructed based on a similar method. Exemplarily, for each edge voxel, the edge number is first determined, and the edge state of the edge voxel is determined based on the edge number and whether the two first vertices on each edge are outside the three-dimensional mask point cloud. The edge state is used to characterize whether each edge in the edge voxel is hit. Exemplarily, the edge state can be represented by a 12-bit binary number, wherein the 12-bit binary number is represented from right to left in the order of the edge numbers from small to large, such as the edge state corresponding to the smallest edge number "0" is represented by the rightmost bit of the 12-bit binary, and the edge state corresponding to the largest edge number is represented by the leftmost bit of the 12-bit binary. In this 12-bit binary number, each bit indicates whether a first vertex on the corresponding edge is outside the three-dimensional mask point cloud. If at least one first vertex on the edge is outside the three-dimensional mask point cloud, the corresponding bit in the binary number uses 1 to represent the edge state. If no first vertex on the edge is outside the three-dimensional mask point cloud, the corresponding bit in the binary number uses 0 to represent the edge state.

[0130] Convert the binary number of the vertex number into a decimal number as the subscript (sort number) of the two-dimensional array, convert the 12-bit binary number representing the edge state into a hexadecimal number as the array element to construct a two-dimensional array, and obtain the second data table as shown below:

[0131] const EdgeMasks = [

[0132] 0x0,0x109,0x203,0x30a,0xb06,0x905,0xa0f,0x80c,

[0133] 0x406,0x50f,0x605,0x70c,0xc0a,0xd03,0xe09,0xf00,

[0134] 0x190,0x99,0x393,0x29a,0x99c,0x895,0xb9f,…… ];

[0136] In the above-mentioned second data table, after the hexadecimal array elements are converted into binary numbers, the bits of the binary numbers that are 1 represent the hit edges, and the bits that are 0 represent the hit edges. The hit edges are edges that have at least one endpoint outside the three-dimensional mask point cloud. It should be noted that the second data table is associated with the corresponding relationship table shown in Table 1 in the above-mentioned embodiment.

[0137] Figure 5 This is a flowchart of another method for determining a bone structure cutting line provided by an embodiment of the present disclosure, which takes a triangle as an example of a polygon, and further optimizes "determining edge voxels in the edge area of ​​a three-dimensional mask point cloud based on the spatial relationship between the first vertex of each voxel and the three-dimensional mask point cloud, and constructing polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from each polygon". The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0138] See also Figure 5 Based on the above embodiment, step S130 can be implemented through the following steps S510 to S540. It should be noted that the following steps S510 to S540 are executed for any voxel.

[0139] S510 . Determine, based on a spatial relationship between each first vertex of the voxel and the three-dimensional mask point cloud, vertex numbers of first vertices outside the three-dimensional mask point cloud among the first vertices.

[0140] For each volume element obtained by the division, the first vertex outside the three-dimensional mask point cloud can be determined according to the coordinate value of each first vertex and the coordinates of the three-dimensional mask point cloud, and then the vertex number of the first vertex outside the three-dimensional mask point cloud can be determined, and it is judged whether the vertex number of the first vertex outside the three-dimensional mask point cloud is empty.

[0141] S520: If the vertex number is not empty, determine that the voxel is an edge voxel, and based on the vertex number, query the first data table to determine the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located.

[0142] In combination with the foregoing embodiments, the embodiments of the present disclosure number and store the first vertices of the edge voxels. Therefore, if the vertex number of the first vertex is not empty, the voxel is determined to be an edge voxel. If the vertex number of the first vertex is empty, it is determined that the first vertex of the voxel is not numbered and is a non-edge voxel. In this way, all edge voxels can be screened out in the voxels.

[0143] For each edge voxel, based on the vertex number, the first data table is queried to determine the edge number of the edge where each second vertex constituting a triangle in the edge voxel is located. The edge number is used to characterize the topological relationship between each second vertex; the first data table records the corresponding edge numbers of triangles constituted by each first vertex with different numbers and different vertex numbers.

[0144] In combination with the foregoing embodiment, the index of the first data table is the value obtained by converting the binary representation of the vertex number into a decimal number. Therefore, for each determined edge element, the position of the vertex number in the first data table can be determined by converting the vertex number into a decimal number and then querying the first data table.

[0145] Specifically, based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number; use the decimal number as the index to query the first array subscript of the first data table; wherein the first data table is a two-dimensional array; based on the array element corresponding to the queried first data subscript, determine the edge number of the edge where the second vertices constituting the triangle in the edge voxel are located.

[0146] For example, Figure 3 Taking the edge voxel shown as an example, assuming that only the first vertex 3 is outside the three-dimensional mask point cloud, and the other seven first vertices are all inside the three-dimensional mask point cloud, the vertex number of the first vertex outside the three-dimensional mask point cloud is 3, and the binary number of the vertex number of the edge voxel is "00001000", which is "8" after conversion to decimal. Then, use "8" as the array index to query the first data table, and determine that the data at the corresponding position in the first data table is [2,11,3,-1]. By querying the first data table, it can be seen that the target sorting relationship of the edge numbers of the edges where the second vertices of the triangle in the edge voxel are located is edges 2, 11, and 3.

[0147] S530. Based on the vertex number, query the second data table to determine two target endpoints corresponding to the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, and determine the second vertex corresponding to the corresponding edge number based on the two target endpoints.

[0148] The second data table records the edge numbers corresponding to triangles formed by first vertices of different numbers and different vertex numbers, and the two endpoints corresponding to the edge numbers.

[0149] In combination with the foregoing embodiment, the index of the second data table is the value obtained by converting the binary number of the vertex number into a decimal number. Therefore, for each determined edge element, by converting the binary number of the vertex number into a decimal number and then querying the second data table, the corresponding hexadecimal number of the vertex number in the second data table can be determined.

[0150] Specifically, based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number; use the decimal number as the index to query the second array subscript of the second data table; wherein the second data table is a two-dimensional array; based on the hexadecimal number of the array element corresponding to the queried second data subscript, determine the edge number of the edge where each second vertex constituting the triangle in the edge element is located and the two target endpoints corresponding to the corresponding edge number.

[0151] Continuing with the above example, assuming that only the first vertex 3 is outside the three-dimensional mask point cloud, and the other seven first vertices are all inside the three-dimensional mask point cloud, the binary number of the vertex number of the first vertex of the edge element is "00001000", which is "8" after conversion to decimal. Then, use "8" as the array index to query the second data table, and determine that the data at the corresponding position in the second data table is "0x80c". Convert "0x80c" to binary number "100000001100", and the binary number "100000001100" indicates that the edges numbered 2, 3, and 11 are hit, that is, at least one endpoint on the edges numbered 2, 3, and 11 is outside the three-dimensional mask point cloud. Furthermore, through the correspondence table associated with the second data table, it can be determined that the two target endpoints (first vertices) corresponding to the edge numbered 2 are (2, 3), the two target endpoints corresponding to the edge numbered 3 are (3, 0), and the two target endpoints corresponding to the edge numbered 11 are (3, 7).

[0152] S540: Construct triangles corresponding to edge voxels based on the topological relationship and each second vertex.

[0153] Among them, the second vertex can be the midpoint of the edge where the two target endpoints are located. Since the coordinates of the target endpoints in the human body coordinate system are known, the coordinates of the midpoint of the straight line where the two target endpoints are located can be calculated. According to the topological relationship of the edge number of the edge where the second vertex is located determined in step S520, the midpoints of the edge determined in step S530 are connected to obtain the triangle corresponding to the edge element.

[0154] When the second vertex is the midpoint of the edge where the two target endpoints are located, continuing with the above example, since the topological relationship is used to characterize the connection relationship between the second vertices, by querying the first data table, it can be known that taking edge 2 as the starting edge, the second vertices (midpoints) on edges 2, 11, and 3 are connected in sequence to obtain the triangle corresponding to the edge element where only the first vertex 3 is outside the three-dimensional mask point cloud.

[0155] It should be noted that the execution order of S520 and S530 is not limited here, and S520 may be executed before S530, or S520 may be executed in parallel with S530.

[0156] In some embodiments of the present disclosure, when determining the cutting line of the spine, the lamina cutting line of each vertebra may be determined sequentially based on the above method, or the lamina cutting line of each vertebra may be determined simultaneously, which is not limited here.

[0157] The above technical solution of the embodiment of the present disclosure can filter out repeated triangles by constructing triangles based on steps S510 to S540, so that the algorithm implementation logic is relatively simple, and the calculation is simple and fast, thereby improving the calculation efficiency of the cutting intersection line of the target bone structure.

[0158] Reference Figure 6 As shown, Figure 6 The diagram is a schematic diagram of the cutting intersection line of the target bone structure provided in the embodiment of the present disclosure. Among them, the plane 11 is a pre-planned / determined cutting plane, and the curve 12 is the cutting intersection line of the target bone structure. The robot can cut the bone structure based on the cutting intersection line to complete the removal of the vertebral lamina.

[0159] Figure 7 A schematic diagram of a bone structure cutting line determination device provided by an embodiment of the present disclosure. Figure 7 As shown, the bone structure cutting line determination device 700 includes:

[0160] The present disclosure also provides a device for determining a bone structure cutting line, the device comprising:

[0161] A data acquisition module 710 is used to acquire a three-dimensional mask point cloud of a target bone structure and a cutting plane in a three-dimensional space where the three-dimensional mask point cloud is located;

[0162] A volume element determination module 720 is used to perform three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine a plurality of volume elements;

[0163] The isosurface construction module 730 is used to determine the edge voxels in the edge area of ​​the three-dimensional mask point cloud based on the spatial relationship between the first vertices of each voxel and the three-dimensional mask point cloud, and construct polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from the polygons;

[0164] The cutting intersection line determination module 740 is used to determine the cutting intersection line of the target bone structure based on the cutting plane and the isosurface.

[0165] The bone structure cutting line determination device provided by the embodiment of the present disclosure obtains a three-dimensional mask point cloud of a target bone structure and a cutting plane in a three-dimensional space where the three-dimensional mask point cloud is located; performs three-dimensional rasterization processing on the spatial region where the three-dimensional mask point cloud is located to determine a plurality of voxels; determines edge voxels in the edge region of the three-dimensional mask point cloud based on the spatial relationship between the first vertices of each of the voxels and the three-dimensional mask point cloud, and constructs polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from each polygon; determines the cutting intersection line of the target bone structure based on the cutting plane and the isosurface; and realizes the determination of the cutting intersection line of the target bone structure based on the cutting plane and the isosurface, wherein the isosurface is formed by triangles constructed based on the first vertices of the edge voxels. Since the edge voxels are in the edge region of the three-dimensional mask point cloud of the target bone structure, it can be ensured that the points on the obtained isosurface are in the edge region of the target bone structure, thereby accurately obtaining the planned cutting plane and the cutting edge of the bone structure to be removed, thereby improving the accuracy of determining the cutting line of the bone structure.

[0166] In some embodiments, the polygon is a triangle, and the isosurface construction module 730 is specifically used to perform, for any voxel:

[0167] Based on the spatial relationship between each first vertex of the voxel and the three-dimensional mask point cloud, the vertex number of the first vertex outside the three-dimensional mask point cloud among the first vertices is determined; if the vertex number is not empty, the voxel is determined to be the edge voxel, and based on the vertex number, the first data table is queried to determine the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, so as to characterize the topological relationship between each second vertices; wherein the first data table records the edge numbers corresponding to the triangles constituted by each first vertices with different numbers and different vertex numbers; based on the vertex number, the second data table is queried to determine the two target endpoints corresponding to the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located, and the second vertex corresponding to the corresponding edge number is determined based on the two target endpoints; wherein the second data table records the edge number corresponding to the triangle constituted by each first vertices with different numbers and different vertex numbers, and the two endpoints corresponding to the edge number; based on the topological relationship and each second vertex, the triangle corresponding to the edge voxel is constructed.

[0168] In some embodiments, the isosurface construction module 730 is specifically used to determine the decimal number corresponding to the vertex number based on the binary number of the vertex number; use the decimal number as the index to query the first array subscript of the first data table; wherein the first data table is a two-dimensional array; based on the array element corresponding to the queried first data subscript, determine the edge number of the edge where the second vertices constituting the triangle in the edge voxel are located.

[0169] In some embodiments, the isosurface construction module 730 is specifically used to determine the decimal number corresponding to the vertex number based on the binary number of the vertex number; query the second array subscript of the second data table with the decimal number as the index; wherein the second data table is a two-dimensional array; based on the hexadecimal number of the array element corresponding to the queried second data subscript, determine the edge number of the edge where each second vertex constituting the triangle in the edge element is located and the two target endpoints corresponding to the corresponding edge number.

[0170] In some embodiments, the cutting intersection line determination module 740 is specifically used to traverse the second vertices of each polygon in the isosurface, and if it is determined that the traversed second vertex is in the cutting plane, the traversed second vertex is retained; the retained second vertices constitute the cutting intersection line.

[0171] In some embodiments, the cutting intersection determination module 740 is specifically used to determine the normal vector of the cutting plane and determine the vertex vector between the traversed second vertex and any point in the cutting plane; if the dot product of the normal vector and the vertex vector is zero, it is determined that the traversed second vertex is in the cutting plane.

[0172] In some embodiments, the cutting intersection line determination module 740 is specifically used to determine any three corner points in the cutting plane, and construct two corner point vectors from each corner point; and determine the normal vector based on the cross product result of the two corner point vectors.

[0173] In some embodiments, the device further includes: a point cloud processing module, configured to perform smoothing processing on the three-dimensional mask point cloud to update the three-dimensional mask point cloud.

[0174] In some embodiments, the target bone structure is a lamina in the spine.

[0175] The bone structure cutting line determination device provided in the embodiments of the present disclosure can execute the bone structure cutting line determination method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0176] It is worth noting that in the embodiment of the above-mentioned bone structure cutting line determination device, the modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0177] Figure 8 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the electronic device 800 includes one or more processors 801 and a memory 802 .

[0178] The processor 801 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 800 to perform desired functions.

[0179] The memory 802 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 801 may run the program instructions to implement the bone structure cutting line determination method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as a three-dimensional mask point cloud, a first data table, and a second data table may also be stored in the computer-readable storage medium.

[0180] In one example, the electronic device 800 may further include: an input device 803 and an output device 804, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 803 may include, for example, a keyboard, a mouse, etc. The output device 804 may output various information to the outside, including the determined target bone structure cutting line, etc. The output device 804 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0181] Of course, to simplify, Figure 8 Only some of the components related to the present disclosure in the electronic device 800 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 800 may also include any other appropriate components.

[0182] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the bone structure cutting line determination method provided by the embodiments of the present disclosure.

[0183] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0184] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the processor executes the method for determining a bone structure cutting line provided by the embodiment of the present disclosure.

[0185] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0186] It should be noted that the terms used in the present disclosure are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present disclosure specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any and all combinations of one or more related listed items. Relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method or device including the elements.

[0187] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining a bone structure cutting line, characterized in that: include: Acquire a three-dimensional mask point cloud of a target bone structure and a cutting plane in the three-dimensional space where the three-dimensional mask point cloud is located; Performing three-dimensional rasterization processing on the spatial region where the three-dimensional mask point cloud is located to determine a plurality of voxels; Based on the spatial relationship between the first vertices of each of the voxels and the three-dimensional mask point cloud, determine the edge voxels in the edge area of ​​the three-dimensional mask point cloud, and construct polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud by the polygons; Based on the cutting plane and the isosurface, a cutting intersection line of the target bone structure is determined.

2. The method according to claim 1, characterized in that Based on the spatial relationship between the first vertices of each of the voxels and the three-dimensional mask point cloud, edge voxels in the edge area of ​​the three-dimensional mask point cloud are determined, and polygons are constructed based on the first vertices of the edge voxels, including: The polygon is a triangle, and for any of the voxels, the following is performed: Determine, based on a spatial relationship between each of the first vertices of the voxel and the three-dimensional mask point cloud, vertex numbers of the first vertices that are outside the three-dimensional mask point cloud among the first vertices; If the vertex number is not empty, the voxel is determined to be the edge voxel, and based on the vertex number, the first data table is queried to determine the edge number of the edge where each second vertex constituting a triangle in the edge voxel is located, so as to characterize the topological relationship between each second vertices; wherein the first data table records the edge numbers corresponding to the triangles constituted by each first vertex with different numbers and different vertex numbers; Based on the vertex numbers, query the second data table to determine the two target endpoints corresponding to the edge numbers of the edges where the second vertices constituting the triangles in the edge voxel are located, and determine the second vertices corresponding to the corresponding edge numbers based on the two target endpoints; wherein the second data table records the edge numbers corresponding to the triangles constituted by the first vertices with different numbers and different vertex numbers, and the two endpoints corresponding to the edge numbers; The triangle corresponding to the edge voxel is constructed based on the topological relationship and each of the second vertices.

3. The method according to claim 2, characterized in that The step of querying the first data table based on the vertex number to determine the edge number of the edge where each second vertex constituting a triangle in the edge voxel is located includes: Based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number; Using the decimal number as an index, querying a first array subscript of the first data table; wherein the first data table is a two-dimensional array; Based on the array element corresponding to the queried first data subscript, the edge number of the edge where each second vertex constituting the triangle in the edge voxel is located is determined.

4. The method according to claim 2, characterized in that: The step of querying the second data table based on the vertex numbers to determine two target endpoints corresponding to the edge numbers of the edges where the second vertices constituting the triangle in the edge voxel are located includes: Based on the binary number of the vertex number, determine the decimal number corresponding to the vertex number; Using the decimal number as an index, querying a second array subscript of the second data table; wherein the second data table is a two-dimensional array; Based on the hexadecimal number of the array element corresponding to the queried second data subscript, the edge number of the edge where each of the second vertices constituting the triangle in the edge voxel is located and the two target endpoints corresponding to the corresponding edge number are determined.

5. The method according to claim 1, characterized in that The step of determining the cutting intersection line of the target bone structure based on the cutting plane and the isosurface includes: Traversing the second vertices of the polygons in the isosurface, and if it is determined that the traversed second vertices are in the cutting plane, retaining the traversed second vertices; The cutting intersection line is formed by the retained second vertices.

6. The method according to claim 5, characterized in that The determining that the traversed second vertex is in the cutting plane includes: Determine a normal vector of the cutting plane, and determine a vertex vector between the traversed second vertex and any point in the cutting plane; If the dot product result of the normal vector and the vertex vector is zero, it is determined that the traversed second vertex is in the cutting plane.

7. The method according to claim 6, characterized in that Determining the normal vector of the cutting plane includes: Determine any three corner points in the cutting plane, and construct two corner point vectors from each of the corner points; The normal vector is determined based on the cross product result of the two corner point vectors.

8. The method according to claim 1, characterized in that After acquiring the three-dimensional mask point cloud of the target bone structure, the method further includes: The three-dimensional mask point cloud is smoothed to update the three-dimensional mask point cloud.

9. The method according to claim 1, characterized in that: The target bone structure is a lamina in the spine.

10. A device for determining a bone structure cutting line, characterized in that: include: A data acquisition module, used for acquiring a three-dimensional mask point cloud of a target bone structure and a cutting plane in a three-dimensional space where the three-dimensional mask point cloud is located; A voxel determination module, used for performing three-dimensional rasterization processing on the spatial area where the three-dimensional mask point cloud is located to determine a plurality of voxels; an isosurface construction module, configured to determine edge voxels in an edge region of the three-dimensional mask point cloud based on a spatial relationship between the first vertices of each of the voxels and the three-dimensional mask point cloud, and to construct polygons based on the first vertices of the edge voxels, so as to construct an isosurface corresponding to the three-dimensional mask point cloud from the polygons; A cutting intersection line determination module is used to determine the cutting intersection line of the target bone structure based on the cutting plane and the isosurface.

11. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the method for determining a bone structure cutting line according to any one of claims 1 to 9 by calling the program or instruction stored in the memory.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute the method for determining a bone structure cutting line according to any one of claims 1 to 9.