Total knee replacement surgery image inspection method and apparatus
By processing DCM CT images, extracting metal rods, and calculating vector errors, the problem of errors in total knee replacement surgery caused by CT image offset was solved, improving the accuracy and efficiency of the surgery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ARIEMEDI MEDICAL SCI BEIJING CO LTD
- Filing Date
- 2023-04-19
- Publication Date
- 2026-05-22
AI Technical Summary
Before total knee replacement surgery, patients may move their legs during CT scans due to pain or other reasons, causing the CT images to shift. This increases the error rate in preoperative planning and osteotomy navigation, potentially leading to surgical failure.
By reading in professional DCM CT images, the maximum and minimum gray values are obtained, the portion with a gray value of more than 75% is extracted, non-metallic rod points are removed using the maximum connectivity threshold, the image is binarized, the vector error between adjacent points is calculated, a reasonable range is defined, and the image qualification is judged.
This reduces the error rate of planning and osteotomy navigation based on unqualified images in the later stages, ensures that the leg bone in the image matches the patient's leg bone, and reduces the time required for manual judgment.
Smart Images

Figure CN116473581B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and more particularly to a method and apparatus for examining images of total knee replacement surgery. Background Technology
[0002] CT (Computed Tomography) is a scanning technique that uses precisely collimated X-ray beams, gamma rays, ultrasound waves, etc., along with highly sensitive detectors to scan a specific part of the human body one section after another. It features fast scanning time and clear images and can be used to examine a variety of diseases.
[0003] Before total knee replacement surgery, doctors will perform preoperative planning based on the patient's CT scan images. During the CT scan, the patient may move their leg due to pain or other reasons, which can cause the CT images to be misaligned. Planning and osteotomy navigation based on unsuitable images will increase the error rate and may lead to surgical failure. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, the technical problem to be solved by this invention is to provide a method for examining images during total knee replacement surgery, which can reduce the error rate of planning and osteotomy navigation based on unqualified images, ensure that the leg bones in the images match the patient's leg bones, and reduce the time required for manual judgment.
[0005] The technical solution of this invention is: a method for examining images during total knee replacement surgery, comprising the following steps:
[0006] (1) Import CT images from a professional DCM;
[0007] (2) Obtain the maximum and minimum gray values of the image;
[0008] (3) Take the portion with more than 75% of the gray value, including the metal rod and some fragments;
[0009] (4) Use maximum connectivity threshold extraction to remove points other than the metal rods. At this time, the image only contains the metal rods. The method of maximum connectivity threshold extraction is to binarize the above image, set 75% or more to 1 and the rest to 0, then traverse the entire image, calculate the number of adjacent points and the number of adjacent regions according to the coordinates of each point, sort these adjacent regions from largest to smallest, and take the largest region.
[0010] (5) Binarize the image;
[0011] (6) Obtain the number of layers in the image, the height of the image, and the spatial height of one layer;
[0012] (7) Calculate how many layers of images are within 10mm;
[0013] (8) Take the center point every 10mm in the total number of layers;
[0014] (9) Calculate the vectors of adjacent points;
[0015] (10) The error is obtained by subtracting adjacent vectors;
[0016] (11) Define a reasonable range;
[0017] (12) All errors are within the range and the result is qualified; otherwise, the result is unqualified.
[0018] Before preoperative planning for total knee replacement surgery, CT scans of the leg are taken, and a metal rod is typically attached. This invention reads professional DCM CT images (CT images with the metal rod attached), obtains the maximum and minimum grayscale values, and extracts the portion with more than 75% of the grayscale values, including the metal rod and some scattered points. Maximum connectivity threshold extraction is used to remove points outside the metal rod, leaving only the metal rod in the image. The image is then binarized to obtain the number of image layers, the image height, and the spatial height of each layer. The number of image layers within 10mm is calculated. The center point is taken every 10mm in the total number of layers, and the vectors of adjacent points are calculated. Subtraction between adjacent vectors represents the error. A reasonable range is defined; if all errors are within this range, the image is considered acceptable; otherwise, it is unacceptable. In other words, as long as the metal rod is normal and not bent or deformed, the image can be considered acceptable. Therefore, it can reduce the error rate of later planning and osteotomy navigation based on unacceptable images, ensuring consistency between the leg bone in the image and the patient's leg bone, reducing the time spent on manual judgment.
[0019] It also provides an imaging device for total knee replacement surgery, which includes:
[0020] The data reading module is configured to read CT images from professional DCM (Digital Cavity Detector).
[0021] The data processing module acquires the maximum and minimum gray values of the image, takes the portion of gray values above 75%, which includes the metal rod and some fragmented points, and uses maximum connectivity threshold extraction to remove the points other than the metal rod. At this point, the image only contains the metal rod, and the image is binarized.
[0022] The error calculation module is configured to obtain the number of image layers, the image height, and the spatial height of one layer. It calculates how many image layers are within 10mm, takes the center point every 10mm in the total number of layers, calculates the vector of adjacent points, and subtracts the adjacent vectors to obtain the error.
[0023] A judgment module, which is configured to define a reasonable range. All errors within the range are qualified, otherwise they are unqualified. Description of the Drawings
[0024] Figure 1 It is a schematic flow diagram of the method for inspecting images of total knee replacement surgery according to the present invention. Detailed Embodiments
[0025] As Figure 1 shown, this method for inspecting images of total knee replacement surgery includes the following steps:
[0026] (1) Read in professional DCM CT images;
[0027] (2) Obtain the maximum gray value and the minimum gray value of the image;
[0028] (3) Take the part with more than 75% of the gray value. These parts include metal rods and some scattered points;
[0029] The gray value of the metal rod is larger than that of the human bone. Therefore, taking the gray value of more than 75% can basically include the gray value of the metal rod. This operation is to extract the metal rod from the entire image.
[0030] (4) Use the maximum connected threshold extraction to remove the points outside the metal rod. At this time, the image only contains the metal rod. The method of maximum connected threshold extraction is to binarize the above image, set the part with more than 75% as 1 and the others as 0, then traverse the entire image, calculate the number of adjacent points and the number of adjacent regions according to the coordinates of each point, sort the sizes of these adjacent regions from large to small, and take the largest one;
[0031] (5) Binarize the image;
[0032] (6) Obtain the number of layers of the image, the height of the image, and the spatial height of one layer;
[0033] (7) Calculate how many layers of images are within 10 mm;
[0034] (8) Take the center point once for every 10 mm of layers in the total number of layers;
[0035] (9) Calculate the vectors of adjacent points;
[0036] (10) Subtract the adjacent vectors to get the error;
[0037] (11) Define a reasonable range (this range should be determined by a large number of experiments. What is the normal range of error and how much image deviation can be normally applied. Finally, judge by comparing the previously calculated error with the defined range);
[0038] (12) All errors are within the range and the result is qualified; otherwise, the result is unqualified.
[0039] Before preoperative planning for total knee replacement surgery, CT scans of the leg are taken, and a metal rod is typically attached. This invention reads professional DCM CT images (CT images with the metal rod attached), obtains the maximum and minimum grayscale values, and extracts the portion with more than 75% of the grayscale values, including the metal rod and some scattered points. Maximum connectivity threshold extraction is used to remove points outside the metal rod, leaving only the metal rod in the image. The image is then binarized to obtain the image layer number, image height, and spatial height of each layer. The number of layers within 10mm is calculated. The center point is taken every 10mm in the total number of layers, and the vectors of adjacent points are calculated. Subtraction between adjacent vectors represents the error. A reasonable range is defined; if all errors are within this range, the image is considered acceptable; otherwise, it is unacceptable. In other words, as long as the metal rod is normal and without bending or deformation, the image can be considered acceptable. Therefore, it reduces the error rate of later planning and osteotomy navigation based on unacceptable images, ensuring consistency between the leg bone in the image and the patient's leg bone, reducing the time spent on manual judgment.
[0040] Preferably, in step (5), setting the image background to 0 and the target to 1 is beneficial for subsequent calculations.
[0041] Preferably, in step (7), the height of one image layer = total image height / total number of image layers, and the number of target layers within 10mm = 10 / height of one image layer.
[0042] Preferably, in step (8), points are taken at equal intervals, with smaller intervals being more accurate, but not less than the height of one layer of the image.
[0043] Preferably, in step (8), the distance is 10 mm.
[0044] Preferably, the adjacent points taken in step (9) are used as vectors to obtain many vectors connected in space.
[0045] Preferably, in step (10), the error is 0 if the metal rod is perfectly straight. However, during leg bone scanning, human respiration or external conditions may cause slight movements by the patient during the scan. Small movements will not affect the use of the image, but excessive movements will cause problems with the application of the image, making the image inconsistent with the patient's leg bone.
[0046] Preferably, in step (12), the user is prompted whether the error exceeds the range.
[0047] Those of ordinary skill in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps of the methods of the above embodiments. The storage medium can be: ROM / RAM, magnetic disk, optical disk, memory card, etc. Therefore, corresponding to the method of the present invention, the present invention also simultaneously includes a total knee replacement surgery image inspection device, which is usually represented in the form of functional modules corresponding to the steps of the method. The device includes:
[0048] A data reading module configured to read in professional DCM CT images;
[0049] A data processing module that obtains the maximum gray value and the minimum gray value of the image, takes the part above 75% of the gray value, which includes metal rods and some scattered points, uses the maximum connected threshold extraction to remove the points other than the metal rods. At this time, the image only has metal rods, and the image is binarized;
[0050] An error calculation module configured to obtain the number of layers of the image, the height of the image, and the spatial height of one layer, calculate how many layers of the image are within 10 mm, take the center point once for every 10 mm of the total number of layers, calculate the vectors of adjacent points, and subtract the adjacent vectors to obtain the error;
[0051] A judgment module configured to define a reasonable range. If all errors are within the range, it is qualified; otherwise, it is unqualified.
[0052] Preferably, in the error calculation module, the height of one layer of the image = the total height of the image / the total number of layers of the image, the target number of layers within 10 mm = 10 / the height of one layer of the image, and a point is taken every same distance. The smaller the distance, the more accurate, but not less than the height of one layer of the image.
[0053] As described above, it is only a preferred embodiment of the present invention and does not impose any form of limitation on the present invention. Any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for image examination in total knee replacement surgery, characterized in that: It includes the following steps: (1) Read in the CT images of professional DCM; (2) Obtain the maximum gray value and the minimum gray value of the image; (3) Take the part with gray value above 75%, which includes metal rods and some scattered points; (4) Use the largest connected component extraction to remove the points other than the metal rods. At this time, the image only contains metal rods. The method of the largest connected component extraction is to binarize the above image, set the part above 75% to 1, and the others to 0, then traverse the entire image, calculate the number of adjacent points and the number of adjacent regions according to the coordinates of each point, sort the sizes of these adjacent regions from large to small, and take the largest region; (5) Binarize the image; (6) Obtain the number of layers of the image, the height of the image, and the spatial height of one layer; (7) Calculate how many layers of images are within 10 mm; (8) Take the center point once for every number of layers within 10 mm in the total number of layers; (9) Calculate the vectors of adjacent points; (10) Subtract the adjacent vectors to get the error; (11) Define a reasonable range; (12) If all the errors are within the range, it is qualified, otherwise it is unqualified.
2. The method for examining images during total knee replacement surgery according to claim 1, characterized in that: In the step (5), the image background is changed to 0 and the target is changed to 1.
3. The method for examining images during total knee replacement surgery according to claim 2, characterized in that: In the step (7), the height of one layer of the image = the total height of the image / the total number of layers of the image, and the number of target layers within 10 mm = 10 / the height of one layer of the image.
4. The method for examining images during total knee replacement surgery according to claim 3, characterized in that: In the step (8), take a point once every same distance. The smaller the distance, the more accurate, but it should not be less than the height of one layer of the image.
5. The method for examining images during total knee replacement surgery according to claim 4, characterized in that: In the step (8), the distance is 10 mm.
6. The method for examining images during total knee replacement surgery according to claim 4, characterized in that: The adjacent points taken in the step (9) are made into vectors, and many connected vectors in space are obtained.
7. The method for examining images during total knee replacement surgery according to claim 5, characterized in that: In the step (10), if the metal rod is completely straight, the error is 0.
8. The method for examining images during total knee replacement surgery according to claim 6, characterized in that: In the step (12), prompt the user whether the error exceeds the range.
9. The apparatus for image examination of total knee replacement surgery according to claim 1, characterized in that: It includes: A data reading module configured to read in the CT images of professional DCM; A data processing module that obtains the maximum gray value and the minimum gray value of the image, takes the part with gray value above 75%, which includes metal rods and some scattered points, uses the largest connected component extraction to remove the points other than the metal rods. At this time, the image only contains metal rods, and binarizes the image; An error calculation module configured to obtain the number of layers of the image, the height of the image, and the spatial height of one layer, calculate how many layers of images are within 10 mm, take the center point once for every number of layers within 10 mm in the total number of layers, calculate the vectors of adjacent points, and subtract the adjacent vectors to get the error; A judgment module configured to define a reasonable range. If all the errors are within the range, it is qualified, otherwise it is unqualified.
10. The apparatus for examining images during total knee replacement surgery according to claim 9, characterized in that: In the error calculation module, the height of one layer of the image = the total height of the image / the total number of layers of the image, the number of target layers within 10 mm = 10 / the height of one layer of the image, and take a point once every same distance. The smaller the distance, the more accurate, but it should not be less than the height of one layer of the image.