A dynamic coloring method and storage medium for acetabulum grinding
By using VTK library and vtkbool modules for intersection and difference operation in navigation acetabular grinding, dynamic coloring of the acetabular model solves the problems of reduced model accuracy and low computing efficiency in the existing technology, and achieves high efficiency, Stable and accurate visualization helps operators accurately judge the polishing progress.
Patent Information
- Application Number
- CN202411099906.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The existing navigation acetabular grinding visualization method has problems such as decreasing model accuracy and low computing efficiency, which leads to granulation and screen lag, affecting the smooth progress of the operation.
A dynamic coloring method for acetabular polishing is adopted. By generating two hemispherical shell surface mesh models, the intersection and difference set calculations are performed using the VTK library and vtkbool modules, the acetabular model is updated in real time, and dynamics are dynamics based on the preset template area. Set the model surface color, reduce dependence on the vtkbool library, and improve computing efficiency and stability.
It improves calculation efficiency and stability, avoids degradation of model accuracy, and realizes high-precision visualization and real-time display, helping operators accurately judge the polishing progress and avoid excessive or insufficient polishing.
Smart Images

Figure CN118628696B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of medical image processing, and in particular to a dynamic coloring method and storage medium for acetabulum grinding. Background Art
[0002] In navigation-based acetabular replacement surgery, acetabular grinding is a crucial step, which is directly related to the success of the surgery and the patient's recovery effect. Traditional acetabular grinding methods mainly rely on the doctor's experience and surgical skills. It is difficult to accurately control the amount and position of grinding, which can easily lead to problems such as insufficient or excessive grinding. In order to solve these problems, in recent years, navigation-based acetabular grinding methods based on computer vision and medical image processing technology have received widespread attention and application.
[0003] However, the existing navigation-based acetabular grinding visualization methods still have some significant technical defects. One commonly used method is to convert the surface mesh data into a three-dimensional image composed of voxels and perform addition and subtraction operations on the three-dimensional image to achieve grinding visualization. Although this method can simulate the grinding process to a certain extent, its disadvantages are:
[0004] (1) Decreased model accuracy: When surface mesh data is converted to 3D images, the model accuracy is inevitably reduced due to the limitation of the voxel size of the image, which makes the final visualization result granular (unsmooth). This granularity not only affects the visual effect, but also may mislead the doctor's judgment and operation;
[0005] (2) Low computational efficiency: Each time a cutting operation is performed, the 3D image needs to be converted back into surface mesh data. This data format conversion process takes a long time, resulting in low visualization computational efficiency. During surgeries that require high real-time performance, this low efficiency may cause screen freezes, affecting the smooth progress of the surgery.
[0006] In order to overcome the above defects, some researchers have tried to pre-process the three-dimensional images, such as filtering operations, to improve the smoothness of the visualization results. For example, CN116636902A proposed a method for direct visualization based on three-dimensional image volume drawing. Although it eliminates the step of reconstructing the surface after each cut and improves the calculation efficiency, the visualization results still have obvious granularity. CN116824100A has made improvements on the basis of CN116636902A. Through additional filtering operations and specific color mapping tables during the initialization of the three-dimensional image, the volume drawing display has a smoothing effect. However, this method still cannot completely solve the problem of obvious granularity of the newly formed section each time.
[0007] Although the surface Boolean operation scheme based on VTK (Visualization Toolkit) is used to visualize the acetabular surface model and the grinding tool model by performing difference operations directly, the display effect is significantly improved. However, in the specific implementation, due to the need for color separation, each grinding update requires Boolean operations on the surface data of different color areas, which is computationally intensive and time-consuming. In addition, the vtkbool library itself has poor stability, and multiple calls increase the probability of calculation failure. Therefore, it is necessary to develop a more efficient, stable and accurate acetabular grinding dynamic coloring method. Summary of the invention
[0008] The purpose of the present invention is to provide a dynamic coloring method and storage medium for acetabulum grinding in view of the problems existing in the prior art, optimize the coloring method, reduce the dependence on the vtkbool library, reduce the amount of calculation, and improve the calculation efficiency.
[0009] To achieve the above object, the technical solution adopted by the present invention is:
[0010] A dynamic coloring method for acetabulum grinding comprises the following steps:
[0011] S1. Generate two hemisphere shell surface mesh models according to the acetabular cup model cup, which are respectively recorded as hemisphere_0 and hemisphere_1, wherein the radius of hemisphere_0 is the same as the outermost layer of cup, while the radius of hemisphere_1 is larger than that of hemisphere_0 by a specified buffer distance n;
[0012] S2, moving the acetabular cup model cup to a predetermined position of the acetabulum model bone, obtaining its transformation matrix T, and applying the transformation matrix T to hemisphere_0 and hemisphere_1;
[0013] S3, through the vtkbool module, calculate and generate the green area to be polished and the red warning area in the acetabulum model bone;
[0014] S4. During the navigation-based acetabulum grinding process, the acetabulum model bone is ground using the grinding head model reamer, and the acetabulum model bone is updated through real-time difference calculation. The VTK library function is used to dynamically set the model surface color according to the preset template area to achieve precise grinding and visual warning.
[0015] Step S1 specifically includes:
[0016] S1.1. Import the acetabular cup model in the image coordinates, and record the model as cup. The outermost layer of the cup is hemispherical. The center of the hemisphere is determined to be the rotation center o of the acetabular cup, and the radius of the hemisphere is a known value r.
[0017] S1.2. With the center o of the sphere as the center of the circle and the radius r of the hemisphere as the radius, a hemisphere shell surface mesh model is generated. The model is recorded as hemisphere_0, and its bottom surface is flush with the bottom surface of the cup to ensure the correspondence between the two in spatial position;
[0018] S1.3. Similarly, generate another hemispherical shell surface mesh model with the sphere center o as the circle center and r+n as the radius, where n is the thickness of the specified buffer area.
[0019] Step S2 specifically includes:
[0020] S2.1, importing the acetabulum model in the image coordinates, recording the model as bone, moving the previously imported acetabulum cup model cup to a predetermined position on the acetabulum color separation model bone by translation and / or rotation, and during the movement, recording and obtaining the rigid body transformation matrix T of cup from the initial position to the planned position in the image coordinate system;
[0021] S2.2. Apply the rigid body transformation matrix T to hemisphere_0 and hemisphere_1. By applying this transformation matrix, hemisphere_0 and hemisphere_1 are also moved to the same planned position as cup.
[0022] In step S3, the to-be-polished area Green and the warning area Red in the acetabulum model bone are calculated and generated through the vtkbool module, including:
[0023] S3.1. Use the vtkbool module to perform an intersection operation on bone and hemisphere_0. The resulting surface mesh data is recorded as Green, indicating the area to be polished.
[0024] S3.2. Use the vtkbool module to perform a difference operation on bone and hemisphere_1. The resulting surface mesh data is recorded as Red, indicating the warning area.
[0025] In step S4, in the navigation-based acetabulum grinding process, the acetabulum model bone is ground using a grinding head model reactor, including:
[0026] S4.1. rigidly attaching an optical tracking array to the grinding instrument and the patient's acetabulum;
[0027] S4.2, transmitting back in real time through the positioning camera the transformation matrix TcameraToToolRF from the positioning camera coordinate system Fcamera to the tool tracking array coordinate system FtoolRF, and the transformation matrix TcameraToBoneRF from Fcamera to the bone tracking array coordinate system FboneRF;
[0028] S4.3, performing an image registration operation, using the above two transformation matrices for image navigation positioning, to ensure that the relative position relationship between the patient's acetabulum and the grinding instrument in the real world is consistent with the relative position relationship between the acetabulum model and the grinding instrument model in the image space;
[0029] S4.4. Move the grinding instrument in the real world, and use the established image navigation positioning relationship to update the positions of the acetabulum model and the grinding instrument model in the image in real time, so that the relative position relationship between the two in the image space is synchronized with the relative position relationship in the real world.
[0030] In step S4, the acetabulum model bone is updated by real-time difference calculation, including
[0031] S4.5, monitor the change of the reamer position, use the vtkbool module to perform a difference operation between the bone and the reamer, and generate new acetabulum model surface mesh data;
[0032] S4.6. Reassign the newly generated surface mesh data to the acetabulum model bone to complete the model update.
[0033] In step S4, the method of dynamically setting the model surface color according to the preset template area using the VTK library function includes:
[0034] S4.7, calling the vtkSelectEnclosedPoints function of the VTK library to traverse each mesh vertex of the updated acetabulum model bone;
[0035] S4.8. For each mesh vertex of the acetabulum model bone, a corresponding color scalar is set according to its spatial position relationship with the area to be polished Green and the warning area Red.
[0036] Step S4.8 specifically includes:
[0037] S4.8.1. If a mesh vertex of bone is on or inside the green area to be polished, set the RGB scalar of the point to green [0,1,0];
[0038] S4.8.2. If a mesh vertex of bone is within the warning area Red, set the RGB scalar of the point to red [1,0,0];
[0039] S4.8.3. If a mesh vertex of the bone is not located in the above two areas, set the RGB scalar of the point to white [1,1,1] to achieve dynamic coloring.
[0040] A computer-readable storage medium stores a computer program, wherein the computer program implements the above method steps when executed by a processor.
[0041] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method steps when executing the computer program.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] This application uses the VTK library and vtkbool module for surface Boolean operations, and optimizes the coloring method, reducing the dependence on the vtkbool library. Each grinding update only requires calling the vtkbool module once, and then using the native function of the VTK library for coloring judgment, thereby reducing the amount of calculation and improving the calculation efficiency;
[0044] Since the number of calls to the vtkbool module is reduced, the probability of calculation failure caused by multiple calls is reduced, and the stability and reliability of the system are improved. In addition, the vtkSelectEnclosedPoints function of the VTK library is used for shading judgment, which increases the robustness of the shading process;
[0045] Directly perform difference operations on surface mesh data, avoiding the problem of model accuracy degradation caused by voxel size limitations when converting between surface mesh data and 3D images in traditional methods, and maintaining high geometric accuracy and surface smoothness;
[0046] During the polishing process, only the surface Boolean operation is performed on the acetabulum model data, which is convenient for the background data management and recovery. When the program crashes abnormally, only the acetabulum model data needs to be saved, and the previous polishing progress can be restored when the program is entered next time.
[0047] Through dynamic coloring technology, the status of the acetabulum model during the grinding process can be displayed in real time, including the area to be ground, the buffer area and the warning area. When the grinding exceeds the planned grinding area, especially when it exceeds the specified buffer distance, the acetabulum model will display red to alert the operator, which helps the operator to accurately judge the grinding progress and avoid over-grinding or under-grinding, thereby improving the grinding accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 This is a schematic diagram of the structure of an acetabular cup model in one embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of the structure of the hemisphere shell surface grid model hemisphere_0 in one embodiment of the present application;
[0051] Figure 3 This is a schematic diagram of the structure of the hemisphere shell surface grid model hemisphere_1 in one embodiment of the present application;
[0052] Figure 4 A schematic diagram of moving a cup from an initial position to a planned position in one embodiment of the present application;
[0053] Figure 5 This is a schematic diagram of moving the planned positions of hemisphere_0 and hemisphere_1 in one embodiment of the present application;
[0054] Figure 6 This is a schematic diagram of the intersection operation of bone and hemisphere_0 in one embodiment of the present application;
[0055] Figure 7 This is a schematic diagram of performing a difference operation between bone and hemisphere_1 in one embodiment of the present application;
[0056] Figure 8 This is a schematic diagram of image registration operation in one embodiment of the present application;
[0057] Fig. 9 This is a schematic diagram of the visualization effect presented by the acetabulum model bone during the polishing process in one embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings 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.
[0059] In a first aspect of the present application, a dynamic coloring method for acetabulum grinding is provided, comprising the following steps:
[0060] S1. Generate two hemisphere shell surface mesh models according to the acetabular cup model cup, which are respectively denoted as hemisphere_0 and hemisphere_1, wherein the radius of hemisphere_0 is the same as the outermost layer of cup, while the radius of hemisphere_1 is larger than that of hemisphere_0 by a specified buffer distance n.
[0061] Specifically, by generating two hemisphere shells hemisphere_0 and hemisphere_1 with different radii, the acetabulum area Green that needs to be ground and the warning area Red can be accurately defined. The buffer distance n can be specified according to specific circumstances, such as n is set to 1mm, to meet different surgical needs.
[0062] S2. Move the cup model cup to the predetermined position of the acetabulum model bone, obtain its transformation matrix T, and apply the transformation matrix T to hemisphere_0 and hemisphere_1; move the two to the same position as cup, providing an accurate benchmark for subsequent intersection and difference operations.
[0063] S3, through the vtkbool module, calculate and generate the green area to be polished and the red warning area in the acetabulum model bone;
[0064] S4. During the navigation-based acetabulum grinding process, the acetabulum model bone is updated through real-time difference calculation, and the VTK library function is used to dynamically set the model surface color according to the preset template to achieve precise grinding and visual warning.
[0065] In summary, this embodiment uses the VTK library and the vtkbool module to perform surface Boolean operations, and optimizes the coloring method, reducing the dependence on the vtkbool library. Each grinding update only requires calling the vtkbool module once, and then using the native function of the VTK library for coloring judgment, thereby reducing the amount of calculation and improving calculation efficiency.
[0066] Since the number of calls to the vtkbool module is reduced, the probability of calculation failure caused by multiple calls is reduced, and the stability and reliability of the system are improved. In addition, the vtkSelectEnclosedPoints function of the VTK library is used for shading judgment, which increases the robustness of the shading process.
[0067] During the polishing process, only the surface Boolean operation is performed on the acetabulum model data, which is convenient for the background management and recovery of data. When the program crashes abnormally, only the acetabulum model data needs to be saved, and the previous polishing progress can be restored when the program is entered next time.
[0068] Through dynamic coloring technology, the status of the acetabulum model during the grinding process can be displayed in real time, including the area to be ground, the buffer area and the warning area. When the grinding exceeds the planned grinding area, especially when it exceeds the specified buffer distance, the acetabulum model will display red to alert the operator, which helps the operator to accurately judge the grinding progress and avoid over-grinding or under-grinding, thereby improving the grinding accuracy.
[0069] It should be noted that vtkbool is an open source tool library developed based on VTK, focusing on Boolean operations on surface mesh data; vtkbool can perform union operations (Union), intersection operations (Intersection) and difference operations (Difference) on two surface mesh data, thereby meeting complex three-dimensional graphics processing needs; the input and output of vtkbool are both closed spatial geometries, which enables it to maintain data integrity and accuracy when processing three-dimensional models.
[0070] It should be noted that the data types of all surface mesh data used in this embodiment are vtkPolyData; vtkPolyData is a data structure used to represent polygon data in VTK, which can store geometric information such as vertices, edges, and faces, as well as related attribute information such as color and texture. vtkPolyData is an efficient and flexible data type for processing three-dimensional graphics data.
[0071] In some embodiments, step S1 specifically includes:
[0072] S1.1, if Figure 1 As shown, the acetabular cup model is imported into the image coordinates, and the model is recorded as cup. The outermost layer of the cup is hemispherical, and the center of the hemisphere is determined to be the rotation center o of the acetabular cup, and the radius of the hemisphere is a known value r;
[0073] S1.2, such as Figure 2 As shown, with the center o as the center of the circle and the radius r of the hemisphere as the radius, a hemisphere shell surface mesh model is generated. The model is recorded as hemisphere_0, and its bottom surface is flush with the bottom surface of the cup to ensure the correspondence between the two in spatial position.
[0074] S1.3, such as Figure 3 As shown, another hemispherical shell surface mesh model is generated with the sphere center o as the circle center and r+n as the radius, where n is the thickness of the specified buffer area.
[0075] This embodiment provides a basis for grinding area planning and dynamic coloring in subsequent steps by accurately importing the acetabular cup model, generating two hemispherical shell surface mesh models with different radii, and setting a reasonable buffer area.
[0076] In some embodiments, step S2 specifically includes:
[0077] S2.1, such as Figure 4 As shown, the acetabulum model is imported into the image coordinates, and the model is recorded as bone. The previously imported acetabulum cup model cup is moved to a predetermined position on the acetabulum color separation model bone by translation and / or rotation. During the movement, the rigid body transformation matrix T experienced by the cup from the initial position to the planned position in the image coordinate system is recorded and obtained;
[0078] S2.2, such as Figure 5 As shown, the rigid body transformation matrix T is applied to hemisphere_0 and hemisphere_1. By applying this transformation matrix, hemisphere_0 and hemisphere_1 are also moved to the same planned position as cup.
[0079] This embodiment achieves accuracy and consistency in grinding area planning by accurately moving the acetabular cup model to a predetermined position and recording a transformation matrix, and applying the transformation matrix to the hemispherical shell model.
[0080] In some embodiments, in step S3, the to-be-polished area Green and the warning area Red in the acetabulum model bone are calculated and generated by the vtkbool module, including:
[0081] S3.1, if Figure 6 As shown, the vtkbool module is used to perform an intersection operation on bone and hemisphere_0, and the resulting surface mesh data is recorded as Green, indicating the area to be polished;
[0082] S3.2, such as Figure 7 As shown, the vtkbool module is used to perform a difference operation on bone and hemisphere_1, and the obtained surface mesh data is recorded as Red, indicating the warning area.
[0083] This embodiment generates a green area to be polished and a red warning area through Boolean operations and color identification, which provides support for grinding and visualization during the operation.
[0084] In some embodiments, Figure 8 As shown, in step S4, in the navigation-type acetabulum grinding process, the acetabulum model bone is ground using a grinding head model reactor, including:
[0085] S4.1. rigidly attaching an optical tracking array to the grinding instrument and the patient's acetabulum;
[0086] S4.2, transmitting back in real time through the positioning camera the transformation matrix TcameraToToolRF from the positioning camera coordinate system Fcamera to the tool tracking array coordinate system FtoolRF, and the transformation matrix TcameraToBoneRF from Fcamera to the bone tracking array coordinate system FboneRF;
[0087] S4.3, performing an image registration operation, using the above two transformation matrices for image navigation positioning, to ensure that the relative position relationship between the patient's acetabulum and the grinding instrument in the real world is consistent with the relative position relationship between the acetabulum model and the grinding instrument model in the image space;
[0088] S4.4. Move the grinding instrument in the real world, and use the established image navigation positioning relationship to update the positions of the acetabulum model and the grinding instrument model in the image in real time, so that the relative position relationship between the two in the image space is synchronized with the relative position relationship in the real world.
[0089] This embodiment achieves high-precision mapping between the real world and the image space by rigidly fixing the optical tracking array on the grinding instrument and the patient's acetabulum respectively, and using a positioning camera to transmit the coordinate transformation matrix in real time, thereby ensuring that the relative position relationship between the grinding instrument and the acetabulum during the operation is accurately reflected in the image space, thereby improving the accuracy of the operation.
[0090] In some embodiments, in step S4, the updating of the acetabulum model bone by real-time difference calculation includes:
[0091] S4.5, monitor the change of the reamer position, use the vtkbool module to perform a difference operation between the bone and the reamer, and generate new acetabulum model surface mesh data;
[0092] S4.6. Reassign the newly generated surface mesh data to the acetabulum model bone to complete the model update.
[0093] This embodiment updates the acetabulum model by monitoring the changes in the position of the grinding head reactor in real time and directly performing difference operations on the acetabulum model bone and the grinding head, thereby avoiding the tedious process of rebuilding the entire surface mesh data after each grinding, significantly improving the calculation efficiency and reducing the data processing time.
[0094] Compared with the traditional three-dimensional image conversion method, this embodiment directly performs difference operation on the surface mesh data, avoiding the problem of reduced model accuracy due to voxel size limitation, so that the updated acetabulum model maintains high geometric accuracy and surface smoothness.
[0095] In some embodiments, in step S4, dynamically setting the model surface color according to a preset template area using a VTK library function includes:
[0096] S4.7, calling the vtkSelectEnclosedPoints function of the VTK library to traverse each mesh vertex of the updated acetabulum model bone;
[0097] S4.8. For each mesh vertex of the acetabulum model bone, a corresponding color scalar is set according to its spatial position relationship with the area to be polished Green and the warning area Red.
[0098] This embodiment uses the vtkSelectEnclosedPoints function in the VTK library to dynamically set the color of the acetabulum model surface according to the preset template area (Green, Red area), so that the grinding progress and area division during the operation can be intuitively displayed, thereby improving the visualization effect.
[0099] In some embodiments, step S4.8 specifically includes:
[0100] S4.8.1. If a mesh vertex of bone is on or inside the green area to be polished, set the RGB scalar of the point to green [0,1,0];
[0101] S4.8.2. If a mesh vertex of bone is within the warning area Red, set the RGB scalar of the point to red [1,0,0];
[0102] S4.8.3. If a mesh vertex of the bone is not located in the above two areas, set the RGB scalar of the point to white [1,1,1] to achieve dynamic coloring.
[0103] In this embodiment, different color scalars (green [0,1,0], red [1,0,0], white [1,1,1]) are set for the mesh vertices on the surface of the acetabulum model according to their locations (green for the area to be polished, red for the warning area), thereby achieving clear division of the grinding area and improving the visualization effect of the surgery. The doctor can quickly determine the grinding position and depth based on the color changes on the model surface, and adjust the grinding strategy in time to avoid excessive grinding or missing the un-ground area, thereby ensuring the accuracy and safety of the surgery.
[0104] Specifically, Fig. 9 As shown in FIG. 1 , as the acetabulum is polished more deeply, the acetabulum model bone is visualized in the image space.
[0105] According to a second aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the above-mentioned method steps when executed by a processor.
[0106] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method steps when executing the computer program.
[0107] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0108] In the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions and cannot be understood as indicating or suggesting relative importance. It should also be understood that although the terms "first", "second", etc. are used to describe various elements in some embodiments of the present application in the text, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first table can be named as the second table, and similarly, the second table can be named as the first table without departing from the scope of the various described embodiments. The first table and the second table are both tables, but they are not the same table.
[0109] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0110] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A dynamic coloring method for acetabulum grinding, characterized in that: The following steps are involved: S1. Generate two hemisphere shell surface mesh models according to the acetabular cup model cup, which are respectively recorded as hemisphere_0 and hemisphere_1, wherein the radius of hemisphere_0 is the same as the outermost layer of cup, while the radius of hemisphere_1 is larger than that of hemisphere_0 by a specified buffer distance n; S2, moving the acetabular cup model cup to a predetermined position of the acetabulum model bone, obtaining its transformation matrix T, and applying the transformation matrix T to hemisphere_0 and hemisphere_1; S3, through the vtkbool module, calculate and generate the green area to be polished and the red warning area in the acetabulum model bone; S4. During the navigation-based acetabulum grinding process, the acetabulum model bone is ground using the grinding head model reamer, the acetabulum model bone is updated through real-time difference set calculation, and the model surface color is dynamically set according to the preset template area using the VTK library function to achieve precise grinding and visual warning; In step S4, in the navigation-based acetabulum grinding process, the acetabulum model bone is ground using a grinding head model reactor, including: S4.
1. rigidly attaching an optical tracking array to the grinding instrument and the patient's acetabulum; S4.2, transmitting back in real time through the positioning camera the transformation matrix TcameraToToolRF from the positioning camera coordinate system Fcamera to the tool tracking array coordinate system FtoolRF, and the transformation matrix TcameraToBoneRF from Fcamera to the bone tracking array coordinate system FboneRF; S4.3, performing an image registration operation, using the above two transformation matrices for image navigation positioning, to ensure that the relative position relationship between the patient's acetabulum and the grinding instrument in the real world is consistent with the relative position relationship between the acetabulum model and the grinding instrument model in the image space; S4.4, moving the grinding instrument in the real world, and using the established image navigation positioning relationship to update the positions of the acetabulum model and the grinding instrument model in the image in real time, so that the relative position relationship between the two in the image space is synchronized with the relative position relationship in the real world; The updating of the acetabulum model bone by real-time difference calculation includes: S4.5, monitor the change of the reamer position, use the vtkbool module to perform a difference operation between the bone and the reamer, and generate new acetabulum model surface mesh data; S4.6, reassigning the newly generated surface mesh data to the acetabulum model bone to complete the model update; The method of dynamically setting the model surface color according to a preset template area using the VTK library function includes: S4.7, calling the vtkSelectEnclosedPoints function of the VTK library to traverse each mesh vertex of the updated acetabulum model bone; S4.8, for each mesh vertex of the acetabulum model bone, set a corresponding color scalar according to its spatial position relationship with the to-be-polished area Green and the warning area Red; Step S4.8 specifically includes: S4.8.
1. If a mesh vertex of bone is on or inside the area Green to be polished, set the RGB scalar of the point to green [0,1,0]; S4.8.
2. If a mesh vertex of bone is inside the warning area Red, set the RGB scalar of the point to red [1,0,0]; S4.8.
3. If a mesh vertex of the bone is not located in the above two areas, set the RGB scalar of the point to white [1,1,1] to achieve dynamic coloring.
2. A dynamic coloring method for acetabulum grinding according to claim 1, characterized in that: Step S1 specifically includes: S1.
1. Import the acetabular cup model in the image coordinates, and record the model as cup. The outermost layer of the cup is hemispherical. The center of the hemisphere is determined to be the rotation center o of the acetabular cup, and the radius of the hemisphere is a known value r. S1.
2. With the center o of the sphere as the center of the circle and the radius r of the hemisphere as the radius, a hemisphere shell surface mesh model is generated. The model is recorded as hemisphere_0, and its bottom surface is flush with the bottom surface of the cup to ensure the correspondence between the two in spatial position; S1.
3. Similarly, generate another hemispherical shell surface mesh model with the sphere center o as the circle center and r+n as the radius, where n is the thickness of the specified buffer area.
3. A dynamic coloring method for acetabulum grinding according to claim 1, characterized in that: Step S2 specifically includes: S2.1, importing the acetabulum model in the image coordinates, recording the model as bone, moving the previously imported acetabulum cup model cup to a predetermined position on the acetabulum color separation model bone by translation and / or rotation, and during the movement, recording and obtaining the rigid body transformation matrix T of cup from the initial position to the planned position in the image coordinate system; S2.
2. Apply the rigid body transformation matrix T to hemisphere_0 and hemisphere_1. By applying this transformation matrix, hemisphere_0 and hemisphere_1 are also moved to the same planned position as cup.
4. A dynamic coloring method for acetabulum grinding according to claim 1, characterized in that: In step S3, the to-be-polished area Green and the warning area Red in the acetabulum model bone are calculated and generated through the vtkbool module, including: S3.
1. Use the vtkbool module to perform an intersection operation on bone and hemisphere_0. The resulting surface mesh data is recorded as Green, indicating the area to be polished. S3.
2. Use the vtkbool module to perform a difference operation on bone and hemisphere_1. The resulting surface mesh data is recorded as Red, indicating the warning area.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the method steps of any one of claims 1 to 4 when executed by a processor.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method steps of any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Visualization method for acetabulum grinding and storage medium
CN118986516A
A visualization method and storage medium for acetabulum grinding
CN118986516B
