An online instant repair method for bone defects
The use of a portable 3D scanner and integrated algorithm enables online real-time repair of bone defects, solving the problems of speed and precision in bone defect repair during surgery in existing technologies, and improving the automation and intelligence of the surgical process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2023-04-26
- Publication Date
- 2026-07-21
AI Technical Summary
Existing bone defect repair methods cannot achieve rapid and precise in-situ printing during surgery, and existing surface reconstruction and repair methods involve complex interactive steps and long production cycles, making them unsuitable for online printing during surgery.
A portable 3D scanner is used to acquire point cloud data of defective bone tissue online. An integrated algorithm is used to preprocess the point cloud data, triangulate it, and repair holes, so as to realize the automatic, efficient and accurate reconstruction of the 3D model of the defective bone tissue into a complete bone tissue model.
It enables online, real-time repair of bone defects, simplifies interactive steps during surgery, improves the automation and intelligence of printing, and is suitable for in-situ printing during surgery.
Smart Images

Figure CN116486011B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical fields of in-situ printing, online data processing, and three-dimensional reconstruction. The invention relates to an online real-time repair method for bone defects. Background Technology
[0002] For bone defects, bio-3D printing technology can be used to create bio-engineered scaffolds with life-sustaining properties in vitro. These scaffolds can repair and reconstruct damaged bone tissue, thereby maintaining or improving bone function and structure, showing great promise for clinical applications. However, studies on the integration of bone scaffolds with cells have revealed poor cell and tissue development. The grafts have almost no ability to integrate into the body's tissues and are ultimately rejected by the body. The main reason for this is that the cellular environment established by current engineered scaffold fabrication technologies is an artificial microenvironment, lacking a material interface similar to the natural extracellular matrix, resulting in insufficient cell induction and difficulty in achieving tissue regeneration.
[0003] With the development of real-time measurement and biomanufacturing technologies, an important branch of additive manufacturing has emerged in biomanufacturing—in-situ bio-3D printing. This technology reconstructs data of the defect in real time, allowing bio-ink to be directly and customizedly printed onto the defect area. In this way, the human body becomes a natural bioreactor, promoting the maturation of the printed structure in a real biological environment from the very beginning of the manufacturing process. This eliminates the need for an artificial microenvironment that plays a role in tissue development. Furthermore, endogenous cells can be naturally induced to migrate into the printed structure, further facilitating tissue regeneration. However, to achieve in-situ bio-printed repair, a three-dimensional model of the repair must first be obtained. This requires accurate acquisition of in-situ defect data online and rapid, real-time three-dimensional reconstruction of the defect surface within a predetermined surgical timeframe.
[0004] Existing surface reconstruction and repair methods are all offline operations, generally using commercial software such as Geomagic Studio for professionals. These methods involve manually reconstructing the defective areas, lacking specific operational methods for particular fields, having complex interactive steps, and long reconstruction cycles (ranging from 1-2 days to 1-2 hours), making them unsuitable for in-situ printing during surgery. Therefore, this invention proposes an integrated algorithm for real-time repair of bone defects based on online measurement, achieving automatic, efficient, and accurate reconstruction of a 3D model from defective bone tissue to a complete bone tissue model. The main content includes: scanning living or fresh defective bone tissue with a portable 3D scanner to acquire its point cloud data online; using the integrated algorithm of this invention, preprocessing, triangulating, detecting holes, and repairing the surface of the point cloud data, ultimately achieving real-time reconstruction of the defect within tens of seconds during surgery, providing effective support for in-situ printing. Currently, there are no reports of integrated algorithms for real-time repair of defective bone tissue based on online 3D scanning technology. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides an integrated real-time repair method for online measurement of bone defects, enabling automatic, efficient, and precise reconstruction of a three-dimensional model of complete bone tissue from living bone defect tissue during surgery.
[0006] The present invention is implemented using the following technical solution:
[0007] An online, real-time repair method for bone defects includes the following steps:
[0008] S1. Extract point cloud data of defective bone tissue online and perform three-dimensional data conversion processing to obtain uniform preliminary point cloud data of defective bone tissue with only surface features;
[0009] S2. Based on the 3D printed model, the point cloud data of the preliminary defective bone tissue is processed into a triangular mesh to obtain a triangular mesh surface model of bone tissue with holes.
[0010] S3. Based on the triangular mesh surface model of bone tissue, perform hole repair calculations to obtain a printed model of the hole repair surface; where:
[0011] 301. Index the triangular mesh surface model of bone tissue to obtain the boundary points of the holes;
[0012] 302. Based on the center position of the hole in the bone tissue triangular mesh surface model, connect the hole boundary points to form a triangular mesh. Connect the midpoints of each side of each triangle to generate four new triangles. Perform three subdivision iterations to obtain the preliminary repaired hole patch.
[0013] 303. Iteratively project the vertices of the initially repaired hole patch onto the following implicit surface model to obtain a hole repair surface that conforms to the curvature variation trend of the surrounding triangular mesh;
[0014]
[0015] Where: (x j ,y j ,z j ) represents the implicit surface constraint point, λ j Let (x, y, z) be the weights of the constraint points, (x, y, z) be any point on the surface, and p0, p1, p2, p3 be the coefficients of the first-order polynomial.
[0016] 304. Determine whether the hole repair is complete. If complete, iteratively smooth the hole repair surface using the Laplacian operator and output the printed model of the hole repair surface; otherwise, return to step 301.
[0017] Furthermore, the process of extracting point cloud data of the defective bone tissue online and converting it into three-dimensional data to obtain uniform preliminary point cloud data of the defective bone tissue with only surface features in step S1 includes the following steps:
[0018] 101. Perform point cloud coordinate system transformation on the point cloud data of the extracted bone tissue defects online;
[0019] 102. The point cloud data after coordinate system transformation is cropped to obtain point cloud data around the hole that only has curvature features;
[0020] 103. Perform point cloud statistical filtering on point cloud data that only has curvature features around the holes;
[0021] Traverse the cropped point cloud data, given the number of nearest neighbors n1 for each point, calculate the average distance between each point and its n1 nearest neighbors;
[0022] Calculate the mean and standard deviation of all average distances to obtain a distance threshold; delete points whose average distance to their n1 nearest neighbors is greater than the distance threshold; after traversal, obtain the point cloud data after removing outliers;
[0023] 104. Perform uniform sampling filtering on the point cloud data after removing outliers;
[0024] Traverse the point cloud after removing outliers and create a series of small spheres for it, with the radius r1 of the spheres given according to the size of the point cloud data;
[0025] Calculate the center of each sphere and the distance between each point inside the sphere and the center of the sphere. Keep the point closest to the center of the sphere and delete the other points inside the sphere. Finally, after traversing the sphere, the remaining points are the point cloud after uniform sampling.
[0026] Furthermore, step S2, which involves triangulating the initial point cloud data of the defective bone tissue using the 3D printed model to obtain a triangular mesh surface model of the bone tissue with holes, includes the following steps:
[0027] 201. Smooth the point cloud after uniform sampling by surface fitting; where:
[0028] Surface fitting involves establishing a fitting function based on the preprocessed point cloud data. Given a nearest neighbor radius r2 for fitting, the weighted sum of squares of the differences between the values of points within the nearest neighbor radius and the values of the fitting function at those points is calculated to obtain the fitted surface within the nearest neighbor radius. The point cloud is then mapped onto the fitted surface to obtain a smoothed point cloud.
[0029] 202. Calculate the normals of the smoothed point cloud to obtain point cloud normal information; where:
[0030] The normal calculation process involves traversing the smoothed point cloud, selecting any point, and given the number of nearest neighbors n2, constructing a third-order matrix.
[0031] Calculate and solve for the eigenvalues of the covariance matrix. The eigenvector corresponding to the smallest eigenvalue is the normal vector, thus obtaining the point cloud normal information.
[0032] 203. Based on the point cloud normal information, a triangular mesh surface model of bone tissue with holes is obtained by triangulation; where:
[0033] The point cloud calculated by the normal is projected onto a two-dimensional coordinate plane through the normal; three neighboring points are randomly selected to form a triangular mesh as the initial surface. The triangles connecting the points in the point cloud satisfy the empty circle property and the principle of maximizing the minimum angle. The boundary of the surface is expanded by continuously searching for neighboring points. The search radius is set to r3 until all points that meet the geometric and topological correctness are connected to form a complete triangular mesh surface.
[0034] By connecting the points in the original three-dimensional space according to the topological connection relationship of the points in the two-dimensional plane, a triangular mesh surface model of bone tissue with holes is obtained.
[0035] Beneficial effects:
[0036] This invention proposes an integrated real-time repair method for online measurement of bone defects. It can effectively solve the problems of complicated interactive steps and long production cycle in existing surface reconstruction and repair methods, and realize one-step real-time shaping of bone defect repair. It is suitable for in-situ printing during surgery, making intraoperative printing more automated and intelligent. Attached Figure Description
[0037] Figure 1 Algorithm flowchart.
[0038] Figure 2 (a) Model of a pig leg bone with defects Figure 2 (b) Scanning process diagram Figure 2 (c) Point cloud data of the missing pig leg bone.
[0039] Figure 3 (a) Coordinate system transformation result of point cloud of the missing pig leg bone Figure 3 (b) Results of cutting out the dot cloud of the missing pig leg bone. Figure 3 (c) Results of outlier removal from point cloud of defective pig leg bones. Figure 3 (d) Uniform sampling results of point cloud of the defective pig leg bone. Figure 3 (e) Point cloud surface reconstruction results of the defective pig leg bone Figure 3 (f) Repair results of holes in the missing pig leg bone.
[0040] Figure 4 (a) Point cloud data of the defective skull, Figure 4 (b) Preprocessing results of point cloud of the defective skull Figure 4 (c) Results of point cloud surface reconstruction of the defective skull Figure 4 (d) Results of repair of the cavity in the skull defect. Detailed Implementation
[0041] The following is in conjunction with the appendix Figure 1-4 The present invention will be described in detail below:
[0042] This invention provides an online, real-time repair method for bone defects, comprising the following steps:
[0043] (1) Online acquisition of point cloud data of bone defect tissue
[0044] The VTOP-Designer desktop 3D scanner scans bone defects to acquire point cloud data of the defective bone tissue online. The VTOP-Designer 3D scanner offers the following advantages: it employs advanced blue light technology, using non-contact structured light for scanning, resulting in strong system stability and effective filtering of ambient light interference; its scanning speed is extremely fast, with a single scan speed of <1.5s, meeting the requirements for intraoperative online measurement; its scanning accuracy reaches 0.02mm to 0.03mm, with a resolution of 1.3 million pixels, enabling accurate feature identification; and its compact structure makes it easy to carry. At the start of the scan, the scanner's camera coordinate system origin is aligned with the bone defect area to ensure uniform point cloud distribution and clear features around the hole, facilitating subsequent data processing; during the scan, the camera angle is adjusted according to the object's shape characteristics, and after scanning, automatic stitching yields a complete 3D point cloud of features.
[0045] (2) Integrated algorithm for point cloud of defective bone tissue and hole repair
[0046] To address the issues of complex interactive steps and long production cycles in offline surface reconstruction and repair methods, an integrated algorithm for repairing bone defect point clouds and holes is proposed. This algorithm enables one-step, real-time shaping of bone defect repair, significantly increasing the automation and intelligence of intraoperative printing. The specific steps are as follows: The acquired bone defect point cloud data is automatically preprocessed with rotation, cropping, and filtering to obtain uniform point cloud data containing only surface features; this point cloud data is automatically triangulated to facilitate hole edge feature detection and reconstruction; the meshed holes are automatically located, surface constructed, and smoothed to quickly and accurately obtain the final complete bone tissue surface model. The integrated real-time repair algorithm flow is as follows: Figure 1 As shown.
[0047] 1) Point cloud preprocessing of defective bone tissue
[0048] Point cloud data obtained from VTOP-Designer scanners contains various noise and micro-holes, which can affect the accuracy of subsequent triangulation and hole repair. Therefore, the following preprocessing steps are required:
[0049] Point cloud coordinate system transformation: The scanned coordinate system is inconsistent with the reference coordinate system of the point cloud obtained from the scan. Subsequent automatic cropping, filtering, and other processing all rely on the point cloud coordinates. To more intuitively detect the position of the point cloud in the reference coordinate system, it is necessary to transform the point cloud in the scanned coordinate system to the reference coordinate system. Principal component analysis is used to obtain the three principal directions and centroid of the point cloud; the principal directions of the point cloud are aligned with the coordinate axes of the reference coordinate system, and the centroid is the origin of the transformed coordinate system.
[0050] Point cloud cropping: Point cloud data contains a lot of noise, which is not conducive to the automatic repair of missing holes and will increase the algorithm's running time. Therefore, it is necessary to crop the point cloud after coordinate transformation and retain only the point cloud data with curvature features around the holes.
[0051] Given the range of point cloud coordinates on the X-axis, iterate through each point in the point cloud, determine whether the point's coordinates on the X-axis are within the given range, keep the points whose coordinates are within the range, and delete the points whose coordinates are not within the given range.
[0052] Given the range of point cloud coordinates on the Y and Z axes, repeat the above steps; finally, after the traversal ends, the remaining points constitute the clipped point cloud.
[0053] The parameter settings in this section are related to the size of the hole in the radial direction and the thickness of the hole in the axial direction on the scanned sample. Since the size of the point cloud data obtained by the VTOP-Designer 3D scanner is 1:1 with the size of the scanned sample, and the hole area is used as the scanning center during measurement, the Y-axis direction always coincides with the hole axis direction after coordinate system transformation. Therefore, the sample center at the central axis of the hole is taken as the origin, and the approximate distance from the edge of the retained point cloud to the origin on the X, Y, and Z axes is obtained. The range of X, Y, and Z axis coordinate values in this part of the algorithm is set.
[0054] Point cloud statistical filtering: Outliers exist around the edges of the cropped point cloud data, which can cause errors when estimating local point cloud features. In order to ensure the accuracy of subsequent triangulation, outlier removal is performed automatically.
[0055] Traverse the clipped point cloud, given the number n1 of the nearest neighbors of each point, calculate the average distance between each point and its n1 nearest neighbors;
[0056] Next, calculate the mean and standard deviation of all average distances to obtain a distance threshold; delete points whose average distance to n1 neighboring points is greater than the distance threshold; finally, after the traversal ends, the remaining points are the point cloud after removing outliers.
[0057] A larger parameter n1 is set in the outlier removal algorithm, the more point cloud data is retained, but the longer the algorithm runs. Experiments show that around n1=30, the filtering effect is optimal and the algorithm runs in a shorter time. The parameters involved in this part of the algorithm are independent of the scanned sample size and only related to the point spacing, which is determined by the scanner. Therefore, the parameter values in this part of the algorithm are universal.
[0058] Uniform sampling filtering of point clouds: Besides missing holes, statistical filtering still leaves some tiny holes in the point cloud data. To ensure the accuracy of surface reconstruction and hole repair, it needs to be homogenized to obtain uniform point cloud data. Using a uniform sampling filter to downsample the point cloud significantly reduces its density, balances the distribution density of the point cloud data, and effectively preserves the original surface features.
[0059] Traverse the point cloud after removing outliers and create a series of small spheres for it, with the radius r1 of the spheres given according to the size of the point cloud data;
[0060] Calculate the center of each sphere and the distance between each point inside the sphere and the center of the sphere. Keep the point closest to the center of the sphere and delete the other points inside the sphere. Finally, after traversing the sphere, the remaining points are the point cloud after uniform sampling.
[0061] In point cloud data obtained from a single scan by a portable 3D scanner, the distance between points is approximately 0.2. The density of the point cloud determines that it is not necessary to significantly reduce the number of points to shorten the algorithm's running time. Experiments show that the parameter value in uniform sampling is generally four times the point spacing. That is, when r1 = 0.8, it can uniformly sample the point cloud while retaining more of the original point cloud to better maintain the surface curvature. The parameters involved in this part of the algorithm are only related to the point spacing, therefore the parameter values in this part of the algorithm are universal.
[0062] The algorithm described above is the first step in real-time reconstruction. It is encapsulated in a VC++ program and runs automatically without manual interaction. After 3 to 15 seconds of calculation, it yields a uniform point cloud data containing only curvature features and the area around the holes, providing strong support for the next step of surface reconstruction.
[0063] 2) Automatic triangulation of point cloud of defective bone tissue
[0064] The standard file for 3D printer models is the STL file, which is generally composed of a series of triangular meshes. Therefore, an algorithm is proposed to automatically triangulate point cloud data.
[0065] Point cloud smoothing: Irregular data exists in the preprocessed point cloud, which can lead to flaws in subsequent triangulation. Therefore, smoothing is necessary. A fitting function is established based on the preprocessed point cloud data. Given a nearest-neighbor radius r² for fitting, the weighted sum of squared differences between the values of points within the nearest-neighbor radius and the values of the fitting function at those points is calculated to obtain the fitting surface within the nearest-neighbor radius. The point cloud is then mapped onto the fitting surface to obtain the smoothed point cloud. If the parameter r² is too small, the smoothing effect is almost negligible; if r² is too large, overfitting occurs. Experiments show that its value is generally 10 times the point spacing, i.e., r² = 2.0. The parameters involved in this part of the algorithm are only related to the point spacing, therefore the parameter values in this part of the algorithm are universal.
[0066] Normal Calculation: Subsequent triangulation requires point cloud normal information, so normal calculation is necessary for the smoothed point cloud. Traverse the smoothed point cloud, select any point, and construct a 3x3 matrix given the number n2 of its nearest neighbors. Calculate and solve for the eigenvalues of the covariance matrix; the eigenvector corresponding to the smallest eigenvalue is the normal vector, thus obtaining the point cloud normal. The larger the parameter n2 in the point cloud normal calculation, the worse the accuracy of the calculation. Experiments show that the accuracy is highest around n2 = 10. The parameters involved in this part of the algorithm are only related to the point spacing; therefore, the parameter values in this part of the algorithm are generally applicable.
[0067] Triangulation: The point cloud calculated using normals is projected onto a 2D coordinate plane. Three neighboring points are randomly selected to form a triangular mesh as the initial surface. The triangles connecting the points in the point cloud satisfy the empty circle property and the principle of maximizing the minimum angle. The surface boundary is expanded by continuously searching for neighboring points, with a search radius of r3, until all points that meet geometric and topological correctness are connected, forming a complete triangular mesh surface. The points in the original 3D space are then connected according to the topological connections between points in the 2D plane. The resulting triangular mesh is the reconstructed surface model. If the parameter r3 in triangulation is too small, gaps will appear in the surface; if r3 is too large, it will affect the quality of the triangular mesh. Experiments show that its value is generally 8 times the point spacing, i.e., r3 = 1.6. The parameters involved in this part of the algorithm are only related to the point spacing; therefore, the parameter values in this part of the algorithm are universal.
[0068] The algorithm described above is the second step of real-time reconstruction. It is encapsulated in a VC++ program and runs automatically without manual interaction. After 3 to 15 seconds of calculation, a triangular mesh surface model with holes is obtained, which provides strong support for the next step of hole repair.
[0069] 3) Repair of holes in damaged bone tissue
[0070] To repair holes in a triangular mesh surface model, the holes must first be accurately detected, and their boundary points located. The vertices and faces in the triangular mesh surface model are indexed, and the three edges of all triangles on the mesh are extracted. Duplicate edges are deleted, and edges belonging to only one triangle are retained. These edges are marked as boundary edges, and the vertices contained within them are marked as boundary points. All boundary edges are then connected sequentially to obtain the holes on the mesh.
[0071] After hole detection is completed, the system automatically performs preliminary repairs to obtain hole patches. The center position of the hole is calculated, and the boundary points of the hole are connected to the center position point to form a triangular mesh. The midpoints of the sides of each triangle are connected to generate four new triangles. This process is repeated three times to obtain the preliminary repaired hole patches.
[0072] Compared to the surrounding mesh surface, the hole patch does not exhibit a similar curvature change trend and differs greatly from the original shape of the model. Therefore, it is necessary to create an implicit surface that conforms to the curvature change trend of the surrounding surface. An implicit surface is created using radial basis functions:
[0073]
[0074] Where x j For implicit surface constraint points, λ j Let x be any point on the surface, and P(x) be a linear polynomial defined as P(x) = p0 + p1x + p2y + p3z, where h(xx) is the weight of the constraint point. j h(x) is a radial basis function. When fitting a three-variable function, it is generally taken as h(x) = x. 3 .
[0075] To solve for the weights and polynomial coefficients, the interpolation constraints given by the constraint points must be satisfied:
[0076]
[0077] Where f i =f(x) i (i = 0, 1, ..., n). Surface constraint points are divided into two categories: surface constraint points and non-surface constraint points. Surface constraint points are selected from the vertices of the triangular mesh around the hole, while non-surface constraint points are obtained using the normal vector constraint method in the direction of the normal vector of all surface constraint points, which better reflects the curvature change of the surface.
[0078] At the same time, the weight λ j The equations should satisfy the orthogonal conditions required to minimize energy:
[0079]
[0080] Substituting constraint equations (2) and (3) into equation (1), we obtain the following system of equations:
[0081]
[0082] The implicit surface expression is obtained after solving:
[0083]
[0084] After the implicit surface conforming to the curvature change trend is successfully established, the vertices of the initially repaired hole patch are automatically projected onto the implicit surface. The vertex positions of the hole patch are used as the initial conditions for iteration. Each vertex is substituted into the iterative calculation formula to calculate the position it is stretched to on the new vertex. When the distance between the new vertex and the original vertex is less than a given error, the new vertex can be considered to be on the hole surface, and the iteration ends; otherwise, the new vertex replaces the original vertex, and the iteration continues until all original vertices are projected onto the implicit surface.
[0085] Finally, the Laplacian operator is used to iteratively adjust each vertex of the projected mesh to the center of its surrounding neighborhood, smoothing the implicit surface and obtaining the final complete surface model.
[0086] The algorithm described above is the third step of the real-time reconstruction. It is encapsulated in a VC++ program and runs automatically without manual interaction. After 5 to 30 seconds of calculation, the STL file of the curved surface at the hole is obtained.
[0087] To verify the feasibility of the method of the present invention, pig leg bone and human skull models are used as examples to evaluate the effect of the present invention.
[0088] Example 1: Online instant repair of pig leg bones
[0089] (1) Online acquisition of point cloud data of bone defect tissue
[0090] Select the leg bone portion of the pig's natural bone tissue, choosing an area with a significant change in curvature, and drill holes in it artificially, such as... Figure 2 As shown in (a). The defective bone tissue was scanned using a VTOP-Designer desktop 3D scanner (equipment from Tianjin Weishen Technology Co., Ltd.) to acquire point cloud data of the defective bone tissue in real time, such as... Figure 2 As shown in (b), the obtained point cloud data is as follows: Figure 2 As shown in (c).
[0091] (2) Point cloud → Hole repair integrated repair algorithm
[0092] The integrated algorithm is fully encapsulated in a VC++ program and can be run with a single click, taking a total of 9.18 seconds. The step-by-step process is as follows.
[0093] 1) Point cloud preprocessing of defective bone tissue
[0094] Point cloud coordinate system transformation: This algorithm is applicable to different models; simply run the program, and the result will be as follows. Figure 3 As shown in (a).
[0095] Point cloud clipping: Given the range of point cloud coordinates on the X-axis, iterate through each point in the point cloud, determining whether its X-axis coordinates fall within the given range. Keep points with coordinates within the range and delete those outside. Given the ranges for the Y-axis and Z-axis, repeat the above steps. After the iteration, the remaining points constitute the clipped point cloud. Based on measured data of the pig leg bone hole, the X-axis coordinate range is set to (-5, 60), the Y-axis coordinate range to (-30, -10), and the Z-axis coordinate range to (-10, 80). The results are as follows. Figure 3 As shown in (b).
[0096] Point cloud filtering: This algorithm is applicable to different models. With fixed parameter settings, no modification is needed; simply run the program. When n1 is 30, the outlier removal effect is as follows: Figure 3 As shown in (c), r1 is 0.8, and the uniform sampling effect is as follows. Figure 3 As shown in (d).
[0097] 2) Point cloud surface reconstruction of defective bone tissue
[0098] This part has been integrated into the unified algorithm, applicable to different models. With fixed parameter settings, no modification is needed; simply run the program. For example, r² = 2, n² = 10, and r³ = 1.6. The results are as follows: Figure 3 As shown in (e).
[0099] 3) Repair of holes in damaged bone tissue
[0100] This part has been integrated into the unified algorithm, which is applicable to different models. Simply run the program, and the results will be as follows. Figure 3 As shown in (f).
[0101] After multiple experiments, the above set of parameters has been verified to be universally applicable for online and timely repair of pig leg bone defects.
[0102] (3) Evaluation indicators
[0103] Number of point clouds of the missing pig leg bone obtained from scanning: 53739; Number of images after surface reconstruction of the missing pig leg bone: 3773; Number of images after hole repair of the missing pig leg bone: 3862; Program running time: 9.18s; Standard deviation of the comparison between the complete surface model and the original point cloud data: 0.1067mm.
[0104] This scanned sample is fresh bone, which can simulate the bone morphology and structure during surgery. In addition, although the hole in the defect is small, it is in a region with a large curvature. The images and data show that this algorithm can achieve accurate and real-time repair.
[0105] Example 2: Online Instant Repair of Human Skull Defects
[0106] The process is consistent with Example 1, and the point cloud data is as follows: Figure 4 As shown in (a). Based on the measured data of the cavity in the skull defect, the X-axis coordinate range in the point cloud clipping module algorithm was set to (-80, 80), the Y-axis coordinate range to (-85, 85), and the Z-axis coordinate range to (-65, 65); other parameters did not need to be modified. The preprocessed point cloud of the skull defect is shown below. Figure 4 As shown in (b), the result of the point cloud surface reconstruction of the defective skull is as follows: Figure 4 As shown in (c), the repair results of the point cloud holes in the defective skull are as follows: Figure 4 As shown in (d).
[0107] Evaluation metrics: Number of point clouds of the defective pig leg bone obtained from scanning: 84383; Number of images after surface reconstruction of the defective pig leg bone: 16086; Number of images after hole repair of the defective pig leg bone: 16428; Program running time: 57.74s; Standard deviation of the complete surface model compared with the original point cloud data: 0.4902mm.
[0108] The two examples above demonstrate that the repaired area blends naturally with the original mesh, following the curvature variation around the hole. The algorithm is fully automated, requiring no interaction throughout the process, and takes only 10-60 seconds. Furthermore, the hole repair accuracy meets the requirements. Therefore, this integrated algorithm design method can meet the requirements for online real-time repair of bone defects, and its future application in in-situ printing of bone defects during surgery is entirely feasible.
[0109] The integrated real-time repair method for online measurement of bone defects proposed in this invention is based on the Visual Studio platform and is implemented by combining the PCL point cloud library and the Libigl geometry processing library. A complete C++ program has been written. The point cloud data obtained by the scanner is saved in the same folder as the source files. For different types of scanned samples, according to their size, only three parameters on the X, Y, and Z axes of the point cloud clipping need to be modified. Then, a complete surface model can be obtained by running the program with one click.
Claims
1. A method for online real-time repair of bone defects, characterized in that, Includes the following steps: S1. Extract point cloud data of defective bone tissue online and perform three-dimensional data conversion processing to obtain uniform preliminary point cloud data of defective bone tissue with only surface features; S2. Based on the 3D printed model, the initial point cloud data of the defective bone tissue is processed into a triangular mesh to obtain a triangular mesh surface model of the bone tissue with holes; where:
201. Smooth the point cloud after uniform sampling by surface fitting; where: Surface fitting involves establishing a fitting function based on the preprocessed point cloud data. Given a nearest neighbor radius r2 for fitting, the weighted sum of squares of the differences between the values of points within the nearest neighbor radius and the values of the fitting function at those points is calculated to obtain the fitted surface within the nearest neighbor radius. The point cloud is then mapped onto the fitted surface to obtain a smoothed point cloud.
202. Calculate the normals of the smoothed point cloud to obtain point cloud normal information; where: The normal calculation process involves traversing the smoothed point cloud, selecting any point, and given the number of nearest neighbors n2, constructing a third-order matrix. Calculate and solve for the eigenvalues of the covariance matrix. The eigenvector corresponding to the smallest eigenvalue is the normal vector, thus obtaining the point cloud normal information.
203. Based on the point cloud normal information, a triangular mesh surface model of bone tissue with holes is obtained through triangulation; where: The point cloud calculated by the normal is projected onto a two-dimensional coordinate plane through the normal; three neighboring points are randomly selected to form a triangular mesh as the initial surface. The triangles connecting the points in the point cloud satisfy the empty circle property and the principle of maximizing the minimum angle. The boundary of the surface is expanded by continuously searching for neighboring points. The search radius is set to r3 until all points that meet the geometric and topological correctness are connected to form a complete triangular mesh surface.
204. Connect the points in the original three-dimensional space according to the topological connection relationship of the points in the two-dimensional plane to obtain a triangular mesh surface model of bone tissue with holes; S3. Based on the triangular mesh surface model of bone tissue, perform hole repair calculations to obtain a printed model of the hole repair surface; where:
301. Index the triangular mesh surface model of bone tissue to obtain the boundary points of the holes; 302. Based on the center position of the hole in the bone tissue triangular mesh surface model, connect the hole boundary points to form a triangular mesh. Connect the midpoints of each side of each triangle to generate four new triangles. Perform three subdivision iterations to obtain the preliminary repaired hole patch.
303. Iteratively project the vertices of the initially repaired hole patch onto the following implicit surface model to obtain a hole repair surface that conforms to the curvature variation trend of the surrounding triangular mesh; in:( x j , y j , z j () represents an implicit surface constraint point. λ j The weights of the constraint points, ( x , y , z Let be any point on the surface. p 0、 p 1. p 2. p 3 represents the coefficients of the first-order polynomial; 304. Determine whether the hole repair is complete. If complete, iteratively smooth the hole repair surface using the Laplacian operator and output the printed model of the hole repair surface; otherwise, return to step 301.
2. The online real-time repair method for bone defects according to claim 1, characterized in that: The process of extracting point cloud data of the defective bone tissue online and converting it into three-dimensional data to obtain uniform preliminary point cloud data of the defective bone tissue with only curved surface features, as described in step S1, includes the following steps:
101. Perform point cloud coordinate system transformation on the point cloud data of the extracted bone tissue defects online; 102. The point cloud data after coordinate system transformation is cropped to obtain point cloud data around the hole that only has curvature features; 103. Perform point cloud statistical filtering on point cloud data that only has curvature features around the holes; Traverse the cropped point cloud data, given the number of nearest neighbors n1 for each point, calculate the average distance between each point and its n1 nearest neighbors; Calculate the mean and standard deviation of all average distances to obtain a distance threshold; delete points whose average distance to their n1 nearest neighbors is greater than the distance threshold; after traversal, obtain the point cloud data after removing outliers; 104. Perform uniform sampling filtering on the point cloud data after removing outliers; Traverse the point cloud after removing outliers and create a series of small spheres for it, with the radius r1 of the spheres given according to the size of the point cloud data; Calculate the center of each sphere and the distance between each point inside the sphere and the center of the sphere. Keep the point closest to the center of the sphere and delete the other points inside the sphere. Finally, after traversing the sphere, the remaining points are the point cloud after uniform sampling.