Display method of prosthesis model in X-ray image, electronic equipment and storage medium

By seizing the specified cross section of the three-dimensional CT image in the X-ray image, generating and displaying the corresponding two-dimensional image, the problem of unclear display of the prosthesis model in the prior art is solved, and the hip prosthesis planning is improved accuracy.

CN119446442AActive Publication Date: 2025-02-14ZHEJIANG LANCET ROBOT CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411550279.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-14
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

The prior art is difficult to accurately display the hip prosthesis model in X-ray images, making it difficult for doctors to judge the location of the prosthesis model, reducing the accuracy of hip prosthesis planning.

Method used

By obtaining the three-dimensional CT images of the prosthesis model and the target object, a three-dimensional image surrounding the prosthesis model is generated, and the image is captured in the specified cross section according to the selection instructions to obtain a two-dimensional image. Both images are displayed simultaneously to show the prosthesis model as a solid graph in a two-dimensional X-ray image.

Benefits of technology

It realizes the display of the prosthesis model as a solid figure in two-dimensional X-ray images, which facilitates users to accurately judge the position of the prosthesis model, thereby improving the accuracy of hip prosthesis planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446442A_ABST
    Figure CN119446442A_ABST
Patent Text Reader

Abstract

The invention discloses a display method of a prosthesis model in an X-ray image, electronic equipment and a storage medium. The method comprises the steps that the prosthesis model and a three-dimensional CT image are acquired; generating a first image surrounding the prosthesis model according to the coordinates of all vertexes of the prosthesis model; receiving a selection instruction, intercepting the first image on the specified section according to the selection instruction to obtain a second image, and intercepting the three-dimensional CT image on the specified section to obtain a third image; and simultaneously displaying the second image and the third image so as to display the prosthesis model in the two-dimensional X-ray image. According to the application, the first image is intercepted on the specified section according to the selection instruction to obtain the second image, the three-dimensional CT image is intercepted on the specified section to obtain the third image, and then the second image and the third image are displayed at the same time, so that the prosthesis model can be displayed as a solid graph in the two-dimensional X-ray image; the position of the prosthesis model can be accurately judged by the user according to the second image and the third image, so that the accuracy of hip joint prosthesis planning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a display method, electronic equipment and storage medium for a prosthesis model in an X-ray image. Background Art

[0002] In hip reconstruction surgery, it is crucial to ensure that the hip offset and hip length on the operated and non-operated sides are equal. Therefore, doctors need to perform preoperative hip prosthesis planning in order to ensure that patients recover hip function after surgery and reduce complications.

[0003] At present, in the preoperative hip prosthesis planning stage, doctors usually simulate the placement of the prosthesis model in the patient's CT image as a reference for the prosthesis installation during the operation. Doctors often use CT (Computed Tomography), DRR (Digitally Reconstructed Radiograph) and other medical images for auxiliary planning.

[0004] However, the current preoperative hip prosthesis planning method generally cannot well present the hip prosthesis model after hip prosthesis planning in X-ray images. This is because the prosthesis model is generally a hollow shell structure composed of multiple facets. If the prosthesis model is directly intercepted, the prosthesis model will be displayed as a hollow closed figure in the X-ray image, which often makes it difficult for doctors to accurately determine the position of the prosthesis model, thereby reducing the accuracy of hip prosthesis planning. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present application provides a method, electronic device and storage medium for displaying a prosthesis model in an X-ray image. The present application obtains a second image by intercepting a first image at a specified section according to a selection instruction, and obtains a third image by intercepting a three-dimensional CT image at a specified section, and then displays the second image and the third image simultaneously. The prosthesis model can be displayed as a solid graphic in a two-dimensional X-ray image, which is convenient for the user to accurately determine the position of the prosthesis model according to the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0006] To solve the above problems, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for displaying a prosthesis model in an X-ray image, comprising:

[0008] Acquire three-dimensional CT images of the prosthesis model and the target object;

[0009] generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model, wherein the prosthesis model is composed of a plurality of vertices and the first image is a three-dimensional image;

[0010] receiving a selection instruction, intercepting the first image at a specified section according to the selection instruction to obtain a second image, and intercepting the three-dimensional CT image at the specified section to obtain a third image, wherein both the second image and the third image are two-dimensional images;

[0011] The second image and the third image are displayed simultaneously, thereby displaying the prosthesis model in a two-dimensional X-ray image.

[0012] In some embodiments, generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model includes:

[0013] Determining a surrounding space unit surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model;

[0014] Generating a plurality of voxels that fill the enclosing space unit based on a preset voxel side length;

[0015] The grayscale values ​​of all voxels of the enclosing space unit are set based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit to obtain the first image.

[0016] In some embodiments, the step of setting the grayscale values ​​of all voxels of the enclosing space unit based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit to obtain the first image includes:

[0017] Determine all target voxels located inside the prosthesis model in the enclosing space unit based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit;

[0018] The grayscale values ​​of all the target voxels are set to the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all voxels in the surrounding space unit except the target voxels are set to the background grayscale values, so as to obtain the first image.

[0019] In some implementations, the simultaneously displaying the second image and the third image includes:

[0020] Setting the colors of all pixels representing the prosthesis model in the second image to the colors corresponding to the prosthesis model to obtain an updated second image;

[0021] The updated second image and the third image are displayed simultaneously.

[0022] In some implementations, the grayscale values ​​of all pixels representing the prosthesis model in the second image are grayscale values ​​corresponding to the prosthesis model, and setting the colors of all pixels representing the prosthesis model in the second image to the colors corresponding to the prosthesis model to obtain the updated second image includes:

[0023] Acquiring color mapping relationship information of the prosthesis model;

[0024] According to the color mapping relationship information, the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model are set to corresponding colors to obtain an updated second image.

[0025] In some embodiments, setting the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to corresponding colors according to the color mapping relationship information to obtain the updated second image includes:

[0026] According to the color mapping relationship information, the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model are set to corresponding colors;

[0027] All pixels in the second image whose grayscale values ​​are the background grayscale values ​​are set to be transparent according to the color mapping relationship information, so as to obtain an updated second image.

[0028] In some embodiments, the prosthesis model includes a plurality of sub-prosthesis models, the plurality of sub-prosthesis models correspond to different grayscale values, and setting the colors of all pixels in the second image whose grayscale values ​​are the grayscale values ​​corresponding to the prosthesis model to corresponding colors according to the color mapping relationship information to obtain the updated second image includes:

[0029] For each of the sub-prosthesis models, the colors of all pixels having grayscale values ​​corresponding to the sub-prosthesis model in the second image corresponding to the sub-prosthesis model are set to the color corresponding to the sub-prosthesis model according to the color mapping relationship information to obtain an updated second image.

[0030] In some implementations, the simultaneously displaying the second image and the third image includes:

[0031] The layer where the second image is located is placed above the layer where the third image is located, and the second image and the third image are displayed simultaneously.

[0032] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0033] at least one processor; and,

[0034] a memory communicatively connected to the at least one processor; wherein,

[0035] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for displaying a prosthesis model in an X-ray image as described in the first aspect.

[0036] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the method for displaying a prosthesis model in an X-ray image as described in the first aspect.

[0037] The present application provides a method for displaying a prosthesis model in an X-ray image, an electronic device and a storage medium. The present application obtains a second image by intercepting a first image at a specified section according to a selection instruction, and obtains a third image by intercepting a three-dimensional CT image at a specified section, and then displays the second image and the third image simultaneously. The prosthesis model can be displayed as a solid graphic in a two-dimensional X-ray image, which is convenient for users to accurately determine the position of the prosthesis model according to the second image and the third image, thereby improving the accuracy of hip prosthesis planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flow chart of a method for displaying a prosthesis model in an X-ray image provided in an embodiment of the present application.

[0039] Figure 2 yes Figure 1 Detailed flowchart of step S200.

[0040] Figure 3 It is a schematic diagram of a first display method of a second image and a third image provided in an embodiment of the present application.

[0041] Figure 4 yes Figure 1 Detailed flowchart of step S400.

[0042] Figure 5 yes Figure 4 Detailed flowchart of step S410 in FIG.

[0043] Figure 6 It is a schematic diagram of a second display method of the second image and the third image provided in an embodiment of the present application.

[0044] Figure 7 It is a schematic diagram of a third display method of the second image and the third image provided in an embodiment of the present application.

[0045] Figure 8It is a schematic diagram of the structure of a display device for a prosthesis model in an X-ray image provided in an embodiment of the present application.

[0046] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0047] Fig.10 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0050] The present application provides a method, electronic device and storage medium for displaying a prosthesis model in an X-ray image. The method obtains a second image by intercepting a first image at a specified section according to a selection instruction, and obtains a third image by intercepting a three-dimensional CT image at a specified section, and then displays the second image and the third image simultaneously. The prosthesis model can be displayed as a solid graphic in a two-dimensional X-ray image, which is convenient for a user to accurately determine the position of the prosthesis model according to the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0051] The method for displaying a prosthesis model in an X-ray image provided by the present application will be described in detail below with reference to the accompanying drawings.

[0052] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for displaying a prosthesis model in an X-ray image provided by an embodiment of the present application. Figure 1 As shown, the method for displaying a prosthesis model in an X-ray image includes: steps S100 to S400.

[0053] Step S100: Acquire a three-dimensional CT image of the prosthesis model and the target object.

[0054] The prosthesis model is a three-dimensional model of the prosthesis used in hip reconstruction surgery. A three-dimensional CT image is a three-dimensional stereoscopic image formed by superimposing two-dimensional X-ray images through computer post-processing technology using three-dimensional reconstruction technology. A three-dimensional CT image includes multiple voxels. Voxel is the abbreviation of volume pixel, which is the smallest division unit of a three-dimensional CT image in three-dimensional space and corresponds to a pixel in two-dimensional space. A three-dimensional CT image is a three-dimensional image in a three-dimensional space coordinate system, and each voxel in the three-dimensional CT image has coordinates in the three-dimensional space coordinate system.

[0055] In some embodiments, the prosthesis model is obtained after the hip joint prosthesis planning is completed, and the prosthesis model is now in the planned position in the three-dimensional space.

[0056] Step S200: generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model.

[0057] The prosthesis model is composed of multiple vertices, and the first image is a three-dimensional image.

[0058] Optionally, the prosthesis model is a mesh model, which is composed of a plurality of polygonal patches, and each polygonal patch has a plurality of vertices.

[0059] In some embodiments, a mesh data tool library is used to model and process all models and images in the method.

[0060] Optionally, the mesh data tool library includes VTK (Visualization Toolkit), Meshmixer, CloudCompare, ParaView and MeshLab, etc.

[0061] Optionally, when using the VTK tool library, the type of surface mesh data of all models is vtkPolyData.

[0062] See also Figure 2 , Figure 2 yes Figure 1 Detailed flow chart of step S200 in FIG. Figure 2 As shown, in some embodiments, step S200 includes steps S210 to S230.

[0063] Step S210: determining a surrounding space unit surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model.

[0064] In some embodiments, a bounding box algorithm is used to determine a bounding space unit that encloses the prosthesis model.

[0065] Optionally, the bounding box algorithm includes an AABB bounding box (axis-aligned bounding box) algorithm, a spherical bounding box algorithm, an elliptical bounding box algorithm, a polygonal bounding box algorithm, a quadtree bounding box algorithm, an octree bounding box algorithm, and the like.

[0066] In some embodiments, the three-dimensional space coordinate system includes an X-axis, a Y-axis, and a Z-axis that are perpendicular to each other, and the coordinates of the vertices of the prosthesis model include an X-axis coordinate, a Y-axis coordinate, and a Z-axis coordinate.

[0067] In some embodiments, step S210 includes step (210.1) to step (210.2).

[0068] (210.1) Determine the maximum X-axis coordinate X1, the minimum X-axis coordinate X2, the maximum Y-axis coordinate Y1, the minimum Y-axis coordinate Y2, the maximum Z-axis coordinate Z1 and the minimum Z-axis coordinate Z2 of all vertices of the prosthesis model according to the coordinates of all vertices of the prosthesis model.

[0069] (210.2) The point (X1, Y1, Z1) is used as a first vertex of a cuboid, and the point (X2, Y2, Z2) is used as an opposite vertex of the first vertex of the cuboid, thereby determining the cuboid, and determining the cuboid as an enclosing space unit that encloses the prosthesis model.

[0070] Among them, one side of the cuboid is parallel to a coordinate axis of the three-dimensional space coordinate system.

[0071] Step S220: generating a plurality of voxels that fill the enclosing space unit based on a preset voxel side length.

[0072] In some embodiments, a voxel is a cube element, and the length of a voxel side is the length of a side of the cube element.

[0073] Optionally, the voxel side length is greater than 0.01 unit length, for example, the voxel side length is 0.01 unit length, 0.03 unit length, 0.05 unit length, 0.1 unit length or 0.2 unit length, etc. The unit length is a default unit length in a three-dimensional space coordinate system.

[0074] In some embodiments, when the enclosing space unit is a cuboid, the cuboid is divided into a plurality of voxels according to a preset voxel side length to generate a plurality of voxels that fill the enclosing space unit.

[0075] Exemplarily, when the enclosing space unit is a cuboid, and each side of the cuboid is parallel to a coordinate axis of the three-dimensional space coordinate system, the calculation formula for the number of voxels contained in the enclosing space unit is:

[0076]

[0077] Among them, a represents the preset voxel side length, ceil represents rounding up, n1 represents that a side of the enclosing space unit parallel to the X-axis is composed of n1 voxels, n2 represents that a side of the enclosing space unit parallel to the Y-axis is composed of n2 voxels, n3 represents that a side of the enclosing space unit parallel to the Z-axis is composed of n3 voxels, and N represents the number of voxels contained in the enclosing space unit.

[0078] Step S230: grayscale values ​​of all voxels surrounding the spatial unit are set based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel surrounding the spatial unit to obtain a first image.

[0079] In some embodiments, step S230 includes step (230.1) to step (230.2).

[0080] (230.1) Determine all target voxels in the enclosing space unit that are located inside the prosthesis model based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit.

[0081] In some embodiments, based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit, it is determined whether each voxel in the enclosing space unit is inside the prosthesis model. If so, the voxel is determined as a target voxel inside the prosthesis model.

[0082] In some embodiments, a first ray is generated with a voxel in the enclosing space unit as the endpoint of the first ray. When the number of intersections between the first ray and the surface of the prosthesis model is an odd number, the voxel is determined to be inside the prosthesis model. When the number of intersections between the first ray and the surface of the prosthesis model is an even number, the voxel is determined not to be inside the prosthesis model.

[0083] (230.2) The grayscale values ​​of all target voxels are set to the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all voxels in the surrounding space unit except the target voxel are set to the background grayscale value, to obtain a first image.

[0084] In some implementations, the grayscale values ​​of all voxels in the surrounding space unit are first set to the background grayscale value, and then the grayscale values ​​of all target voxels are set to the grayscale values ​​corresponding to the prosthesis model.

[0085] In some embodiments, when using the VTK tool library, the grayscale values ​​of all voxels in the enclosing space unit are first set to the background grayscale value, and then the prosthesis model is constructed as an image template of the vtkPolyDataToImageStencil class, and the image template and the enclosing space unit are input into the vtkImageStencil function. The SetBackgroundValue function is used in the vtkImageStencil function to set the grayscale value of the background voxel output by the vtkImageStencil function to the grayscale value corresponding to the prosthesis model, and the reverse stencil option of the ReverseStencilOn function is additionally enabled. The output of the vtkImageStencil function is the first image.

[0086] Optionally, the grayscale value corresponding to the prosthesis model is 1.

[0087] Optionally, the background grayscale value is 0.

[0088] By setting the grayscale values ​​of all target voxels to the grayscale values ​​corresponding to the prosthesis model and setting the grayscale values ​​of all voxels in the surrounding space unit except the target voxels to the background grayscale values, since the grayscale values ​​of the voxels of the first image will not be changed when the first image is subsequently intercepted to obtain the second image, the grayscale values ​​of all pixels representing the prosthesis model in the second image are the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all pixels in the background area are the background grayscale values. The prosthesis model can be clearly displayed in the two-dimensional X-ray image subsequently, which is convenient for the user to accurately determine the position of the prosthesis model based on the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0089] Step S300: receiving a selection instruction, intercepting a first image at a designated section to obtain a second image according to the selection instruction, and intercepting a three-dimensional CT image at a designated section to obtain a third image.

[0090] The second image and the third image are both two-dimensional images.

[0091] In some implementations, the user may specify a section in the three-dimensional image where the two-dimensional image needs to be viewed according to his or her needs. The section is the specified section.

[0092] In some implementations, a designated section is determined according to a selection instruction, and then the three-dimensional image is intercepted using the designated section to obtain a two-dimensional image.

[0093] In some embodiments, when using the VTK tool library, a specified section is set using the SetResliceAxes function or the SetResliceAxesDirectionCosines function in the vtkImageReslice class, and the first image and the three-dimensional CT image are respectively input therein, and the outputs of the vtkImageReslice class are the second image and the third image, respectively.

[0094] It is understandable that the grayscale values ​​of the voxels of the first image will not be changed when the second image is obtained by intercepting the first image. After executing step (230.2), in the second image obtained at this time, the grayscale values ​​of all pixels representing the prosthesis model are the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all pixels in the background area are the background grayscale values. In addition, the third image obtained by intercepting the three-dimensional CT image is a two-dimensional X-ray image.

[0095] Step S400: Display the second image and the third image simultaneously, so as to display the prosthesis model in the two-dimensional X-ray image.

[0096] In some implementations, the layer where the second image is located is placed above the layer where the third image is located, and then the second image and the third image are displayed simultaneously.

[0097] In some embodiments, when using the VTK tool library, the second image and the third image are rendered in the same vtkRenderWindow using different rendering pipelines (i.e., the two use different vtkRenderers). If the number of layers of the vtkRenderer corresponding to the third image is n, the number of layers of the vtkRenderer corresponding to the second image is set to (n+1) to place the layer where the second image is located above the layer where the third image is located.

[0098] See also Figure 3 , Figure 3 is a schematic diagram of a first display mode of a second image and a third image provided in an embodiment of the present application. Figure 3 As shown, in some embodiments, the layer where the second image 2 is located is located above the layer where the third image 1 is located. In the second image 2, the grayscale values ​​of all pixels in the area 21 displaying the prosthesis model are the grayscale values ​​corresponding to the prosthesis model, which are brighter, while the grayscale values ​​of all pixels in the background area 22 are the background grayscale values, which are darker.

[0099] In some implementations, in step S400, the second image may be further processed to optimize the display effect.

[0100] See also Figure 4 , Figure 4 yes Figure 1Detailed flow chart of step S400 in FIG. Figure 4 As shown, in some embodiments, step S400 includes steps S410 to S420.

[0101] Step S410: setting the colors of all pixels representing the prosthesis model in the second image to the colors corresponding to the prosthesis model to obtain an updated second image.

[0102] As described above, in some embodiments, the grayscale values ​​of the colors of all pixels representing the prosthesis model in the second image are the grayscale values ​​corresponding to the prosthesis model.

[0103] See also Figure 5 , Figure 5 yes Figure 4 Detailed flow chart of step S410 in FIG. Figure 5 As shown, in some embodiments, step S410 includes steps S411 to S412.

[0104] Step S411: Acquire color mapping relationship information of the prosthesis model.

[0105] Optionally, the color mapping relationship information of the prosthesis model is used to map all pixels of at least one different grayscale value to different colors respectively.

[0106] Exemplarily, the color mapping relationship information is used to map all pixels with a grayscale value of 1 to green, and to map all voxels with a grayscale value of 10 to red.

[0107] Optionally, the color mapping relationship information is also used to set the transparency of the color.

[0108] Step S412: according to the color mapping relationship information, the colors of all pixels in the second image whose grayscale values ​​are the grayscale values ​​corresponding to the prosthesis model are set to corresponding colors to obtain an updated second image.

[0109] For example, when using the VTK tool library, a new vtkLookupTable color transparency mapping table is created, in which the SetTableValue function can accept 5 input values. The first input value is the pixel value index value, the second to fourth input values ​​are the ratio values ​​of the RGB colors respectively, and the fifth input value is the opacity value.

[0110] Exemplarily, according to the color mapping relationship information, the SetTableValue function is used to bind all pixels in the color transparency mapping table whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to green and completely opaque. At this time, the input of the SetTableValue function is (1, 0, 1, 0, 1).

[0111] In some embodiments, after all colors in the color transparency mapping table are bound according to the color mapping relationship information, the color transparency mapping table is applied to the second image to set the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to the corresponding colors.

[0112] In some embodiments, the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model are set to corresponding colors according to the color mapping relationship information, and all pixels in the second image whose grayscale values ​​are background grayscale values ​​are set to transparent according to the color mapping relationship information, thereby obtaining an updated second image.

[0113] Exemplarily, according to the color mapping relationship information, the SetTableValue function is further used to bind the pixels in the color transparency mapping table whose grayscale values ​​are the background grayscale values ​​to be completely transparent. At this time, the input of the SetTableValue function is (0, 0, 0, 0, 0).

[0114] In some embodiments, after all colors and transparencies in the color transparency mapping table are bound according to the color mapping relationship information, the color transparency mapping table is applied to the second image to set the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to the corresponding colors, and set all pixels in the second image whose grayscale values ​​are the background grayscale values ​​to transparent.

[0115] By setting the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to corresponding colors, and setting all pixels in the second image whose grayscale values ​​are background grayscale values ​​to transparent according to the color mapping relationship information, the effect of displaying the prosthesis model in the two-dimensional X-ray image can be optimized, making the prosthesis model more obvious, and making it easier for users to accurately determine the position of the prosthesis model based on the second image and the third image, thereby further improving the accuracy of hip prosthesis planning.

[0116] In some embodiments, the prosthesis model includes a plurality of sub-prosthesis models, and the grayscale values ​​corresponding to the plurality of sub-prosthesis models are different.

[0117] In some embodiments, the prosthesis model includes a pelvic prosthesis model and a femoral prosthesis model.

[0118] Optionally, the pelvic prosthesis model includes an acetabular cup model and a liner model, and the femoral prosthesis model includes a ball head model and a femoral stem model. In hip reconstruction surgery, the acetabular cup and the liner are installed on the pelvis of the target object, and the ball head and the femoral stem are installed on the femur of the target object.

[0119] Optionally, the entire pelvic prosthesis model is used as a sub-prosthesis model.

[0120] Optionally, the entire femoral prosthesis model is used as a sub-prosthesis model.

[0121] Optionally, the acetabular cup model, the liner model, the ball head model and the femoral stem model are each used as a sub-prosthesis model.

[0122] In some embodiments, each sub-prosthesis model is displayed differently.

[0123] In some embodiments, when the prosthesis model includes multiple sub-prosthesis models, a first image surrounding each sub-prosthesis model is generated according to the coordinates of all vertices of each sub-prosthesis model, and then each first image is intercepted at a specified section to obtain a second image corresponding to each sub-prosthesis model.

[0124] In some embodiments, for each sub-prosthesis model, the colors of all pixels having grayscale values ​​corresponding to the sub-prosthesis model in the second image corresponding to the sub-prosthesis model are set to the color corresponding to the sub-prosthesis model according to the color mapping relationship information to obtain an updated second image.

[0125] Further, for each sub-prosthesis model, the color of all pixels whose grayscale values ​​in the second image corresponding to the sub-prosthesis model are the grayscale values ​​corresponding to the sub-prosthesis model is set to the color corresponding to the sub-prosthesis model according to the color mapping relationship information, and all pixels whose grayscale values ​​in each second image are the background grayscale values ​​are set to be transparent. The specific method here refers to the contents of step S411 to step S412.

[0126] Step S420: displaying the updated second image and third image simultaneously.

[0127] In some implementations, the number of the second image is one. Figure 6 , Figure 6 It is a schematic diagram of a second display method of the second image and the third image provided in an embodiment of the present application. Figure 6 The dotted box in FIG. 1 is only used to indicate the position of the second image 2 and is not present in the actual display effect. Figure 6 As shown, in some embodiments, in the second image 2 , the grayscale value of all pixels in the area 21 displaying the prosthesis model is green corresponding to the prosthesis model, while all pixels in the background area 22 are transparent.

[0128] In some embodiments, there are multiple second images, and the second images and third images corresponding to all sub-prosthesis models are displayed simultaneously, so that all sub-prosthesis models are displayed in the two-dimensional X-ray image. In this way, it is convenient for the user to accurately determine the position of the sub-prosthesis model in the two-dimensional X-ray image and the relative position between the multiple sub-prosthesis models based on the multiple second images and the third images, thereby further improving the accuracy of hip prosthesis planning.

[0129] In some implementations, a preset layer order is obtained, and the layer where the second image corresponding to each sub-prosthesis model is located is set according to the preset layer order. In this way, the display effect can be further optimized, and on the one hand, it can avoid the situation where one sub-prosthesis model is blocked by other sub-prosthesis models, and on the other hand, it can also meet different needs of users.

[0130] See also Figure 7 , Figure 7 It is a schematic diagram of a third display method of the second image and the third image provided in an embodiment of the present application. Figure 7 The dotted box in is only used to indicate the position of the second image and is not present in the actual display effect. Figure 7 As shown, in some embodiments, area 21 in the second image 2 is green, indicating an acetabular cup model; area 31 in the second image 3 is magenta, indicating a ball head model; area 41 in the second image 4 is blue, indicating a femoral stem model. All pixels except the pixels corresponding to the sub-prosthesis model in the second image 2, the second image 3, and the second image 4 are transparent. The layer where the second image 4 is located is above the layer where the second image 3 is located, the layer where the second image 4 is located is above the layer where the second image 3 is located, and the layer where the second image 3 is located is above the layer where the second image 2 is located.

[0131] In some embodiments, the display method further includes: receiving a selection display instruction, and displaying only the second image corresponding to the specified one or more sub-prosthesis models according to the selection display instruction.

[0132] In summary, the method for displaying a prosthesis model in an X-ray image provided by the embodiment of the present application has the following advantages:

[0133] 1. By intercepting the first image at the specified section according to the selection instruction to obtain the second image, and intercepting the three-dimensional CT image at the specified section to obtain the third image, and then displaying the second image and the third image at the same time, the prosthesis model can be displayed as a solid graphic in the two-dimensional X-ray image, which is convenient for the user to accurately determine the position of the prosthesis model according to the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0134] 2. By setting the grayscale values ​​of all target voxels to the grayscale values ​​corresponding to the prosthesis model, and setting the grayscale values ​​of all voxels in the surrounding space unit except the target voxels to the background grayscale values, since the grayscale values ​​of the voxels of the first image will not be changed when the first image is subsequently intercepted to obtain the second image, the grayscale values ​​of all pixels representing the prosthesis model in the second image are the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all pixels in the background area are the background grayscale values. The prosthesis model can be clearly displayed in the two-dimensional X-ray image subsequently, which is convenient for the user to accurately determine the position of the prosthesis model based on the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0135] 3. By setting the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to corresponding colors, and setting all pixels in the second image whose grayscale values ​​are background grayscale values ​​to transparent according to the color mapping relationship information, the effect of displaying the prosthesis model in the two-dimensional X-ray image can be optimized, making the prosthesis model more obvious, and making it easier for users to accurately determine the position of the prosthesis model based on the second image and the third image, thereby further improving the accuracy of hip prosthesis planning.

[0136] 4. By displaying all sub-prosthesis models in a two-dimensional X-ray image, the user can accurately determine the position of the sub-prosthesis model in the two-dimensional X-ray image and the relative position between multiple sub-prosthesis models based on multiple second images and third images, thereby further improving the accuracy of hip prosthesis planning.

[0137] 5. By setting the layer of the second image corresponding to each sub-prosthesis model according to a preset layer order, the display effect can be further optimized. On the one hand, it can avoid the situation where a sub-prosthesis model is blocked by other sub-prosthesis models, and on the other hand, it can meet the different needs of users.

[0138] See also Figure 8 , Figure 8 Schematic diagram of the structure of the display device of the prosthesis model in the X-ray image provided by the embodiment of the present application. Figure 8 As shown, the display device 300 of the prosthesis model in the X-ray image includes an acquisition module 310 and a processing module 320.

[0139] In some embodiments, the acquisition module 310 is used to acquire three-dimensional CT images of the prosthesis model and the target object.

[0140] In some embodiments, the processing module 320 is used to generate a first image surrounding the prosthesis model based on the coordinates of all vertices of the prosthesis model, wherein the prosthesis model is composed of multiple vertices and the first image is a three-dimensional image; receive a selection instruction, intercept the first image at a specified section according to the selection instruction to obtain a second image, and intercept the three-dimensional CT image at the specified section to obtain a third image, and the second image and the third image are both two-dimensional images; display the second image and the third image simultaneously, thereby displaying the prosthesis model in the two-dimensional X-ray image.

[0141] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Fig. 9 A processor 410 is taken as an example.

[0142] In some implementations, the processor 410 and the memory 420 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0143] In some embodiments, the processor 410 is used to obtain a three-dimensional CT image of the prosthesis model and the target object; generate a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model, wherein the prosthesis model is composed of multiple vertices and the first image is a three-dimensional image; receive a selection instruction, intercept the first image at a specified section to obtain a second image according to the selection instruction, and intercept the three-dimensional CT image at a specified section to obtain a third image, wherein both the second image and the third image are two-dimensional images; and display the second image and the third image simultaneously, thereby displaying the prosthesis model in the two-dimensional X-ray image.

[0144] In some embodiments, the memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the method for displaying a prosthesis model in an X-ray image in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, the method for displaying a prosthesis model in an X-ray image in the above method embodiment is implemented.

[0145] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device 400, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0146] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the display method of the prosthesis model in the X-ray image in any of the above method embodiments is executed, for example, the above described Figure 1 The method comprises steps S100 to S400.

[0147] Please refer to Fig.10 , Fig.10 The computer-readable storage medium 500 stores a program code 510, which can be called by a processor to execute the method for displaying a prosthesis model in an X-ray image described in the above method embodiment.

[0148] The computer readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. Optionally, the computer readable storage medium includes a non-transitory computer readable storage medium. The computer readable storage medium 500 has a storage space for program codes for executing any method steps in the method for displaying a prosthesis model in an X-ray image. These program codes may be read from or written to one or more computer program products. The program codes may be compressed, for example, in an appropriate form.

[0149] In some embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned method for displaying a prosthesis model in an X-ray image.

[0150] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium 500. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0151] In summary, the present application provides a method for displaying a prosthesis model in an X-ray image, an electronic device, and a storage medium. The method for displaying a prosthesis model in an X-ray image includes: obtaining a three-dimensional CT image of the prosthesis model and the target object; generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model, wherein the prosthesis model is composed of multiple vertices and the first image is a three-dimensional image; receiving a selection instruction, intercepting the first image at a specified section according to the selection instruction to obtain a second image, and intercepting the three-dimensional CT image at a specified section to obtain a third image, and the second image and the third image are both two-dimensional images; displaying the second image and the third image at the same time, thereby displaying the prosthesis model in a two-dimensional X-ray image. The present application intercepts the first image at a specified section according to the selection instruction to obtain a second image, and intercepts the three-dimensional CT image at a specified section to obtain a third image, and then displays the second image and the third image at the same time, so that the prosthesis model can be displayed as a solid graphic in a two-dimensional X-ray image, so that the user can accurately judge the position of the prosthesis model according to the second image and the third image, thereby improving the accuracy of hip prosthesis planning.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for displaying a prosthesis model in an X-ray image, characterized in that: include: Acquire three-dimensional CT images of the prosthesis model and the target object; generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model, wherein the prosthesis model is composed of a plurality of vertices and the first image is a three-dimensional image; receiving a selection instruction, intercepting the first image at a specified section according to the selection instruction to obtain a second image, and intercepting the three-dimensional CT image at the specified section to obtain a third image, wherein both the second image and the third image are two-dimensional images; The second image and the third image are displayed simultaneously, thereby displaying the prosthesis model in a two-dimensional X-ray image.

2. The method for displaying a prosthesis model in an X-ray image according to claim 1, characterized in that: The step of generating a first image surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model comprises: Determining a surrounding space unit surrounding the prosthesis model according to the coordinates of all vertices of the prosthesis model; Generating a plurality of voxels that fill the enclosing space unit based on a preset voxel side length; The grayscale values ​​of all voxels of the enclosing space unit are set based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit to obtain the first image.

3. The method for displaying a prosthesis model in an X-ray image according to claim 2, characterized in that: The step of setting the grayscale values ​​of all voxels of the enclosing space unit based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit to obtain the first image includes: Determine all target voxels located inside the prosthesis model in the enclosing space unit based on the coordinates of each vertex of the prosthesis model and the coordinates of each voxel of the enclosing space unit; The grayscale values ​​of all the target voxels are set to the grayscale values ​​corresponding to the prosthesis model, and the grayscale values ​​of all voxels in the surrounding space unit except the target voxels are set to the background grayscale values, so as to obtain the first image.

4. The method for displaying a prosthesis model in an X-ray image according to claim 1, characterized in that: The simultaneously displaying the second image and the third image comprises: Setting the colors of all pixels representing the prosthesis model in the second image to the colors corresponding to the prosthesis model to obtain an updated second image; The updated second image and the third image are displayed simultaneously.

5. The method for displaying a prosthesis model in an X-ray image according to claim 4, characterized in that: The grayscale values ​​of all pixels representing the prosthesis model in the second image are grayscale values ​​corresponding to the prosthesis model, and the colors of all pixels representing the prosthesis model in the second image are set to the colors corresponding to the prosthesis model to obtain the updated second image, including: Acquiring color mapping relationship information of the prosthesis model; According to the color mapping relationship information, the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model are set to corresponding colors to obtain an updated second image.

6. The method for displaying a prosthesis model in an X-ray image according to claim 5, characterized in that: The step of setting the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model to corresponding colors according to the color mapping relationship information to obtain the updated second image includes: According to the color mapping relationship information, the colors of all pixels in the second image whose grayscale values ​​correspond to the grayscale values ​​of the prosthesis model are set to corresponding colors; All pixels in the second image whose grayscale values ​​are the background grayscale values ​​are set to be transparent according to the color mapping relationship information, so as to obtain an updated second image.

7. The method for displaying a prosthesis model in an X-ray image according to claim 5 or 6, characterized in that: The prosthesis model includes a plurality of sub-prosthesis models, the grayscale values ​​corresponding to the plurality of sub-prosthesis models are different, and the color of all pixels whose grayscale values ​​in the second image are the grayscale values ​​corresponding to the prosthesis model are set to the corresponding color according to the color mapping relationship information to obtain the updated second image, comprising: For each of the sub-prosthesis models, the colors of all pixels having grayscale values ​​corresponding to the sub-prosthesis model in the second image corresponding to the sub-prosthesis model are set to the color corresponding to the sub-prosthesis model according to the color mapping relationship information to obtain an updated second image.

8. The method for displaying a prosthesis model in an X-ray image according to claim 1, characterized in that: The simultaneously displaying the second image and the third image comprises: The layer where the second image is located is placed above the layer where the third image is located, and the second image and the third image are displayed simultaneously.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for displaying a prosthesis model in an X-ray image as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the method for displaying a prosthesis model in an X-ray image as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Medical image reconstruction method and device, equipment and storage medium

    CN113764072A

  • CT slice prosthesis fusion display method based on three-dimensional model

    CN116091693A

  • Three-dimensional grid processing method, device and equipment and readable storage medium

    CN118298128A

  • Method for co-displaying three-dimensional bone reconstruction model and CT (Computed Tomography) slice

    CN118365831A

  • Volume rendering device

    JP2020086806A