Ureteral starting segment extraction method, positioning method, system, application and medium
Through CT image processing technology, including threshold segmentation, template matching and seed growth algorithms, the efficiency and accuracy problems of locating the initial segment of the ureter and the stone center of mass are solved, and automated and efficient ureteral CPR curve drawing is achieved.
Patent Information
- Application Number
- CN202410764999.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-27
AI Technical Summary
When drawing the ureteral CPR curve, the existing technology is inefficient and the accuracy needs to be improved. In particular, there are challenges in determining the initial segment of the ureter and positioning the center of mass of the stone.
By taking CT images of both kidneys, and using technical means such as threshold segmentation and template matching, we can automatically detect and extract the initial segment of the ureter and the stone center of mass, including segmentation, erosion, expansion, area marking and seed growth algorithms with thresholds of 100HU and -10HU, to achieve Accurate morphological mapping and centroid positioning.
It achieves the automatic and accurate extraction of the initial segment of the ureter and the center of mass of the stone, improves the efficiency and accuracy of drawing CPR curves, and can quickly and accurately determine the center of mass of the stone for drawing coordinate points on the CPR curve.
Smart Images

Figure CN118710604A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urinary system image processing, and in particular to a method for extracting a ureteral initial segment, a method for locating a ureteral initial segment, a system, a use and a medium. Background Art
[0002] The normal ureter is connected to the renal pelvis above and the bladder below. It is a pair of slender tubes in the shape of a flat cylinder. Due to its curvature, it is most convenient and complete to observe it using the CPR curve (Curved Planar Reformation). There are three narrow parts in the ureter: the first narrow part is located at the transition between the renal pelvis and the ureter (the starting section of the ureter); the second narrow part is at the place where it crosses the iliac artery and enters the pelvis; the third narrow part is at the place where it penetrates the bladder wall. When drawing the CPR curve, it is key to determine the starting section, middle section and end section of the CPR curve. At present, when drawing the CPR curve, the center line is manually or automatically detected along the length of the ureter according to the CT image, and then resampled according to the center line, and the image contrast, brightness and other parameters need to be adjusted to more clearly display the ureter and its surrounding structures, so as to complete the drawing of the ureter CPR. However, there are still defects such as low efficiency and accuracy that need to be improved. Summary of the invention
[0003] The purpose of the present invention is to disclose an extraction method, a positioning method, a system, a use and a medium for the initial segment of the ureter.
[0004] The first object of the present invention is to provide a method for extracting the initial segment of the ureter.
[0005] The second object of the present invention is to provide a system for extracting the initial section of the ureter.
[0006] A third object of the present invention is to provide a computer-readable storage medium.
[0007] The fourth inventive object of the present invention is to provide a method for locating the centroid of stones in the initial section of the ureter.
[0008] The fifth inventive object of the present invention is to provide a method for locating the centroid of stones in the initial section of the ureter.
[0009] A sixth object of the present invention is to provide a computer-readable storage medium.
[0010] To achieve the above first invention objective, the present invention provides a method for extracting the initial segment of the ureter, comprising the following steps:
[0011] Step S1: taking CT images of both kidneys;
[0012] Step S2: Segment the CT image with a threshold of 100HU, record the CT image with a value greater than the threshold of 100HU as 1, and record the CT image with a value less than the threshold of 100HU as 0, and obtain a binary mask image (Figure A);
[0013] Step S3: Determine the centroid of each CT slice image from top to bottom, and select the first CT slice image whose centroid is within the range of y<256 and 150<x<350, which is the lower edge of the rib, and record it as image L;
[0014] Step S4: segment the image L with a threshold of -10HU, record the values in the image L that are greater than the threshold -10HU as 1, and record the values in the image L that are less than the threshold -10HU as 0, and obtain a binary mask image M, and erode the image M n times to obtain image l;
[0015] Step S5: Mark the area in Figure 1, including the coordinate point (100, 250) as the first area Figure 1 1 , including the coordinate point (400,230) is recorded as the second area map l 2 ;
[0016] Step S6: Figure 1 1 Figure 1 2 Expand the point where M(i, j)=1 to obtain the cross-sectional views of the two kidneys;
[0017] Step S7: the cross-sectional images of the two kidneys grow upward and downward respectively, the growth distance is less than 12 cm, the growth threshold is greater than -10HU, and a complete morphological image of the left and right kidneys is obtained, the complete morphological image includes arteries, veins and ureters;
[0018] Step S8: Detect the thinnest tube using template matching to obtain the starting section of the ureter.
[0019] Preferably, bones or stones greater than a threshold of 100HU in the CT image.
[0020] Preferably, the tissue with a value greater than the threshold value -10HU in Figure L is kidney tissue.
[0021] Preferably, the corrosion is based on: M(i, j)=1, but the periphery of M(i, j) is 0.
[0022] Based on the same inventive principle, in order to achieve the above second inventive object, the present invention provides a system for extracting the initial segment of the ureter, including a CT image recognition unit, a CT image segmentation unit, a CT image processing unit and a bilateral kidney morphology drawing unit;
[0023] The extraction system executes the method for extracting the initial section of the ureter described in the first invention.
[0024] Based on the same inventive principle, in order to achieve the above-mentioned third invention purpose, the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first invention is implemented.
[0025] To achieve the fourth invention objective, the present invention provides a method for locating the centroid of a stone in the initial section of the ureter, comprising the following steps:
[0026] Step A1: using the method for locating the initial segment of the ureter as claimed in claim 1 to obtain a CT image B of the initial segment of the ureter;
[0027] Step A2: segment image B with a threshold of 100HU, record the values of image B that are greater than the threshold of 100HU as 1, and record the values of image B that are less than the threshold of 100HU as 0, and obtain a binary mask image b;
[0028] Step A3: Use the seed growth algorithm to divide the range with a mask value of 1 in Figure b into independent regions, and calculate the volume of the independent regions;
[0029] Step A4: If the volume of the independent area is less than 5 cm 3 , it is judged as a stone;
[0030] Step A5: Calculate the centroid of the independent regions.
[0031] Preferably, in step A3, in the seed growth algorithm: b(i, j)=1 and the periphery of b(i, j) is all 1.
[0032] Based on the same inventive principle, in order to achieve the above-mentioned fifth invention purpose, the present invention provides a use, in which the centroid obtained by the method for locating the centroid of stones in the initial section of the ureter described in the fourth invention is used to draw coordinate points on the ureteral CPR curve.
[0033] Based on the same inventive principle, in order to achieve the sixth invention objective mentioned above, the present invention provides a use, a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described in the fourth invention is implemented.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] (1) The bilateral kidney CT images are segmented with a threshold of 100HU. Bones or stones in the CT images that are greater than the threshold of 100HU are obtained as a binary mask image (Figure A). The centroid of each CT slice is determined from top to bottom to determine the lower edge of the ribs (Figure L). Since part of the bilateral kidneys are wrapped by the ribs and part is not, the CT slice image (Figure L) will contain a bilateral kidney region. According to the position of Figure L, the slice at the same position in the bilateral kidney CT image is extracted, and the slice is segmented with a threshold of -10HU to obtain a binary mask image (Figure M). Figure M is eroded n times to obtain Figure L. A region mark is made on Figure L, and the range including the coordinate point (100, 250) is recorded as the first region (Figure L). 1 , including the coordinate point (400,230) is recorded as the second area map l 2 , Figure 1 1 Figure 1 2 The expansion is performed to obtain cross-sectional images of the two kidneys. Finally, the CT images at the location of the cross-sectional images are grown upward and downward respectively, with a growth distance of less than 12 cm and a growth threshold greater than -10HU, to obtain a complete morphological image of the left and right kidneys. The thinnest tube is detected using template matching to obtain the starting segment of the ureter. This method can automatically and accurately obtain a complete morphological image of the starting segment of the ureter.
[0036] (2) Based on the complete morphological image of the initial segment of the ureter, the CT image B of the initial segment is obtained. The threshold value of 100HU is used to segment the image B. The values greater than the threshold value 100HU in the image B are recorded as 1, and the values less than the threshold value 100HU in the image B are recorded as 0. The binary mask image b is obtained. The seed growth algorithm is used to divide the range of the mask value 1 in the image b into independent regions. The volume of the independent region is calculated. If the volume of the independent region is less than 5cm3, it is judged as a stone, and the center of mass of the stone is determined. The center of mass of the stone is determined quickly and accurately, and the coordinates of the center of mass are used to accurately generate a point on the CPR curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a diagram of the relative positions of the ribs and kidneys;
[0038] Figure 2 It is the plane coordinate diagram of Figure L of the present invention;
[0039] Figure 3 The figure is a flow chart of the method for extracting the initial segment of the ureter of the present invention.
[0040] Figure 4 This is a block diagram of the extraction system for the initial section of the ureter of the present invention.
[0041] Figure 5 It is a schematic diagram of the computer medium module of the present invention.
[0042] Figure 6 The present invention is a flow chart of the method for locating the centroid of a stone in the initial section of the ureter. DETAILED DESCRIPTION
[0043] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.
[0044] The specific implementation process of the present invention is described below through multiple embodiments.
[0045] Embodiment 1:
[0046] Ginseng Figures 1 to 3 As shown, this embodiment discloses a specific implementation method of a method for extracting the initial segment of the ureter (hereinafter referred to as "the method").
[0047] Ginseng Figure 3 As shown, in this embodiment, the method for extracting the initial section of the ureter includes the following steps:
[0048] Step S1: Take a bilateral kidney CT image; the bilateral kidney CT image is composed of a number of slices, and a slice is a cross-sectional image of a specific plane.
[0049] Step S2: Segment the CT image with a threshold of 100HU, record the CT image with a value greater than the threshold of 100HU as 1, and record the CT image with a value less than the threshold of 100HU as 0, and obtain a binary mask image Figure A; specifically, bones or stones with a value greater than the threshold of 100HU in the CT image will appear in the ribs, spine, kidneys and ureters in the bilateral kidney CT image, and Figure A generates a three-dimensional image that only retains the bones or stones.
[0050] Step S3: Determine the centroid of each CT slice from top to bottom, and select the first CT slice whose centroid is within the range of y < 256 and 150 < x < 350, which is the lower edge of the rib, and is recorded as Figure L; Specifically, Figure A is composed of several slices from top to bottom, see Figure 1 and Figure 2 Due to the position and characteristics of the ribs and spine, the centroid of each CT slice will be outside the range of y<256 and 150<x<350 before reaching the lower edge of the ribs. When the centroid is first located in the range of y<256 and 150<x<350, the first CT slice that meets this condition is the lower edge of the ribs. This slice is recorded as L. The location of L is shown in Figure 2 The dotted line in .
[0051] Step S4: segment the image L with a threshold of -10HU, record the values greater than the threshold -10HU as 1, and record the values less than the threshold -10HU as 0, to obtain a binary mask image M, and corrode the image M n times to obtain image l; since part of the kidneys are wrapped by the ribs and part is not wrapped, there will be a kidney area in the CT slice image L, and the values greater than the threshold -10HU in the image L are renal tissues. By segmenting the image L with a threshold of -10HU, a binary mask image M is obtained. In order to reduce the image of the adhesion tissue, the image M is corroded n times, such as 5 times, and the basis for the corrosion is: M(i, j) = 1, but the periphery of M(i, j) is 0, which can reduce the edge area of the kidneys and remove the adhesion tissue.
[0052] Step S5: Mark the area in Figure 1, including the coordinate point (100, 250) as the first area Figure 1 1 , including the coordinate point (400,230) is recorded as the second area map l 2 Specifically, the coordinate points (100, 250) and (400, 230) are the average position coordinates of the two kidneys, and the area including these two coordinates is marked as the first area. 1 and the second area map 1 2 , representing the left and right kidney regions, respectively.
[0053] Step S6: Figure 1 1 Figure 1 2 Expand the point where M(i, j)=1 to obtain the cross-sectional views of the two kidneys;
[0054] Step S7: The cross-sectional images of the two kidneys grow upward and downward respectively, with a growth distance of less than 12 cm and a growth threshold greater than -10HU, to obtain a complete morphological image of the left and right kidneys, which includes arteries, veins and ureters; based on the cross-sectional images of the two kidneys, they grow upward and downward respectively, and the bilateral renal CT images with a threshold greater than -10HU are identified and grown to obtain a complete morphological image of the left and right kidneys.
[0055] Step S8: Detect the thinnest tube by template matching to obtain the starting section of the ureter. Template matching is an image processing technology that can search for areas in an image that match or are similar to a specific template image. Arteries, veins, and ureters are all tubular, and only the ureter runs downward and is the thinnest. The thinnest tube, i.e., the ureter, is detected by template matching to obtain the starting section of the ureter.
[0056] Through steps S1 to S8 of this embodiment, the complete shape and position of the initial section of the ureter are obtained.
[0057] Embodiment 2:
[0058] Ginseng Figure 4As shown, this embodiment discloses a specific implementation of a system for extracting the initial section of the ureter (hereinafter referred to as the "system").
[0059] Ginseng Figure 4 As shown, in this embodiment, the extraction system of the initial section of the ureter includes a CT image recognition unit, a CT image segmentation unit, a CT image processing unit and a double kidney morphology drawing unit;
[0060] The extraction system executes the extraction method of the ureteral starting section described in Example 1. In the extraction system, the CT image recognition unit is used to collect bilateral kidney CT images; the CT image segmentation unit is used to obtain a binary mask image according to a set threshold; the CT image processing unit is used to determine the centroid of each CT slice image, mark the image area, expand or corrode the image, etc.; the bilateral kidney morphology drawing unit is used to draw the complete morphology of the left and right kidneys, and use the template matching method to detect the thinnest tube to obtain the ureteral starting section.
[0061] By using the extraction system of the second embodiment, after inputting the CT images of both kidneys, the extraction system can automatically obtain the starting section of the ureter after executing the method of the first embodiment.
[0062] The extraction system of the initial section of the ureter disclosed in this embodiment has the same technical solution as that in the first embodiment. Please refer to the description in the first embodiment and will not be repeated here.
[0063] Embodiment three:
[0064] Ginseng Figure 5 As shown, this embodiment discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the first embodiment is implemented.
[0065] The computer-readable storage medium disclosed in this embodiment has the same technical solutions as those in Embodiment 1. Please refer to Embodiment 1 and will not be described in detail here.
[0066] Embodiment 4:
[0067] Ginseng Figure 6 As shown, this embodiment discloses a specific implementation method of a method for locating the centroid of a stone in the initial section of the ureter (hereinafter referred to as the "method").
[0068] Ginseng Figure 3 As shown, in this embodiment, the method for locating the centroid of the stone at the beginning of the ureter includes the following steps:
[0069] Step A1: using the method for positioning the initial segment of the ureter described in Example 1 to obtain a CT image B of the initial segment of the ureter; specifically, extracting the CT image B of the position corresponding to the initial segment of the ureter.
[0070] Step A2: Segment image B with a threshold of 100HU, record the stones in image B that are greater than the threshold of 100HU as 1, and record the stones in image B that are less than the threshold of 100HU as 0, and obtain a binary mask image b; specifically, the stones in image B that are greater than the threshold of 100HU.
[0071] Step A3: Use the seed growth algorithm to divide the range of mask value 1 in Figure b into independent regions, and calculate the volume of the independent regions; specifically, divide the continuous region with mask value 1 into independent regions.
[0072] Step A4: If the volume of the independent area is less than 5 cm 3 , it is judged as a stone;
[0073] Step A5: Calculate the centroid of the independent region. The centroid of the independent region is the centroid of the stone, which also determines the coordinates of the stone.
[0074] Through steps A1-A5 of this embodiment, the center of mass and coordinates of the stone are obtained.
[0075] The method for locating the centroid of stones at the starting section of the ureter disclosed in this embodiment has the same technical solution as that in the first embodiment. Please refer to the description in the first embodiment and will not be repeated here.
[0076] Embodiment five:
[0077] Embodiment 5 provides a use, the centroid and coordinates obtained by the method for locating the centroid of the stone at the beginning of the ureter described in Embodiment 4 are used to draw the coordinate points on the ureteral CPR curve. The centroid and coordinates of the stone at the beginning of the ureter are accurately determined, and the centroid and coordinates are used as a key coordinate point on the ureteral CPR curve, providing a basis for accurately and efficiently drawing the CPR curve.
[0078] The purpose disclosed in this embodiment has the same technical solution as that in the fourth embodiment, please refer to the description of the fourth embodiment, and will not be repeated here.
[0079] Embodiment six:
[0080] Ginseng Figure 5 As shown, this embodiment discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in Embodiment 4 is implemented.
[0081] The computer-readable storage medium disclosed in this embodiment has the same technical solutions as those in Embodiment 4. Please refer to Embodiment 4 and will not be described in detail here.
[0082] The various illustrative logic blocks or units described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of the above. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0083] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
[0084] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0085] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A method for extracting the initial segment of the ureter, characterized in that: The following steps are involved: Step S1: taking CT images of both kidneys; Step S2: Segment the CT image with a threshold of 100HU, record the CT image with a value greater than the threshold of 100HU as 1, and record the CT image with a value less than the threshold of 100HU as 0, and obtain a binary mask image (Figure A); Step S3: Determine the centroid of each CT slice image from top to bottom, and select the first CT slice image whose centroid is within the range of y<256 and 150<x<350, which is the lower edge of the rib, and record it as image L; Step S4: segment the image L with a threshold of -10HU, record the values in the image L that are greater than the threshold -10HU as 1, and record the values in the image L that are less than the threshold -10HU as 0, and obtain a binary mask image M, and erode the image M n times to obtain image l; Step S5: Mark the area in Figure 1, the range including the coordinate point (100, 250) is recorded as the first area map l1, and the range including the coordinate point (400, 230) is recorded as the second area map l2; Step S6: Figure 11 and Figure 12 are expanded, and the point where M(i, j)=1 is expanded to obtain cross-sectional views of the two kidneys; Step S7: the cross-sectional images of the two kidneys grow upward and downward respectively, the growth distance is less than 12 cm, the growth threshold is greater than -10HU, and a complete morphological image of the left and right kidneys is obtained, the complete morphological image includes arteries, veins and ureters; Step S8: Detect the thinnest tube using template matching to obtain the starting section of the ureter.
2. The method for extracting the initial section of the ureter as claimed in claim 1, characterized in that: Bones or stones with a threshold value greater than 100HU in CT images.
3. The method for extracting the initial section of the ureter as claimed in claim 1, characterized in that: In Figure L, the tissue with a value greater than the threshold of -10HU is kidney tissue.
4. The method for extracting the initial section of the ureter as claimed in claim 3, characterized in that: In step S4, the basis for corrosion is: M(i, j) = 1, but the periphery of M(i, j) is 0.
5. A system for extracting the initial section of the ureter, characterized in that: It includes a CT image recognition unit, a CT image segmentation unit, a CT image processing unit and a double kidney morphology drawing unit; The extraction system executes the method for extracting the initial section of the ureter as described in any one of claims 1-4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
7. A method for locating the centroid of a stone in the initial section of the ureter, characterized in that: The following steps are involved: Step A1: using the method for locating the initial segment of the ureter as claimed in claim 1 to obtain a CT image B of the initial segment of the ureter; Step A2: segment image B with a threshold of 100HU, record the values of image B that are greater than the threshold of 100HU as 1, and record the values of image B that are less than the threshold of 100HU as 0, and obtain a binary mask image b; Step A3: Use the seed growth algorithm to divide the range with a mask value of 1 in Figure b into independent regions, and calculate the volume of the independent regions; Step A4: If the volume of the independent area is less than 5 cm 3 , it is judged as a stone; Step A5: Calculate the centroid of the independent regions.
8. The method for locating the centroid of a stone in the initial section of the ureter as claimed in claim 7, characterized in that: In step A3, seed growth algorithm: b(i, j)=1 and the periphery of b(i, j) is all 1.
9. The centroid obtained by the method for locating the centroid of the stone in the initial section of the ureter as described in claim 7 or 8 is used to draw the coordinate points on the ureteral CPR curve.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 7 to 8 is implemented.
