A visualization method and system for acetabulum grinding based on surface Boolean operation

The combination of surface Boolean operation and VTK rendering pipelines through the MeshLib library solves the problem of reduced model accuracy and low computing efficiency in acetabular grinding visualization, and realizes efficient visualization of acetabular grinding process and navigation interface display, improving surgery real-time and success rate.

CN118615017BActive Publication Date: 2024-11-12LANCET ROBOTICS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411099902.5
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

Smart Images

  • Figure CN118615017B_ABST
    Figure CN118615017B_ABST
Patent Text Reader

Abstract

The present invention proposes a acetabulum grinding visualization method based on surface Boolean operation. The method first uses the MeshLib library to import various types of data, including the acetabulum, grinding area boundary, acetabular cup, buffer zone and grinding head model; through the MeshLib Boolean operation, the to-be-grinded, buffer, warning and thin shell areas of the acetabulum are determined; then, the Boolean operation results are converted into a graphic data format supported by VTK, and the VTK rendering pipeline is used to render different areas; the grinding head position information is received in real time, the acetabulum model status is updated, and the VTK rendering display is synchronized; the present invention improves the computational efficiency and success rate of the grinding process, while increasing the bone area displayed in the grinding navigation interface, thereby improving the doctor's user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical imaging technology, and in particular to a acetabulum grinding visualization method and system based on surface Boolean operation. 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 solution based on VTK (Visualization Toolkit) is adopted, the display effect is significantly improved by directly performing difference operations on the acetabular surface model and the grinding tool model for visualization. However, in the specific implementation, the existing graphics rendering architecture VTK, although powerful and widely used in fields such as medical image processing, does not directly support highly robust surface mesh Boolean operations. Even if the Boolean operation function of VTK is enhanced through third-party extensions such as the vtkbool module, its operation speed and success rate are still difficult to meet the actual needs of high-frequency cutting simulation. At the same time, although many commercial closed-source libraries provide efficient surface mesh Boolean operation capabilities, they are often incompatible with open source graphics rendering architectures such as VTK and are difficult to integrate into existing medical navigation systems.

[0008] In addition, visualization of acetabular grinding is usually limited to the acetabular fossa and its surrounding area, while clinicians often want to observe a wider range of pelvic structures during actual surgery in order to better understand the relative position of the instrument and the patient and make more accurate operational decisions. However, increasing the display area means a significant increase in the amount of calculation, which can easily lead to navigation display delays and affect surgical efficiency. Summary of the invention

[0009] The purpose of the present invention is to provide a method and system for visualizing acetabular grinding based on surface Boolean operations in view of the problems existing in the prior art. The method significantly improves the computational efficiency of the grinding process and the success rate of the operation; while ensuring that the grinding calculation speed is not affected, the bone area displayed on the grinding navigation interface is increased, thereby improving the user experience of doctors.

[0010] To achieve the above object, the technical solution adopted by the present invention is:

[0011] A visualization method for acetabulum grinding based on surface Boolean operation, comprising:

[0012] Use the MeshLib library to import MRMesh type data, including the acetabular model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh;

[0013] Through MeshLib Boolean operation, the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh and the thin shell area shell_mesh of the acetabulum model pelvis_mesh are determined;

[0014] Convert the Boolean operation results into a graphics data format supported by VTK, and use VTK's rendering pipeline to render different areas;

[0015] Receive grinding head position information in real time, use MeshLib Boolean operations to update the acetabulum model status, and synchronously update the VTK rendering display.

[0016] The MeshLib library is used to import MRMesh type data, which are acetabular model pelvis_mesh, grinding area boundary model roi_mesh, acetabular cup model cup_mesh, buffer model cupPlus_mesh and grinding head model reamer_mesh; including:

[0017] Import the acetabulum model data, represented as pelvis_mesh in MRMesh format;

[0018] Import the grinding area boundary model data, expressed as roi_mesh in MRMesh format;

[0019] Import the acetabular cup model data, express it as cup_mesh in MRMesh format, and determine its relative position relationship with pelvis_mesh;

[0020] Import the buffer model data that coincides with the bottom surface of the acetabular cup model and the center of the sphere and has an increased radius, expressed in MRMesh format as cupPlus_mesh, where the increased radius is the specified buffer area thickness;

[0021] Import the grinding head model data, represented as reamer_mesh in MRMesh format, for initialization of grinding calculation.

[0022] The method of determining the to-be-polished area, the buffer area, the warning area and the thin shell area of ​​the acetabulum reconstruction model by Boolean operation includes:

[0023] Using the Boolean operation function of MeshLib, calculate the intersection bone_mesh of pelvis_mesh and roi_mesh to represent the grinding calculation area, and calculate the difference around_mesh of pelvis_mesh and roi_mesh to represent the auxiliary display area;

[0024] Calculate the intersection green_mesh of bone_mesh and cup_mesh, which represents the area to be polished;

[0025] Calculate the intersection of bone_mesh and cupPlus_mesh, and then perform a difference operation with cup_mesh to obtain buffer_mesh, which represents the buffer area;

[0026] Calculate the part of bone_mesh that falls outside cupPlus_mesh to get red_mesh, which represents the warning area;

[0027] Calculate the part of bone_mesh that falls outside cupPlus_mesh and is not closed, and get shell_mesh, which represents the thin shell area and is used to display above the red warning area.

[0028] The step of converting the Boolean operation result into a graphic data format supported by VTK includes:

[0029] Get the vertex coordinate array from MRMesh and create the corresponding vtkPoints object;

[0030] Get the triangular mesh information from MRMesh and generate a vtkCellArray object representing the triangular mesh;

[0031] Combine the vertex coordinates and triangle mesh information to construct a vtkPolyData object and complete the data format conversion.

[0032] The step of converting the Boolean operation result into a graphic data format supported by VTK includes:

[0033] Convert the MRMesh type data around_mesh, green_mesh, buffer_mesh, red_mesh, and shell_mesh generated by the MeshLib library into the vtkPolyData type supported by VTK, recorded as around_poly, green_poly, buffer_poly, red_poly, and shell_poly respectively.

[0034] The rendering pipeline using VTK is used to render different areas, including:

[0035] Using VTK's rendering pipeline, create corresponding vtkActor for data vtkPolyData in different areas, and set the green_poly color to green, the around_poly, buffer_mesh and shell_poly colors to white, and the red_poly color to red;

[0036] All color areas are rendered simultaneously in the same vtkRenderer to form a complete visualization of the acetabulum polishing.

[0037] The real-time receiving of grinding head position information, updating the acetabulum model state using MeshLib Boolean operations, and synchronously updating the VTK rendering display include:

[0038] Read the grinding head model and generate vtkPolyData data reamer_poly for visualization and MRMesh data reamer_mesh for grinding calculation;

[0039] Obtain the position data of the grinding head relative to the pelvis provided by the navigation system in real time, and update the positions of reamer_poly and reamer_mesh;

[0040] Using the Boolean operation function of MeshLib, cut green_mesh, buffer_mesh, red_mesh and shell_mesh according to the updated reamer_mesh;

[0041] The cut MRMesh data is converted into vtkPolyData format again, and the display in the VTK rendering pipeline is updated to achieve real-time visualization of the grinding process.

[0042] A visualization system for acetabular grinding based on MeshLib surface Boolean operations, including:

[0043] The data import module uses the MeshLib library to import MRMesh type data, including the acetabular model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh;

[0044] The Boolean operation processing module determines the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh and the thin shell area shell_mesh of the acetabulum model pelvis_mesh through MeshLib Boolean operation;

[0045] Data format conversion module, which converts Boolean operation results into graphic data formats supported by VTK;

[0046] The visualization rendering module uses VTK's rendering pipeline to create corresponding vtkActor for data in different areas and set the corresponding colors;

[0047] The real-time update module receives the grinding head position information in real time, uses MeshLib Boolean operations to update the acetabulum model status, and synchronously updates the VTK rendering display.

[0048] A computer-readable storage medium stores a computer program, wherein the computer program implements the above method steps when executed by a processor.

[0049] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the above method steps are implemented when the processor executes the computer program.

[0050] Compared with the prior art, the present invention has the following beneficial effects:

[0051] The present invention innovatively combines the MeshLib library to perform surface mesh Boolean operations in the VTK display architecture. Compared with the traditional method, it avoids the complex process of converting surface mesh data into voxel data and then performing operations, reducing the time consumption and precision loss of data format conversion; by directly performing efficient surface mesh Boolean operations in MeshLib, the calculation efficiency of the grinding process is significantly improved, while the speed of grinding calculation is increased, the waiting time during the operation is reduced, and the success rate of the operation is improved;

[0052] Under the premise of ensuring that the grinding calculation speed is not affected, the present invention increases the bone area (around_poly part) displayed in the grinding navigation interface by optimizing the data partitioning and visualization strategy. This improvement enables the doctor to more comprehensively observe the pelvic structure and its relative position relationship with the grinding tool during the operation, thereby improving the doctor's user experience, reducing surgical risks, and increasing the success rate of the operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] 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.

[0054] Figure 1 This is a schematic diagram of a complete pelvic bone model on the surgical side in one embodiment of the present application;

[0055] Figure 2 This is a schematic diagram of a grinding area boundary model in one embodiment of the present application;

[0056] Figure 3 This is a schematic diagram of an acetabular cup model in one embodiment of the present application;

[0057] Figure 4 This is a schematic diagram of a buffer zone model in an embodiment of the present application;

[0058] Figure 5 This is a schematic diagram of a grinding head model in one embodiment of the present application;

[0059] Figure 6 This is a visualization diagram of the grinding head model partition in one embodiment of the present application;

[0060] Figure 7 This is a schematic diagram of the process of grinding, calculating and updating the bone model in one embodiment of the present application. DETAILED DESCRIPTION

[0061] 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.

[0062] In a first aspect of the present application, a method for visualizing acetabulum grinding based on surface Boolean operations is provided, comprising the following steps:

[0063] S1. Use MeshLib library to import MRMesh type data, including acetabular model pelvis_mesh, grinding area boundary model roi_mesh, acetabular cup model cup_mesh, buffer model cupPlus_mesh and grinding head model reamer_mesh;

[0064] S2, determining the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh and the thin shell area shell_mesh of the acetabulum model pelvis_mesh through MeshLib Boolean operation;

[0065] S3, converting the Boolean operation results into a graphics data format supported by VTK, and rendering different areas using the VTK rendering pipeline;

[0066] S4. Receive the grinding head position information in real time, use MeshLib Boolean operations to update the acetabulum model status, and synchronously update the VTK rendering display.

[0067] In this embodiment, efficient surface mesh Boolean operations are performed through the MeshLib library to directly perform cutting simulation on the acetabulum surface model and the grinding tool model, thereby avoiding the problems of reduced model accuracy and time-consuming data format conversion, and improving the calculation success rate and speed.

[0068] In the VTK display architecture, the Boolean operation results of MeshLib are used to convert the MRMesh type data into the vtkPolyData type supported by VTK through data format conversion, and combined with VTK for rendering and display, which ensures the authenticity and real-time nature of the visualization effect. At the same time, the doctor's user experience is improved through partitioned display.

[0069] The grinding head position information is received in real time, the acetabulum model status is updated using MeshLib Boolean operations, and the VTK rendering display is updated synchronously, allowing doctors to observe changes during the operation in real time, thereby improving the safety and accuracy of the operation.

[0070] It should be noted that the tool library mainly used in this embodiment is VTK, which is an open source, cross-platform graphics library for scientific visualization and graphics processing; it provides rich functions and tools for creating, rendering and processing 2D and 3D graphics data, such as volume data, meshes, curves, etc. VTK is usually used in the fields of medical image processing, computational fluid dynamics, earth science, computer-aided design, etc. VTK supports common mesh data file formats, such as .stl and .ply, and the data type of mesh data in VTK is vtkPolyData.

[0071] It should be noted that another open source tool library used in this embodiment is MeshLib, which is an open source library for processing and operating three-dimensional mesh data structures; it provides tools such as mesh data identification, transformation, simplification, subdivision and Boolean operations, and supports common mesh data file formats such as .stl and .ply. The data type of mesh data in MeshLib is MRMesh.

[0072] In some embodiments, the importing of the acetabular reconstruction model pelvis_mesh, the grinding region boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh comprises:

[0073] S1.1, if Figure 1 As shown, the acetabulum model data is imported and represented as pelvis_mesh in MRMesh format; the acetabulum model provides complete pelvic structure information, increases the bone area displayed in the grinding navigation interface, and improves the doctor's experience;

[0074] S1.2, such as Figure 2 As shown, the grinding area boundary model data is imported and expressed as roi_mesh in MRMesh format. It defines the geometric boundary that may actually be ground during surgery. It can be a simple sphere, cube or other simple closed geometric body, which is used to distinguish the area that needs grinding calculation (inside roi) and the area that is only used for auxiliary display (outside roi). By limiting the grinding calculation area, the calculation speed can be significantly improved, while reducing unnecessary calculation amount;

[0075] S1.3, if Figure 3As shown, the acetabular cup model data is imported and represented as cup_mesh in MRMesh format, and its relative position relationship with pelvis_mesh is determined. As a reference for preoperative planning, the target position and shape of acetabular grinding are defined, and the relative position relationship between cup and pelvis is adjusted to meet the needs of surgical planning;

[0076] S1.4, such as Figure 4 As shown, the buffer model data with an increased radius and coincident with the bottom surface and center of the acetabular cup model is imported and represented as cupPlus_mesh in MRMesh format, where the increased radius is the specified buffer area thickness. Specifically, the buffer model is a hemispherical shell model with a radius of (r+n) that coincides with the bottom surface and center of the acetabular cup model, where n is the thickness of the white buffer area specified by the user, providing a safety boundary for acetabular grinding. When the grinding head exceeds the planned grinding area but is still within the buffer area, the color changes to remind the doctor to prevent over-grinding;

[0077] S1.5, if Figure 5 As shown, the grinding head model data is imported and represented as reamer_mesh in MRMesh format for initialization of grinding calculation. During the grinding calculation, the real-time position information of the grinding head is used to update the state of the acetabulum model to achieve visualization synchronization.

[0078] In this embodiment, these data are stored in .stl or .ply file formats, processed by the MeshLib library, and converted into MRMesh type data for subsequent Boolean operations and visual display.

[0079] In some embodiments, the method of determining the to-be-polished area, the buffer area, the warning area, and the thin shell area of ​​the acetabulum reconstruction model by Boolean operation includes:

[0080] S2.1. Using the Boolean operation function of MeshLib, calculate the intersection bone_mesh of pelvis_mesh and roi_mesh to represent the grinding calculation area, and calculate the difference around_mesh of pelvis_mesh and roi_mesh to represent the auxiliary display area;

[0081] Specifically, the MR::BooleanOperation::Intersection method of MeshLib is used to calculate the intersection of the acetabulum model pelvis_mesh and the grinding area boundary model roi_mesh. The result bone_mesh is the grinding calculation area, which is the part that needs to perform actual grinding operations.

[0082] Also use the MR::BooleanOperation::DifferenceAB method of MeshLib to calculate the difference between the acetabulum model pelvis_mesh and the grinding area boundary model roi_mesh. The result around_mesh is the auxiliary display area, which is displayed in the navigation view but does not participate in the grinding calculation, in order to improve the calculation efficiency and reduce the system burden;

[0083] S2.2. Calculate the intersection green_mesh of bone_mesh and cup_mesh, which represents the area to be polished.

[0084] Specifically, the MR::BooleanOperation::Intersection method of MeshLib is used to calculate the intersection of the grinding calculation area bone_mesh and the acetabular cup model cup_mesh. The result green_mesh is the area to be ground. In the navigation view, the area is marked in green, which is convenient for doctors to intuitively understand the specific location that needs to be ground.

[0085] S2.3. Calculate the intersection of bone_mesh and cupPlus_mesh, and then perform a difference operation with cup_mesh to obtain buffer_mesh, which represents the buffer area.

[0086] Specifically, the intersection of the grinding calculation area bone_mesh and the buffer model cupPlus_mesh is calculated first, and the result is temporarily saved; then the MR::BooleanOperation::DifferenceAB method is used to perform a difference operation between the intersection obtained in the previous step and the acetabular cup model cup_mesh, and the result buffer_mesh is the buffer area, which is used to provide a safety boundary during the grinding process. When the grinding head approaches but has not exceeded the planned area, the doctor is reminded of the color change;

[0087] S2.4. Calculate the part of bone_mesh that falls outside cupPlus_mesh and obtain red_mesh, which indicates the warning area.

[0088] Specifically, the MR::BooleanOperation::DifferenceAB method is used to calculate the difference between the grinding calculation area bone_mesh and the buffer model cupPlus_mesh. The result red_mesh is the warning area. During the grinding process, once the grinding head exceeds the planned area and enters this area, the doctor will be warned to prevent over-grinding.

[0089] S2.5. Calculate the part of bone_mesh that falls outside cupPlus_mesh and is not closed, and obtain shell_mesh, which represents the thin shell area and is used to display above the red warning area.

[0090] Specifically, the MR::BooleanOperation::OutsideA method of MeshLib is used to calculate the part of the grinding calculation area bone_mesh that is outside the buffer model cupPlus_mesh and is not closed. The resulting shell_mesh is the thin shell area, which is located above the red warning area and serves as the warning boundary in the navigation view.

[0091] Through the above steps, this embodiment can accurately divide the key areas of the acetabulum reconstruction model and intuitively display them in different colors in the navigation view, thereby assisting doctors in performing precise grinding operations.

[0092] In some embodiments, converting the Boolean operation result into a graphics data format supported by VTK includes:

[0093] S3.1. Get the vertex coordinate array from MRMesh and create the corresponding vtkPoints object.

[0094] Specifically, use the points.vec_() method of MRMesh to obtain the coordinates of all vertices and store them in a floating-point array P1, which contains the coordinate values ​​of each vertex of the mesh data, arranged in the order of x0, y0, z0, x1, y1, z1, x2, y2, z2...; create a new vtkPoints object P2, traverse P1, and add the coordinates of each vertex to P2;

[0095] S3.2. Get the triangular mesh connection information from MRMesh and generate a vtkCellArray object representing the triangular mesh.

[0096] Specifically, use the topology.getAllTriVerts() method of MRMesh to obtain the vertex index of each triangular mesh and store it in the integer array P3; for example, P3 is 3, 1, 4, 0, 5, 2, which means that the MRMesh mesh data contains two triangular meshes. The first triangular mesh is composed of vertices 3, 1, and 4, and the second triangular mesh is composed of vertices 0, 5, and 2.

[0097] Create a new vtkCellArray object P4, traverse P3, create a vtkTriangle for every three elements, and add it to P4. The MRMesh object contains the connection information of the triangle mesh, that is, which vertices each triangle mesh is composed of. Traverse this information to obtain the vertices of each triangle mesh. Every three vertices constitute a triangle mesh; for each vertex of the triangle mesh, create a vtkTriangle object (a class used to represent a triangle mesh in VTK); add all vtkTriangle objects to the vtkCellArray object to build a connection structure of the triangle mesh;

[0098] S3.3. Combine the vertex coordinates and the triangle mesh connection information to construct a vtkPolyData object and complete the data format conversion.

[0099] Specifically, create a new vtkPolyData object, use the SetPoints() method to set P2 as the vertex of the object, and use the SetPolys() method to set P4 as the surface triangle of the object. The vtkPolyData is the VTK data type result converted from MRMesh.

[0100] In some embodiments, converting the Boolean operation result into a graphics data format supported by VTK includes:

[0101] S3.4. Convert the MRMesh type data around_mesh, green_mesh, buffer_mesh, red_mesh, and shell_mesh generated by the MeshLib library into the vtkPolyData type supported by VTK, denoted as around_poly, green_poly, buffer_poly, red_poly, and shell_poly respectively.

[0102] In some embodiments, Figure 6 As shown, the rendering pipeline using VTK is used to render different areas, including:

[0103] S3.5. Use VTK's rendering pipeline to create corresponding vtkActor for data vtkPolyData in different areas, set the green_poly color to green, the around_poly, buffer_mesh and shell_poly colors to white, and the red_poly color to red; render all color areas at the same time in the same vtkRenderer to form a complete visualization effect of acetabulum polishing.

[0104] Specifically, use the property setting function of vtkActor to specify different colors for each vtkActor; create one or more vtkRenderer objects as rendering containers. In VTK, vtkRenderer is responsible for managing and controlling the rendering process; add all vtkActors with set colors to vtkRenderer, and VTK renders according to the order and settings of vtkActor in vtkRenderer.

[0105] In some embodiments, the real-time receiving of grinding head position information, updating the acetabulum model state using MeshLib Boolean operations, and synchronously updating the VTK rendering display include:

[0106] S4.1, read the grinding head model file (such as .stl or .ply format) from the storage medium, and use MeshLib and VTK libraries to generate vtkPolyData data reamer_poly for visualization and MRMesh data reamer_mesh for grinding calculation respectively;

[0107] S4.2. Obtain the position data of the grinding head relative to the pelvis provided by the navigation system in real time, and update the positions of reamer_poly and reamer_mesh.

[0108] Specifically, the grinding head data pose is updated synchronously, including converting the pose data (4x4 affine matrix) of the grinding head relative to the pelvis provided by the navigation system into vtkMatrix4x4 and MR::AffineXf3f formats respectively, and using the transform() method of vtkTransform and MRMesh to update the pose of reamer_poly and reamer_mesh, and at the same time updating the vtkActor corresponding to reamer_poly to reflect the movement of the grinding head in the image space;

[0109] S4.3. Using the Boolean operation function of MeshLib, cut green_mesh, buffer_mesh, red_mesh and shell_mesh according to the updated reamer_mesh.

[0110] Specifically, the bone model is ground and calculated and updated. The MR::BooleanOperation::DifferenceAB method of MeshLib is used to cut green_mesh, buffer_mesh, and red_mesh according to the moved reamer_mesh, and the cutting results are saved in the original MRMesh data. The MR::BooleanOperation::OutsideA method of MeshLib is used to cut shell_mesh according to the moved reamer_mesh, and the cutting results are retained in the original shell_mesh data.

[0111] It should be noted that the difference between MR::BooleanOperation:: DifferenceAB and MR::BooleanOperation:: OutsideA is that the former produces a closed shape, while the latter produces an unclosed shape (retaining the holes after cutting to expose the red part);

[0112] S4.4, such as Figure 7 As shown, the cut MRMesh data is converted into vtkPolyData format again, and the display in the VTK rendering pipeline is updated to achieve real-time visualization of the grinding process.

[0113] Specifically, the MeshLib MRMesh data (green_mesh, buffer_mesh, red_mesh and shell_mesh) after Boolean operation are converted into VTK's vtkPolyData format again; in the VTK rendering pipeline, the old vtkPolyData data is replaced with the updated vtkPolyData data, and the color of the vtkActor is reset; the rendering method of the VTK renderer is called to update the display on the screen to reflect the changes in the state of the acetabulum model during the grinding process in real time.

[0114] A second aspect of the present application provides an acetabulum grinding visualization system based on MeshLib surface Boolean operations, comprising:

[0115] The data import module uses the MeshLib library to import MRMesh type data, including the acetabular model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh;

[0116] The Boolean operation processing module determines the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh and the thin shell area shell_mesh of the acetabulum model pelvis_mesh through MeshLib Boolean operation;

[0117] Data format conversion module, which converts Boolean operation results into graphic data formats supported by VTK;

[0118] The visualization rendering module uses VTK's rendering pipeline to create corresponding vtkActor for data in different areas and set the corresponding colors;

[0119] The real-time update module receives the grinding head position information in real time, uses MeshLib Boolean operations to update the acetabulum model status, and synchronously updates the VTK rendering display.

[0120] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program implements the above-mentioned method steps when executed by a processor.

[0121] According to a fourth 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.

[0122] 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.

[0123] 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.

[0124] 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.

[0125] 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 visualization method for acetabulum polishing based on surface Boolean operations, characterized in that: include: Use the MeshLib library to import MRMesh type data, including the acetabular model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh, and the grinding head model reamer_mesh; The to-be-polished area green_mesh, buffer area buffer_mesh, warning area red_mesh, and thin shell area shell_mesh of the acetabulum model pelvis_mesh are determined through MeshLib Boolean operations; Convert the Boolean operation results into a graphics data format supported by VTK, and use VTK's rendering pipeline to render different areas; Receive grinding head position information in real time, use MeshLib Boolean operations to update the acetabulum model status, and synchronously update the VTK rendering display.

2. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The MeshLib library is used to import MRMesh type data, including the acetabulum model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabulum cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh; including: Import the acetabulum model data and represent it in MRMesh format as pelvis_mesh; Import the grinding area boundary model data and express it as roi_mesh in MRMesh format; Import the acetabular cup model data, express it in MRMesh format as cup_mesh, and determine its relative position relationship with pelvis_mesh; Import the buffer model data that coincides with the bottom surface of the acetabular cup model and the center of the sphere and has an increased radius, and express it in MRMesh format as cupPlus_mesh, where the increased radius is the specified buffer area thickness; Import the grinding head model data, represented as reamer_mesh in MRMesh format, for initializing the grinding calculation.

3. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The method of determining the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh, and the thin shell area shell_mesh of the acetabulum model pelvis_mesh by using MeshLib Boolean operations includes: Using the Boolean operation function of MeshLib, the intersection bone_mesh of pelvis_mesh and roi_mesh is calculated to represent the grinding calculation area, and the difference around_mesh of pelvis_mesh and roi_mesh is calculated to represent the auxiliary display area; Calculate the intersection green_mesh of bone_mesh and cup_mesh, which represents the area to be polished; Calculate the intersection of bone_mesh and cupPlus_mesh, and then perform a set difference operation with cup_mesh to obtain buffer_mesh, which represents the buffer area; Calculate the part of bone_mesh that falls outside cupPlus_mesh and get red_mesh, which represents the warning area; Calculate the part of bone_mesh that falls outside cupPlus_mesh and is not closed, and get shell_mesh, which represents the thin shell area and is used to display above the red warning area.

4. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The conversion of the Boolean operation result into a graphics data format supported by VTK includes: Get the vertex coordinate array from MRMesh and create the corresponding vtkPoints object; Get the triangular mesh information from MRMesh and generate a vtkCellArray object representing the triangular mesh; Combine the vertex coordinates and triangle mesh information to construct a vtkPolyData object and complete the data format conversion.

5. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The conversion of the Boolean operation result into a graphics data format supported by VTK includes: Convert the MRMesh type data around_mesh, green_mesh, buffer_mesh, red_mesh, and shell_mesh generated by the MeshLib library into the vtkPolyData type supported by VTK, and record them as around_poly, green_poly, buffer_poly, red_poly, and shell_poly respectively.

6. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The rendering pipeline using VTK is used to render different areas, including: Using VTK's rendering pipeline, create corresponding vtkActor for the data vtkPolyData in different areas, and set the green_poly color to green, the around_poly, buffer_mesh and shell_poly colors to white, and the red_poly color to red; All color areas are rendered simultaneously in the same vtkRenderer to form a complete visualization of the acetabulum polishing.

7. The acetabulum polishing visualization method based on surface Boolean operation according to claim 1, characterized in that: The real-time receiving of grinding head position information, updating the acetabulum model state using MeshLib Boolean operations, and synchronously updating the VTK rendering display include: Read the grinding head model and generate vtkPolyData data realer_poly for visualization and MRMesh data realer_mesh for grinding calculation; Obtain the position data of the grinding head relative to the pelvis provided by the navigation system in real time, and update the positions of the reamer_poly and reamer_mesh; Using the Boolean operation function of MeshLib, cut green_mesh, buffer_mesh, red_mesh and shell_mesh according to the updated reamer_mesh; The cut MRMesh data is converted into vtkPolyData format again, and the display in the VTK rendering pipeline is updated to achieve real-time visualization of the grinding process.

8. A system for executing the method according to any one of claims 1 to 7, characterized in that: include: The data import module uses the MeshLib library to import MRMesh type data, including the acetabular model pelvis_mesh, the grinding area boundary model roi_mesh, the acetabular cup model cup_mesh, the buffer model cupPlus_mesh and the grinding head model reamer_mesh; The Boolean operation processing module determines the to-be-polished area green_mesh, the buffer area buffer_mesh, the warning area red_mesh, and the thin shell area shell_mesh of the acetabulum model pelvis_mesh through MeshLib Boolean operation; Data format conversion module, which converts Boolean operation results into graphic data formats supported by VTK; The visualization rendering module uses VTK's rendering pipeline to create corresponding vtkActor for data in different areas and set the corresponding colors; The real-time update module receives the grinding head position information in real time, uses MeshLib Boolean operations to update the acetabulum model status, and synchronously updates the VTK rendering display.

9. 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 according to any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method steps according to any one of claims 1 to 7 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