Automatic generation method and system for 3D printing registration guide plate
Through the combination of 3D Swin Transformer and SPU-Net algorithm, the automated segmentation and matching of 3D printed guides is realized, and the problem of low automation of guides is solved, and a highly fit personalized guide is generated, which improves the accuracy and efficiency of the operation. .
Patent Information
- Application Number
- CN202410933758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The existing 3D printing guide plate production software has low automation and a long learning curve for doctors, which makes the planning effect impossible, which is not conducive to clinical promotion.
Using 3D Swin Transformer's two-stage fully automatic spine segmentation method and SPU-Net three-dimensional spatial key point positioning algorithm, open paths are generated, and through singular value decomposition and Boolean subtraction operations, the guide plate model is automatically matched and optimized to generate patient-customized 3D Print the registration guide.
It has greatly improved the automation level of guide plate design, and generated personalized guide plates that are highly suitable for the patient's spine, reducing surgical errors, shortening surgical time, reducing surgical risks, and improving surgical quality. It has important clinical practical value.
Smart Images

Figure CN118887336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous planning of open-circuit robots, and in particular to a method and system for automatically generating a 3D printing registration guide plate. Background Art
[0002] With the continuous development of 3D printing technology, personalized guide plate production software has provided a new option for large-scale clinical application of guide plates. It can greatly reduce the complexity of guide plate production and reduce software and usage costs. However, there are also problems such as low degree of automation, long learning curve for doctors, weak learning interest, which leads to the inability to guarantee planning effects and is not conducive to clinical promotion. Summary of the invention
[0003] The embodiments of the present invention provide a method and system for automatically generating a 3D printing registration guide plate, which can solve the problems in the prior art.
[0004] According to a first aspect of the embodiments of the present invention,
[0005] A method for automatically generating a 3D printing registration guide is provided, comprising:
[0006] The two-stage fully automatic spine segmentation method using 3D Swin Transformer is used to accurately segment the vertebrae in the patient's CT images to reconstruct the three-dimensional model of the spine;
[0007] combining the patient's CT image and the reconstructed three-dimensional model of the spine to generate an open path;
[0008] Six anatomical key points on the spinal segment are selected as target key points, and the six anatomical key points are accurately positioned based on the SPU-Net three-dimensional space key point positioning algorithm. The six anatomical key points are the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process, and the highest point of the right inferior articular process;
[0009] Matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has 6 preset feature points;
[0010] Solve the rotation matrix, translation vector and offset matrix of the best matching guide model, and calculate the target position matrix of the best matching guide model in the CT coordinate system;
[0011] The reconstructed three-dimensional spine model is subtracted from the best matching guide model by using a Boolean subtraction operation to obtain a patient-customized 3D printed registration guide with a fitting surface.
[0012] In an optional embodiment,
[0013] The step of matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively comprises:
[0014] Using the singular value decomposition (SVD) method, the rotation matrix and translation vector from the six anatomical key points to each guide model feature point are solved;
[0015] Based on the rotation matrix and the translation vector, the matching error of each guide plate model is calculated, and the guide plate model with the smallest matching error is determined as the best matching guide plate model.
[0016] In an optional embodiment,
[0017] The matching error of each guide plate model is calculated by the following formula:
[0018]
[0019] Among them, p j represents the spine feature points, R i represents the rotation matrix, q j represents the characteristic point of the guide plate, t i Represents the translation vector.
[0020] In an optional embodiment,
[0021] The singular value decomposition (SVD) method is used to solve the rotation matrix and translation vector from the six anatomical key points to each guide model feature point, including:
[0022] A number of key points are extracted from the spine model as a source point set, and a corresponding number of feature points are extracted from the guide plate model as a target point set;
[0023] Construct the correspondence matrix W from the source point set to the target point set, where Wij represents the correspondence weight between the i-th point in the source point set and the j-th point in the target point set;
[0024] Perform singular value decomposition on the matrix W to obtain three matrices U, S, and VT, where U is an m×m orthogonal matrix, S is an m×n non-negative real diagonal matrix, and VT is an n×n orthogonal matrix, satisfying W = U×S×VT;
[0025] The rotation matrix R = U × VT is calculated from the matrices U and VT, and the scale factor s is calculated from the diagonal elements of the matrix S, where the scale factor s is the average value of the diagonal elements of S;
[0026] The centroid of the source point set is recorded as Cs, and the centroid of the target point set is recorded as Ct, then the translation vector t = Ct-s×R×Cs;
[0027] The rigid body transformation matrix is constructed using the rotation matrix R, scale factor s and translation vector t to align the spine model to the guide model coordinate system.
[0028] In an optional embodiment,
[0029] Solve the rotation matrix, translation vector and offset matrix of the best matching guide model, and calculate the target position matrix of the best matching guide model in the CT coordinate system, including:
[0030] According to the coordinates Pi of the six feature points of the best matching guide model in the model coordinate system, where i = 1, 2, ..., 6, and the coordinates Qi of the corresponding six anatomical key points on the reconstructed three-dimensional spine model, where i = 1, 2, ..., 6, the following least squares optimization problem is solved by the singular value decomposition SVD method to obtain the rotation matrix R and translation vector t from Pi to Qi:
[0031] min∑||R*Pi+t-Qi||^2;
[0032] Setting an offset matrix M, which is used to adjust the position of the best matching guide plate model based on R and t to obtain a better initial position; wherein the offset matrix M is determined by the prior knowledge of the position of the guide plate relative to the vertebral body, and is used to improve the registration accuracy;
[0033] Multiply the rotation matrix R, translation vector t and offset matrix M to obtain the target position matrix TCT of the best matching guide model in the CT coordinate system:
[0034] TCT = M*[R, t];
[0035] Where [R, t] represents the transformation matrix formed by concatenating R and t.
[0036] In an optional embodiment,
[0037] Boolean subtraction operations include:
[0038] According to the calculated target position matrix, mapping the three-dimensional grid of the best matching guide plate model to the CT coordinate system;
[0039] Perform trilinear interpolation on the three-dimensional model of the spine in the CT coordinate system, and perform binarization on the interpolated points;
[0040] voxelize the mapped three-dimensional mesh model of the guide plate, assign the voxels belonging to the guide plate model a value of 1, and assign the rest to 0;
[0041] Performing Boolean subtraction operation on the assigned voxels, subtracting the spine model voxels from the guide model voxels;
[0042] The guide model after Boolean subtraction operation is surface rendered to reconstruct the three-dimensional mesh model and generate the final patient-customized 3D printed registration guide.
[0043] In an optional embodiment,
[0044] Six anatomical key points on the spinal segment are selected as target key points, and precise positioning is performed based on the SPU-Net three-dimensional space key point positioning algorithm.
[0045] According to a second aspect of the embodiments of the present invention,
[0046] Provided is a 3D printing registration guide automatic generation system, comprising:
[0047] The first unit is used to accurately segment the vertebrae in the patient's CT images using a two-stage fully automatic spine segmentation method using 3D Swin Transformer to reconstruct a three-dimensional model of the spine;
[0048] The second unit is used to generate an open path by combining the CT image of the patient and the reconstructed three-dimensional model of the spine;
[0049] The third unit is used to select 6 anatomical key points on the spinal segment as target key points, and accurately locate the 6 anatomical key points based on the SPU-Net three-dimensional space key point positioning algorithm, wherein the 6 anatomical key points are respectively the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process and the highest point of the right inferior articular process;
[0050] A fourth unit is used to match a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has 6 preset feature points;
[0051] The fifth unit is used to solve the rotation matrix, translation vector and offset matrix of the best matching guide plate model, and calculate the target position matrix of the best matching guide plate model in the CT coordinate system;
[0052] The sixth unit is used to use Boolean subtraction operation to subtract the reconstructed spine three-dimensional model from the best matching guide model to obtain a patient-customized 3D printed alignment guide with a fitting surface.
[0053] According to a third aspect of the embodiments of the present invention,
[0054] An electronic device is provided, comprising:
[0055] processor;
[0056] a memory for storing processor-executable instructions;
[0057] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0058] A fourth aspect of the embodiments of the present invention is:
[0059] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0060] In this embodiment, algorithms such as 3D Swin Transformer automatic segmentation of vertebrae and SPU-Net precise positioning of key points are used to greatly reduce manual intervention, improve the automation level of the guide design process, and reduce labor intensity. By matching the preset guide model with the patient's actual spine model and applying Boolean subtraction operations for optimization, a highly fitting personalized customized guide model can be generated for each patient, avoiding the one-size-fits-all general design defects. Based on high-precision medical image segmentation and registration technology, the guide can accurately fit the patient's spinal anatomical structure and reduce surgical errors. At the same time, the Boolean subtraction operation removes the parts that may cause conflicts, further improving the adaptability. Accurate and personalized guide design can effectively guide surgical operations, shorten surgical time, reduce surgical risks, and improve surgical quality, and has important clinical practical value. Using preoperative CT image data, a customized guide model can be generated in advance to support the planning of preoperative surgical paths and plans and improve the quality of surgical preparation. It can be extended to various surgical scenarios that require guide guidance, so it has very strong versatility and expansion potential. The personalized and fitted guide can minimize trauma to the patient's body, improve the overall surgical experience, and help speed up postoperative recovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a process for automatically generating a 3D printing registration guide according to an embodiment of the present invention;
[0062] Figure 2 Schematic diagram of the structure of the automatic generation system of the 3D printing registration guide according to the embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0065] Figure 1 FIG. 1 is a flow chart of a method for automatically generating a 3D printing registration guide plate according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0066] S101. Use the two-stage fully automatic spine segmentation method of 3D Swin Transformer to accurately segment the vertebrae in the patient's CT images to reconstruct the three-dimensional model of the spine;
[0067] Exemplarily, a patient's CT image sequence is read, resampled, the CT images are unified to the same spatial resolution, and data normalization is performed to limit the CT values to a fixed range;
[0068] Use the pre-trained 3D Swin Transformer coarse segmentation model to perform coarse segmentation of the foreground (vertebral area) and background of the CT image, and use the threshold method or other post-processing strategies to extract the coarsely segmented vertebral area; use the coarse segmentation result as input, use the pre-trained 3D Swin Transformer fine segmentation model to perform fine segmentation on each vertebra, perform three-dimensional connected domain analysis on the segmentation result, remove small connected domains, and retain the largest connected domain as the segmentation result of a single vertebra;
[0069] The segmentation results of a single vertebra are subjected to morphological opening operation to smooth the segmentation boundaries. Based on the prior knowledge of vertebral anatomy, the segmentation results are further optimized to ensure segmentation accuracy. The serial numbers of the individual vertebrae after segmentation are detected, and the type and number of each vertebra is marked. The segmented individual vertebrae are reconstructed into a three-dimensional mesh model, and the mesh models are correctly spliced together according to the vertebral serial numbers to obtain a complete three-dimensional model of the spine.
[0070] The spliced 3D spine model is meshed to improve accuracy, and the model is filtered, smoothed and other operations are performed to optimize model quality.
[0071] In this embodiment, 3D Swin Transformer is an advanced segmentation algorithm based on the Transformer self-attention mechanism, which can fully mine the three-dimensional contextual information in the CT image, accurately segment each vertebra, and reconstruct a high-fidelity three-dimensional model of the spine. Compared with traditional segmentation and reconstruction methods, the segmentation accuracy and model detail fidelity of this algorithm are greatly improved. The two-stage segmentation framework greatly reduces the need for manual intervention through a coarse-first-fine-later strategy, realizes the automation of spinal segmentation and reconstruction, and reduces the workload of doctors. High-quality three-dimensional models of the spine can truly reflect the patient's anatomical structure, provide accurate anatomical data support for subsequent surgical path planning, guide plate registration and other links, and fundamentally improve the reliability of surgical planning.
[0072] S102. Generate an open path by combining the patient's CT image and the reconstructed three-dimensional spine model;
[0073] Exemplarily, firstly, the patient's CT image and the reconstructed three-dimensional model of the spine are read, the surgical target area ROI is manually or automatically marked in the CT image, the ROI is mapped to the three-dimensional model of the spine, and the corresponding mesh model is extracted as the ROI three-dimensional model. Based on the ROI three-dimensional model, a fast walking algorithm (FMM) or other algorithms are used to generate a vector field, and the vector field encodes the shortest distance and direction information from any point to the ROI surface;
[0074] According to the surgical plan, one or more entry points are determined on the patient's skin surface, and the positions of the entry points are mapped to the vector field. Starting from the entry point, reverse tracing is performed along the vector field to extract the shortest path to the ROI surface. The optimal path among multiple shortest paths can be selected as the open path, and the extracted open path is smoothed to reduce the change in path curvature, introduce anatomical structure constraints, and avoid important organs and tissue structures;
[0075] The optimized open-circuit path is presented in a three-dimensional view, combined with the three-dimensional models of the spine model and other anatomical structures to intuitively display the relationship between the path and the surrounding environment, and the open-circuit path is parameterized and encoded, such as using parametric curves such as B-Spline. The encoded path parameters can be used for subsequent applications such as robotic surgery planning.
[0076] In this embodiment, based on the patient's own anatomical model and surgical goals, the solution can generate an optimal open-circuit path that fits the patient's individual situation and meets the surgical needs, avoiding the limitations of path planning based on standard templates. The optimized open-circuit path not only has the shortest path length, but also avoids important organs and tissue structures, reducing surgical trauma. At the same time, the path accurately matches the patient's anatomical structure, can guide surgical instruments to be precisely in place, and improve surgical accuracy. After the open-circuit path is encoded, it can provide a precise motion planning path for the robotic surgical system, realize precise surgery with human-machine collaboration, and enhance the automation and complex operation capabilities of the surgery.
[0077] S103. Select 6 anatomical key points on the spinal segment as target key points, and accurately locate the 6 anatomical key points based on the SPU-Net three-dimensional space key point positioning algorithm, wherein the 6 anatomical key points are respectively the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process, and the highest point of the right inferior articular process;
[0078] Exemplarily, the complete spinal 3D mesh model reconstructed in S101 is read, the spinal segment of interest is determined according to the surgical requirements, the spinal model is rotationally corrected to be in a standard viewing angle, the model is rescaled to a fixed size required for network input, the circumscribed sphere of the model is calculated and moved to the center of the sphere, and the model is ensured to be located at the center of the field of view;
[0079] Using the pre-trained SPU-Net 3D key point detection model, the pre-processed spine model is input into SPU-Net, and the network outputs the coordinates of the six key points of each vertebra on the segment;
[0080] The coordinates of the key points output by the network are non-maximum suppressed to remove outliers, and only the key points with high confidence are retained. The key point positions are further optimized and corrected based on anatomical prior knowledge, and the optimized key point coordinates are converted from the normalized space output by the network back to the original model space. The six key points are marked as the left and right superior articular processes according to anatomical semantics, and the three-dimensional coordinates of the key points are exported and marked to the subsequent registration module.
[0081] S104. Matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has six preset feature points;
[0082] Import the built guide plate model. The feature points on the guide plate model have been defined during modeling. For guide plate i, define Q = (q1, q2, q3, q4, q5, q6) i Six feature points are defined for each guide plate model.
[0083] In an optional embodiment,
[0084] The step of matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively comprises:
[0085] Using the singular value decomposition (SVD) method, the rotation matrix and translation vector from the six anatomical key points to each guide model feature point are solved;
[0086] Based on the rotation matrix and the translation vector, the matching error of each guide plate model is calculated, and the guide plate model with the smallest matching error is determined as the best matching guide plate model.
[0087] Exemplarily, the SVD decomposition method is used to solve the relative relationship between the spine feature points and the guide plate feature points, and the guide plate with the minimum matching error is used for surgery. Suppose the spine feature points P = (p1, p2, p3, p4, p5, p6) to the guide plate feature points Q = (q1, q2, q3, q4, q5, q6) i The transformation matrix T is:
[0088]
[0089] Where R is a 3×3 rotation matrix and t is a 3D translation vector. The problem is transformed into finding suitable R and t so that for all i∈(1,n):
[0090] p i =Rq i +t;
[0091] In practical applications, due to the interference of errors and noise, the problem is transformed into the minimization problem of the following formula:
[0092]
[0093] In an optional embodiment,
[0094] The matching error of each guide plate model is calculated by the following formula:
[0095]
[0096] Among them, p j represents the spine feature points, R i represents the rotation matrix, q j represents the characteristic point of the guide plate, t i Represents the translation vector.
[0097] In an optional embodiment,
[0098] The singular value decomposition (SVD) method is used to solve the rotation matrix and translation vector from the six anatomical key points to each guide model feature point, including:
[0099] A number of key points are extracted from the spine model as a source point set, and a corresponding number of feature points are extracted from the guide plate model as a target point set;
[0100] Construct the correspondence matrix W from the source point set to the target point set, where Wij represents the correspondence weight between the i-th point in the source point set and the j-th point in the target point set;
[0101] Perform singular value decomposition on the matrix W to obtain three matrices U, S, and VT, where U is an m×m orthogonal matrix, S is an m×n non-negative real diagonal matrix, and VT is an n×n orthogonal matrix, satisfying W = U×S×VT;
[0102] The rotation matrix R = U × VT is calculated from the matrices U and VT, and the scale factor s is calculated from the diagonal elements of the matrix S, where the scale factor s is the average value of the diagonal elements of S;
[0103] The centroid of the source point set is recorded as Cs, and the centroid of the target point set is recorded as Ct, then the translation vector t = Ct-s×R×Cs;
[0104] The rigid body transformation matrix is constructed using the rotation matrix R, scale factor s and translation vector t to align the spine model to the guide model coordinate system.
[0105] For example, the average value of the point sets P and Q is calculated and in,
[0106]
[0107] right Perform SVD decomposition:
[0108] definition Then use Det(UV T ) indicates UV T The determinant of is defined as:
[0109]
[0110] From this we can get R = UV T ,
[0111] For each guide plate Ti, a set of rotation matrices R can be calculated i and pan t i , calculate the matching error of each guide plate, adopt the winner-takes-all strategy, and take the guide plate model with the smallest error as the final guide plate.
[0112] In this embodiment, by aligning the patient's actual spine model with the ideal guide model, the optimal implantation position and angle of the guide on the patient's spine can be accurately calculated, thereby guiding the surgical process, reducing surgical errors, and improving implantation accuracy. Accurate guide implantation position can avoid unnecessary damage to surrounding tissues, reduce surgical risks, and ensure surgical safety. It also reduces the probability of postoperative complications. Compared with the traditional method of manually measuring and adjusting the guide position, this method can quickly and automatically complete the alignment of the guide and the spine, simplify the surgical process, and shorten the operation time. It reduces the influence of the surgeon's subjective experience, can provide a consistent guide implantation reference for different surgeons, and improve the consistency of surgical quality. The spine model and guide model constructed through preoperative CT and other imaging data can complete the alignment calculation before surgery, formulate the best plan for surgery, and improve the accuracy of surgical planning.
[0113] S105. Solve the rotation matrix, translation vector and offset matrix of the best matching guide plate model, and calculate the target position matrix of the best matching guide plate model in the CT coordinate system;
[0114] Since the feature points and the feature points selected by the guide plate are all on the surface, directly using the initial posture matrix of the guide plate placed under the CT may result in the registration surface being too small and the registration being insufficient. Therefore, it is necessary to set an additional bias matrix based on expert experience.
[0115] In an optional embodiment,
[0116] Solve the rotation matrix, translation vector and offset matrix of the best matching guide model, and calculate the target position matrix of the best matching guide model in the CT coordinate system, including:
[0117] According to the coordinates P of the six feature points of the best matching guide plate model in the model coordinate system i , where i = 1, 2, ..., 6, and the coordinates Q of the corresponding six anatomical key points on the reconstructed three-dimensional model of the spine i , where i = 1, 2, ..., 6, the following least squares optimization problem is solved by the singular value decomposition SVD method, and the obtained i To Q i The rotation matrix R and translation vector t are:
[0118] min∑||R*P i +tQ i ||^2;
[0119] Setting an offset matrix M, which is used to adjust the position of the best matching guide plate model based on R and t to obtain a better initial position; wherein the offset matrix M is determined by the prior knowledge of the position of the guide plate relative to the vertebral body, and is used to improve the registration accuracy;
[0120] Multiply the rotation matrix R, translation vector t and offset matrix M to obtain the target position matrix TCT of the best matching guide model in the CT coordinate system:
[0121] TCT = M*[R, t];
[0122] Where [R, t] represents the transformation matrix formed by concatenating R and t.
[0123] In this embodiment, the rotation matrix R and translation vector t for optimally registering the guide model to the actual spine model of the patient can be obtained by solving the least squares optimization problem through singular value decomposition. Then, the initial registration result is optimized and adjusted by combining the bias matrix M introduced by expert experience. This method of combining mathematical optimization with expert knowledge can greatly improve the registration accuracy between the guide model and the actual spine, thereby guiding the guide to be implanted in the ideal position more accurately during surgery. Due to the improvement of registration accuracy, the guide can be implanted more accurately to the planned position and angle, avoiding unnecessary damage to the surrounding tissue, thereby reducing surgical risks and improving surgical safety. Traditionally, determining the implantation position of the guide requires the surgeon to perform a large amount of manual measurement and repeated adjustments, which is time-consuming and labor-intensive. By automatically completing the optimization registration before surgery, the surgical process is simplified and the operation time is shortened. In addition, the influence of the surgeon's subjective experience is reduced, and a consistent guide implantation reference can be provided for different surgeons, thereby improving the consistency of surgical quality.
[0124] S106. Using a Boolean subtraction operation, subtract the reconstructed three-dimensional spine model from the best matching guide model to obtain a patient-customized 3D printed registration guide with a fitting surface.
[0125] After completing the matching of the guide plate and the vertebral body, a fitting surface of the guide plate and the vertebral body needs to be generated, that is, the model of the guide plate is subtracted from the model of the vertebral body.
[0126] In an optional embodiment,
[0127] Boolean subtraction operations include:
[0128] According to the calculated target position matrix, mapping the three-dimensional grid of the best matching guide plate model to the CT coordinate system;
[0129] Perform trilinear interpolation on the three-dimensional model of the spine in the CT coordinate system, and perform binarization on the interpolated points;
[0130] voxelize the mapped three-dimensional mesh model of the guide plate, assign the voxels belonging to the guide plate model a value of 1, and assign the rest to 0;
[0131] Performing Boolean subtraction operation on the assigned voxels, subtracting the spine model voxels from the guide model voxels;
[0132] The guide model after Boolean subtraction operation is surface rendered to reconstruct the three-dimensional mesh model and generate the final patient-customized 3D printed registration guide.
[0133] Exemplarily, the original guide plate model is defined as A, the vertebral body model is defined as B, and the following formula is used to represent the generation method of the guide plate model C with the fitting surface. This operation becomes a Boolean subtraction operation in the model operation:
[0134] C = AA ∩ B;
[0135] Specifically, the three-dimensional mesh model of the guide plate is mapped to the CT coordinate system according to the calculated target position matrix, and the vertebral model in the CT coordinate system is subdivided and interpolated. Due to the insufficient precision of CT data, the CT layer thickness used in the research process is 0.6mm. If it is not processed, the guide plate model will result in jagged edges after voxelization. Therefore, the trilinear interpolation method is used to interpolate the CT space and the target vertebra.
[0136] The larger the interpolation coefficient, the higher the resolution of the interpolated data. To balance accuracy and operation speed, the interpolation coefficient is set to 3. After completing the three-dimensional linear interpolation, the interpolated points are binarized, and the points with a value greater than 0.5 are assigned a value of 1, and the rest are assigned a value of 0.
[0137] The mapped stl model is voxelized and mapped to the expanded CT coordinate system. The geometric intersection method is used to quickly voxelize the three-dimensional mesh surface, and then the scan line seed filling algorithm is used to fill the internal and external voxels. The voxels belonging to the model are assigned 1 and the rest are assigned 0.
[0138] Perform Boolean subtraction on the segmented vertebral model voxel points. For a certain point, if the guide plate model voxel value I A is 0, then the point value is I C is 0; if the guide plate model voxel value I A is 1, the vertebral model voxel value is I B is 1, then the point value is I C is 0, otherwise it is 1. That is:
[0139]
[0140] The vertebral model and the calculated guide plate were surface drawn separately. The Marching-cube algorithm was used to surface draw the guide plate after Boolean operation, and its three-dimensional mesh model was rebuilt to finally generate the guide plate. Finally, the generated guide plate was 3D printed before surgery, and the visual corner points were installed, thus completing the generation and production of the guide plate.
[0141] In an optional embodiment,
[0142] Six anatomical key points on the spinal segment are selected as target key points, and precise positioning is performed based on the SPU-Net three-dimensional space key point positioning algorithm.
[0143] In this embodiment, the part of the guide model that overlaps with the patient's spinal anatomical structure can be effectively removed through Boolean subtraction, ensuring that the final printed guide can accurately fit the patient's spine and avoid surgical conflicts. The guide model after the Boolean subtraction operation contains the negative printing information of the patient's spinal anatomical structure. This shape feature can provide better visual and tactile feedback during surgery, helping the surgeon to quickly locate the guide implantation position. The precisely fitted customized guide can minimize damage to surrounding tissues and reduce surgical risks. At the same time, the Boolean subtraction operation also eliminates the parts that may cause conflicts. After removing the part that overlaps with the spine, the shape of the guide is more reasonable and can maximize its role in guiding screw implantation. The use of customized guides can avoid the traditional process of repeatedly measuring and adjusting the guide position, simplify the surgical process, and shorten the operation time. By generating a customized guide model for each patient, it fully fits the patient's own anatomical characteristics, which helps to achieve personalized and precise treatment.
[0144] Figure 2 FIG. 1 is a schematic diagram of the structure of the automatic generation system of the 3D printing registration guide plate according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0145] The first unit is used to accurately segment the vertebrae in the patient's CT images using a two-stage fully automatic spine segmentation method using 3D Swin Transformer to reconstruct a three-dimensional model of the spine;
[0146] The second unit is used to generate an open path by combining the CT image of the patient and the reconstructed three-dimensional model of the spine;
[0147] The third unit is used to select 6 anatomical key points on the spinal segment as target key points, and accurately locate the 6 anatomical key points based on the SPU-Net three-dimensional space key point positioning algorithm, wherein the 6 anatomical key points are respectively the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process and the highest point of the right inferior articular process;
[0148] A fourth unit is used to match a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has 6 preset feature points;
[0149] The fifth unit is used to solve the rotation matrix, translation vector and offset matrix of the best matching guide plate model, and calculate the target position matrix of the best matching guide plate model in the CT coordinate system;
[0150] The sixth unit is used to use Boolean subtraction operation to subtract the reconstructed spine three-dimensional model from the best matching guide model to obtain a patient-customized 3D printed alignment guide with a fitting surface.
[0151] According to a third aspect of the embodiments of the present invention,
[0152] An electronic device is provided, comprising:
[0153] processor;
[0154] a memory for storing processor-executable instructions;
[0155] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0156] A fourth aspect of the embodiments of the present invention is:
[0157] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0158] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically generating a 3D printing registration guide, characterized in that: include: The two-stage fully automatic spine segmentation method using 3D Swin Transformer is used to accurately segment the vertebrae in the patient's CT images to reconstruct the three-dimensional model of the spine; combining the patient's CT image and the reconstructed three-dimensional model of the spine to generate an open path; Six anatomical key points on the spinal segment are selected as target key points, and the six anatomical key points are accurately positioned based on the SPU-Net three-dimensional space key point positioning algorithm. The six anatomical key points are the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process, and the highest point of the right inferior articular process; Matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has 6 preset feature points; Solve the rotation matrix, translation vector and offset matrix of the best matching guide model, and calculate the target position matrix of the best matching guide model in the CT coordinate system; The reconstructed three-dimensional spine model is subtracted from the best matching guide model by using a Boolean subtraction operation to obtain a patient-customized 3D printed registration guide with a fitting surface.
2. The method according to claim 1, characterized in that The step of matching a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively comprises: Using the singular value decomposition (SVD) method, the rotation matrix and translation vector from the six anatomical key points to each guide model feature point are solved; Based on the rotation matrix and the translation vector, the matching error of each guide plate model is calculated, and the guide plate model with the smallest matching error is determined as the best matching guide plate model.
3. The method according to claim 2, characterized in that The matching error of each guide plate model is calculated by the following formula: Among them, p j represents the spine feature points, R i represents the rotation matrix, q j represents the characteristic point of the guide plate, t i Represents the translation vector.
4. The method according to claim 2, characterized in that: The singular value decomposition (SVD) method is used to solve the rotation matrix and translation vector from the six anatomical key points to each guide model feature point, including: A number of key points are extracted from the spine model as a source point set, and a corresponding number of feature points are extracted from the guide plate model as a target point set; Construct the correspondence matrix W from the source point set to the target point set, where W ij Represents the weight of the correspondence between the i-th point in the source point set and the j-th point in the target point set; Perform singular value decomposition on the matrix W to obtain three matrices U, S, and VT, where U is an m×m orthogonal matrix, S is an m×n non-negative real diagonal matrix, and VT is an n×n orthogonal matrix, satisfying W = U×S×VT; The rotation matrix R = U × VT is calculated from the matrices U and VT, and the scale factor s is calculated from the diagonal elements of the matrix S, where the scale factor s is the average value of the diagonal elements of S; The centroid of the source point set is recorded as Cs, and the centroid of the target point set is recorded as Ct, then the translation vector t = Ct-s×R×Cs; The rigid body transformation matrix is constructed using the rotation matrix R, scale factor s and translation vector t to align the spine model to the guide model coordinate system.
5. The method according to claim 1, characterized in that Solve the rotation matrix, translation vector and offset matrix of the best matching guide model, and calculate the target position matrix of the best matching guide model in the CT coordinate system, including: According to the coordinates P of the six feature points of the best matching guide plate model in the model coordinate system i , where i = 1, 2, ..., 6, and the coordinates Q of the corresponding six anatomical key points on the reconstructed three-dimensional model of the spine i , where i = 1, 2, ..., 6, the following least squares optimization problem is solved by the singular value decomposition SVD method, and the obtained i To Q i The rotation matrix R and translation vector t are: min∑||R*P i +t-Q i ||^2; Setting an offset matrix M, which is used to adjust the position of the best matching guide plate model based on R and t to obtain a better initial position; wherein the offset matrix M is determined by the prior knowledge of the position of the guide plate relative to the vertebral body, and is used to improve the registration accuracy; Multiply the rotation matrix R, translation vector t and offset matrix M to obtain the target position matrix T of the best matching guide model in the CT coordinate system CT : T CT =M*[R,t]; Where [R, t] represents the transformation matrix formed by concatenating R and t.
6. The method according to claim 5, characterized in that Six anatomical key points on the spinal segment are selected as target key points, and precise positioning is performed based on the SPU-Net three-dimensional space key point positioning algorithm.
7. The method according to claim 1, characterized in that Boolean subtraction operations include: According to the calculated target position matrix, mapping the three-dimensional grid of the best matching guide plate model to the CT coordinate system; Perform trilinear interpolation on the three-dimensional model of the spine in the CT coordinate system, and perform binarization on the interpolated points; voxelize the mapped three-dimensional mesh model of the guide plate, assign the voxels belonging to the guide plate model a value of 1, and assign the rest to 0; Performing Boolean subtraction operation on the assigned voxels, subtracting the spine model voxels from the guide model voxels; The guide model after Boolean subtraction operation is surface rendered to reconstruct the three-dimensional mesh model and generate the final patient-customized 3D printed registration guide.
8. A 3D printing registration guide automatic generation system, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to accurately segment the vertebrae in the patient's CT images using a two-stage fully automatic spine segmentation method using 3D Swin Transformer to reconstruct a three-dimensional spine model; The second unit is used to generate an open path by combining the CT image of the patient and the reconstructed three-dimensional model of the spine; The third unit is used to select 6 anatomical key points on the spinal segment as target key points, and accurately locate the 6 anatomical key points based on the SPU-Net three-dimensional space key point positioning algorithm, wherein the 6 anatomical key points are respectively the highest point of the left superior articular process, the highest point of the right superior articular process, the center of the left vertebral plate, the center of the right vertebral plate, the highest point of the left inferior articular process and the highest point of the right inferior articular process; A fourth unit is used to match a plurality of preset guide plate models with the reconstructed three-dimensional spine model respectively, wherein each guide plate model has 6 preset feature points; The fifth unit is used to solve the rotation matrix, translation vector and offset matrix of the best matching guide plate model, and calculate the target position matrix of the best matching guide plate model in the CT coordinate system; The sixth unit is used to subtract the reconstructed three-dimensional spine model from the best matching guide model by using Boolean subtraction operation to obtain a patient-customized 3D printed registration guide with a fitting surface.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Manufacturing method of preoperative simulated maxillary block postoperative retaining guide plate
CN117426886A
Spine registration guide plate, manufacturing method, model construction method and device
CN117643501A
Cutting path confirmation method and system of spinal surgical instrument
CN118285910A
A guide plate structure for spine surgery and the production method and usage thereof
US20220330955A1
Smart guide plate design method and device for total knee arthroplasty
WO2022161161A1
Cited By
Female pelvic floor multi-target curve medical image collaborative registration and alignment method
CN121685601A
A female pelvic floor multi-target curve medical image cooperative registration and alignment method
CN121685601B
