A method and system for rib segmentation post-processing
By employing a post-processing method for rib segmentation, using skeleton extraction and energy function correction of connected ribs, the problem of missegmentation or omission in rib segmentation was solved, improving the accuracy of rib segmentation and numbering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG FEITU IMAGING TECH CO LTD
- Filing Date
- 2023-08-30
- Publication Date
- 2026-06-02
Smart Images

Figure CN117196976B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to medical image processing technology, and more particularly to a method and system for post-processing of rib segmentation. Background Technology
[0002] Deep learning technology plays a crucial role in medical artificial intelligence applications. However, deep learning lacks reasoning and analytical capabilities, and its "black box" nature means that its recognition results lack interpretability and the ability to self-correct based on professional knowledge. Therefore, medical image pattern recognition tasks centered on deep learning often require post-processing techniques to correct and supplement recognition defects. Tissue or organ segmentation is a key technological area in precision medicine imaging, and accurate delineation of rib tissue is a crucial processing technique for analyzing chest CT images. Currently, many inventions employ deep learning as a technique for rib semantic segmentation. However, all of these inventions have methodological limitations, failing to effectively handle missegmentation or omissions.
[0003] For example, in the prior art 1: CN112950552B, a chest CT plain scan rib segmentation model was trained by using a convolutional neural network combined with cross-entropy and Dice loss function.
[0004] For example, in existing technology 2: CN114387536A, point cloud data is collected from chest CT plain scans and used as input for deep learning;
[0005] Existing technology 3, CN111915620A, combines two-dimensional and three-dimensional deep learning models to provide more accurate rib segmentation results and numbers the ribs from head to toe. However, these methods cannot correct segmentation errors caused by deep learning. In the rib segmentation problem, adjacent ribs often connect due to segmentation errors, which hinders subsequent labeling of rib numbers.
[0006] For example, in the prior art 4: CN116363210A, a method for locating the connection point based on the gradient extension of the rib centerline is proposed, but the gradient trend at some connection points is still close to the trend of the rib, and the gradient threshold is difficult to define. Summary of the Invention
[0007] This invention addresses the problem that existing rib segmentation techniques cannot effectively handle missegmentation or omissions, and provides a method and system for post-processing of rib segmentation.
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0009] A method for post-rib segmentation processing, the method comprising:
[0010] Step 1. Rib segmentation: The rib image is segmented to obtain the segmented rib image.
[0011] Step 2. Skeleton extraction: Post-process the processed rib image to obtain the processed segmented rib image, and then extract the skeleton from the segmented rib image.
[0012] Step 3. Determining rib connections: The rib lengths of the extracted skeleton are statistically analyzed, and rib connections are determined based on the statistically analyzed skeleton lengths.
[0013] Step 4. Rib Connection Correction: For the rib connection result, the rib connection is corrected by constructing an energy function.
[0014] Preferably, the rib segmentation process includes:
[0015] Step 1.1. Using 100 as the minimum threshold, extract the rib images of all pixels above the threshold range, and determine the connected regions based on the first 5 rib images excluding the background, as candidate regions B0 for bone.
[0016] Step 1.2. Dilate the candidate bone region B0 from Step 1.1 using a sphere with a radius of 3 as the dilation mask to obtain result B1;
[0017] Step 1.3. Use the water-filling method to fill the holes in B1 to obtain the complete bone area B2;
[0018] Step 1.4. Based on the bone region B2, process the original image by setting the value of non-bone regions (i.e., pixels where B2 = 0) in the original image data to -1000 to obtain the processed image. Input the processed image into the pre-trained rib segmentation model to obtain the rib segmentation result R0.
[0019] Preferably, the extraction of the skeleton includes:
[0020] Step 2.1: Binarize the bone region B2 obtained in Step 1.3 and multiply it with the rib segmentation result R0 in Step 1.4 to obtain the three-dimensional rib segmentation result R1.
[0021] Step 2.2: Using a circular mask with radius r1, perform a closing operation on the three-dimensional rib segmentation result R1 obtained in step 2.1 in axial order to obtain the rib segmentation result R2.
[0022] Step 2.3: The rib segmentation result R2 is filled with water in the axial, coronal and sagittal directions to obtain the rib segmentation result R3.
[0023] Step 2.4: Using a circular mask with radius r2, the rib segmentation result R3 is processed by opening operation in axial order to obtain the processed rib segmentation result R4.
[0024] Step 2.5: Mark the connected regions of the rib segmentation results using R4, determine the rib regions, and generate the initial positioning of the 24 ribs;
[0025] Step 2.6, Determination of the initial rib skeleton diagram G1(V,E): The initial rib skeleton diagram G1(V,E) is determined by the rib skeleton of the connected regions.
[0026] Step 2.7, Loop elimination: Loop elimination is performed using the initial rib skeleton graph G1(V,E). For each branch point, a depth-first search is used to detect the loop path in the initial rib skeleton graph G1(V,E). The loop path starts from a branch point. All connection points in the loop path are deleted. A one-to-one connection edge is established between the starting branch point of the loop and the other branch points in the loop to eliminate the loop.
[0027] Step 2.8: Obtaining the rib skeleton map G2(V,E). For each endpoint, collect the distance to the nearest branch point and delete all points from the endpoint with a length less than the threshold ε to the nearest branch point. The deleted points include the endpoints but not the branch points. Recalculate the number of other skeleton points in the 26 neighborhood of the branch point and classify them according to the rules in Step 2.6 to obtain the rib skeleton map G2(V,E).
[0028] Step 2.9: For the rib skeleton of each connected region, repeat steps 2.6 to 2.8 to obtain the skeleton and skeleton graph G of all connected regions. i (V,E),i∈[1,2,…,24].
[0029] As a preferred method, the determination of rib connection includes:
[0030] Step 3.1: Collect rib segmentation results for M cases where ribs are not connected. Based on the skeleton of the 24 ribs extracted in Step 2, calculate the length of each skeleton. i∈[1,2,…,24], then divide by the average rib skeleton length Right now Repeat the example M times to form 24 rib length datasets L = {L m , m∈[1,2,…,M]}, where, in, The relative length of the i-th rib in the segmentation result of the m-th rib;
[0031] Step 3.2: Sort the length dataset of the i-th rib in ascending order, and take the 99th percentile as the base maximum length. Set a length threshold
[0032] Step 3.3: For a chest CT scan showing the rib skeleton region, calculate the length l of the skeleton region of the i-th rib. i With length threshold In comparison, if Then there are adjacent ribs, and the number of connected ribs, n, is calculated. Otherwise, there are no adjacent ribs.
[0033] As a preferred option, modifications to rib connections include:
[0034] Step 4.1: Based on the coronal information, locate the spinal and thoracic lateral regions of the target rib, and extract the endpoints of the spinal and thoracic lateral regions of the rib to form a set of spinal endpoints S = {s1, ..., s...} P} and the set of thoracic vertebral endpoints T = {t1,…,t} Q}; where P is the number of spinal endpoints and Q is the number of thoracic vertebral endpoints;
[0035] Step 4.2, when the set of spinal endpoints S = {s1,…,s…} P} and the set of thoracic vertebral endpoints T = {t1,…,t} Q The target has n ribs connected from the spinal endpoints, S = {s1, ..., s2}. P} and the set of thoracic vertebral endpoints T = {t1,…,t} Q In the rib skeleton graph G2(V,E), n points are selected (n≤P and n≤Q) and paired up. Then, the breadth-first search algorithm is used to calculate the shortest path from the rib skeleton graph G2(V,E). The obtained path {a1,…,a2} is... n} represents the skeleton of each of the n ribs; according to step 3.3, the connected ribs are the i-th to the (i+n-1)-th ribs; the constructed energy function is E:
[0036]
[0037] in, For a j Length, For a j The corresponding rib length threshold, For a j z-axis coordinates of the lateral endpoints of the spine For a j The z-axis coordinate of the lateral endpoint of the thoracic vertebra, where λ is the weight;
[0038] Step 4.3, Traverse and calculate the set of spinal endpoints S = {s1, ..., s2} from Step 4.1. P} and the set of thoracic vertebral endpoints T = {t1,…,t} QWhen combined in pairs, we have Among various combinations, the one that minimizes the energy function E is chosen. The shortest path corresponding to the combination is used as the path of each rib in the connected ribs, which corrects the connected skeletal lines.
[0039] Step 4.4: The rib skeleton line obtained in Step 4.3 is expanded using a spherical core with a radius of r3, and then multiplied with the rib segmentation result R4 from Step 2.4 to complete the rib segmentation result after correcting the connected ribs.
[0040] The acquisition of the preferred initial rib skeleton graph G1(V,E) includes: refining the rib skeleton of a connected region to 1 pixel to obtain the initial rib skeleton; determining the type of each point based on the number of other skeleton points in the 26-neighborhood, where points with 1 other skeleton point in the neighborhood are endpoints; points with 2 other skeleton points are connection points; and points with more than 2 other skeleton points are branch points; thus obtaining the initial rib skeleton graph G1(V,E), where V is a point in the skeleton, and E is the edge between two points, where E is 1 when two points are adjacent, and 0 otherwise.
[0041] To address the aforementioned technical problems, the present invention also provides a system for post-processing of ribs after segmentation, which is implemented by a method for post-processing of ribs after segmentation.
[0042] This invention, by adopting the above technical solutions, has significant technical effects:
[0043] This invention uses statistics and constructs an energy function to locate connected ribs and match the spinal and thoracic ends of the same rib to achieve connected rib correction. Attached Figure Description
[0044] Figure 1 This is a flowchart of the present invention;
[0045] Figure 2 This is a flowchart of the normal rib relative length threshold calculation method of the present invention;
[0046] Figure 3 This is a flowchart of the process for determining and correcting connected ribs according to the present invention;
[0047] Figure 4 This is an example diagram of rib connection according to the present invention. The second and third ribs on the right side of the diagram are connected.
[0048] Figure 5 The single-pixel skeleton of the connected rib before the loop is removed in this invention has multiple branch points due to the existence of the loop.
[0049] Figure 6 This is the skeleton of the connected ribs after the ring is removed in the present invention, exposing the connection path between the two skeleton lines.
[0050] Figure 7 This is a diagram showing the disconnected ribs of the present invention, where two endpoints are matched and the shortest path is connected as the rib skeleton line.
[0051] Figure 8 This is a rendering of the completed rib connection correction of the present invention. The second and third ribs on the right side of the figure have been disconnected. Detailed Implementation
[0052] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0053] Example 1
[0054] Example 1
[0055] There are 500 cases of chest CT plain scans with slice thickness <2mm. The normal rib length threshold set is extracted according to the steps described in this invention.
[0056] Step 1: Perform rib segmentation based on chest CT plain scan.
[0057] Step 1.1: Using HU = +100 as the minimum threshold, extract all pixels above the threshold range and calculate the top 5 connected regions (excluding the background) as candidate regions B0 for bone.
[0058] Step 1.2, expand the candidate region B0 from step 1.1, using a sphere with a radius of 3 as the expansion mask to obtain B1;
[0059] Step 1.3: Use water to fill the holes in B1 to obtain the complete bone area B2.
[0060] Step 1.4: Extract the non-bone regions from the original image data, where B2 = 0 represents non-bone regions; the pixel value is -1000. Input the processed image into the pre-trained rib segmentation model to obtain the rib segmentation result R0.
[0061] Step 2: Post-process the rib segmentation results output in Step 1, process the segmentation results and extract the skeleton;
[0062] Step 2.1: Binarize the bone region B2 obtained in Step 1.3 and multiply it with the model segmentation result R0 in Step 1.4 to obtain the rib segmentation result R1;
[0063] Step 2.2: Using a circular mask with radius r1 = 3, perform a closing operation on the three-dimensional rib segmentation result R1 obtained in step 2.1 according to the axial order to obtain R2;
[0064] Step 2.3: The rib segmentation result R2 obtained in Step 2.2 is filled with water in three directions: axial, coronal and sagittal, to obtain the rib segmentation result R3.
[0065] Step 2.4: Using a circular mask with radius r2 = 2, the rib segmentation result R3 obtained in step 2.3 is processed by opening operation in axial order to obtain the rib segmentation result R4;
[0066] Step 2.5: Mark the connected regions of the rib segmentation results processed in Step 2.4 with R4, select the 1st to the 12th pair of ribs from head to toe, and divide the left and right ribs according to the center position to generate the initial positioning of 24 ribs.
[0067] Step 2.6: For a connected region's rib skeleton, refine it to 1 pixel to obtain the initial rib skeleton. Based on the number of other skeleton points in the 26-neighborhood, determine the type of each point: those with 1 other skeleton point in the neighborhood are endpoints; those with 2 are connection points; and those with more than 2 are branch points. This yields the initial rib skeleton graph G1(V, E), where V represents the points in the skeleton, and E represents whether two points are adjacent (1 for adjacent, 0 for otherwise).
[0068] Step 2.7: For each branch point, use depth-first search to detect the loop path in G1(V,E), delete the connection points in the loop path, and establish a one-to-one connection edge between the starting branch point of the loop and the other branch points in the loop to eliminate the loop.
[0069] Step 2.8: For each endpoint, collect its distance to the nearest branch point, and delete all points from the endpoint with a length less than the threshold ε = 15 to the nearest branch point (including the endpoint, excluding the branch point). Recalculate the number of other skeleton points in the 26 neighborhood of the branch point, classify them according to the rules in Step 2.6, and obtain the rib skeleton map G2(V, E).
[0070] Step 2.9: For the rib skeleton of each connected region, repeat steps 2.6 to 2.8 to obtain the skeleton and skeleton diagram of all connected regions.
[0071] Step 3: Calculate the skeletal length of normal ribs and determine the connectivity of the ribs.
[0072] Step 3.1: Collect 500 cases of rib segmentation without rib connections, extract the skeletons of the 24 ribs in Step 2, and count the length of each skeleton. i∈[1,2,…,24], then divide by the average rib skeleton length of each case. Right now Repeat 500 cases to form 24 rib length datasets L = {L m, m∈[1,2,…,500]}, where
[0073] Step 3.2: Sort the length dataset of the i-th rib in ascending order, and take the 99th percentile as the base maximum length. Set a length threshold The above yields a set of 24 rib length thresholds, which are used to determine the connection status of ribs.
[0074] Example 2
[0075] Based on Example 1, this example presents a chest CT scan with a slice thickness of 1.25 mm. The skeleton of all ribs has been extracted according to steps 1 and 2 in Example 1, and the rib skeleton image G2(V, E) has been obtained. The steps described in this invention are used to determine which ribs are connected and correct them.
[0076] Step 1: Perform rib segmentation based on a plain chest CT scan;
[0077] Step 1.1: Using HU = +100 as the minimum threshold, extract all pixels above the threshold range and calculate the top 5 connected regions (excluding the background) as candidate regions B0 for bone.
[0078] Step 1.2, expand the candidate region B0 from step 1.1, using a sphere with a radius of 3 as the expansion mask to obtain B1;
[0079] Step 1.3: Use water to fill the holes in B1 to obtain the complete bone area B2.
[0080] Step 1.4: Extract the non-bone regions from the original image data, where B2 = 0 represents non-bone regions; the pixel value is -1000. Input the processed image into the pre-trained rib segmentation model to obtain the rib segmentation result R0.
[0081] Step 2: Post-process the rib segmentation results output in Step 1, process the segmentation results and extract the skeleton;
[0082] Step 2.1: Binarize the bone region B2 obtained in Step 1.3 and multiply it with the model segmentation result R0 in Step 1.4 to obtain the rib segmentation result R1;
[0083] Step 2.2: Using a circular mask with radius r1 = 3, perform a closing operation on the three-dimensional rib segmentation result R1 obtained in step 2.1 according to the axial order to obtain R2;
[0084] Step 2.3: The rib segmentation result R2 obtained in Step 2.2 is filled with water in three directions: axial, coronal and sagittal, to obtain the rib segmentation result R3.
[0085] Step 2.4: Using a circular mask with radius r2 = 2, the rib segmentation result R3 obtained in step 2.3 is processed by opening operation in axial order to obtain the rib segmentation result R4;
[0086] Step 2.5: For the rib segmentation results processed in Step 2.4, mark the connected regions with R4. Select the 1st to 12th pairs of ribs from head to toe, and divide the ribs into left and right sides according to their center positions, generating the initial location of 24 ribs, as shown below. Figure 4 As shown;
[0087] Step 2.6: For a connected region's rib skeleton, refine it to 1 pixel to obtain the initial rib skeleton. Based on the number of other skeleton points in the 26-neighborhood, determine the type of each point: those with 1 other skeleton point in the neighborhood are endpoints; those with 2 are connection points; and those with more than 2 are branch points. This yields the initial rib skeleton image G1(V, E), where V represents the points in the skeleton, and E represents whether two points are adjacent (1 for adjacent, 0 for otherwise). Figure 5 As shown;
[0088] Step 2.7: For each branch point, use depth-first search to detect the loop path in G1(V,E), delete the connection points in the loop path, and establish a one-to-one connection edge between the starting branch point of the loop and the other branch points in the loop to eliminate the loop.
[0089] Step 2.8: For each endpoint, collect its distance to the nearest branch point, and delete all points (including the endpoint, excluding the branch point) from the endpoint with a length less than the threshold ε = 15 to the nearest branch point. Then, recalculate the number of other skeleton points within the 26-neighborhood of that branch point, classify them according to the rules in Step 2.6, and obtain the rib skeleton map G2(V, E), as shown below. Figure 6 As shown;
[0090] Step 2.9: For the rib skeleton of each connected region, repeat steps 2.6 to 2.8 to obtain the skeleton and skeleton diagram of all connected regions.
[0091] Step 3: Calculate the length of each rib skeleton in this case and determine the connection between the rib and the corresponding rib length threshold set.
[0092] Step 3.1: Add up the lengths of all rib skeletons, divide by 24 to get the relative length of each rib, and set the length of any missing ribs to 0.
[0093] Step 3.2, calculate the length l of the skeletal region of the i-th rib in the current case. i and contrast, It was found that the second rib is connected, that is, the second and third ribs are connected;
[0094] Step 4: For the second and third connected ribs detected in Step 3, construct an energy function to remove the rib connections.
[0095] Step 4.1: Locate the spinal and thoracic lateral regions of the target rib based on the coronal information, and extract the endpoints of these two regions to form the spinal endpoint set S = {s1, s2, s3, s4} and the thoracic endpoint set T = {t1, t2, t3}.
[0096] Step 4.2: Given that the current target has two connected ribs, the task can be transformed into selecting two points from S and T, pairing them up, and then using a breadth-first search algorithm to calculate the shortest path from the rib skeleton graph G2(V, E). The obtained paths {a1, a2} represent the skeletons of the two ribs. According to step 3.3, the connected ribs are the 3rd and 4th ribs. Therefore, the following energy function is constructed.
[0097] in, Let a1 be the length of a1. For a j The corresponding rib length threshold, For a j z-axis coordinates of the lateral endpoints of the spine For a j The z-axis coordinate of the lateral endpoint of the thoracic vertebra.
[0098] Step 4.3: Iterate through and calculate all pairwise combinations of sets S and T mentioned in Step 4.1, totaling... Given a combination of ribs, select the one with the smallest energy function E. Use the shortest path corresponding to this combination as the path for each of the two connected ribs; this is the skeletal line of that rib. For example... Figure 7 As shown.
[0099] Step 4.4: Expand the rib skeleton line using a spherical core with radius r3 = 9, then multiply it with the rib segmentation result from Step 2.4 to obtain the rib segmentation result after dividing the connected ribs, thus completing the correction. Figure 8 As shown.
[0100] Example 3
[0101] Based on the above embodiments, this embodiment is a system for post-processing of ribs after segmentation.
Claims
1. A method for post-rib segmentation processing, the method comprising: Step 1. Rib segmentation: The rib image is segmented to obtain the segmented rib image. Step 2. Skeleton extraction: Post-process the segmented rib image to obtain the processed segmented rib image, and extract the skeleton from the segmented rib image. Step 3. Determining rib connections: The rib lengths of the extracted skeleton are statistically analyzed, and rib connections are determined based on the statistically analyzed skeleton lengths. Step 4. Rib connection correction: For the rib connection result, the rib connection is corrected by constructing an energy function; When the spinal endpoint set and thoracic vertebral endpoints The target consists of n connected ribs, starting from the set of the spinal endpoints. and thoracic vertebral endpoints Choose n points from each of the following: After pairing them up, a breadth-first search algorithm is used to search the rib skeleton map. Calculate the shortest path, where V is a node in the skeleton and E is the edge between two nodes; the obtained path... That is, the skeleton of each of the n ribs; for connected ribs, it is the nth rib. To the Root rib; the constructed energy function is E: ; in, for Length, for The corresponding rib length threshold, for z-axis coordinates of the lateral endpoints of the spine for z-axis coordinates of the lateral endpoints of the thoracic vertebrae As weight.
2. The method for post-processing of ribs according to claim 1, characterized in that, The rib segmentation process includes: Step 1.
1. Using HU=+100 as the minimum threshold, extract all pixels above the threshold range, and calculate the top 5 connected regions (excluding the background) as candidate regions B0 for bone. Step 1.
2. Dilate the candidate bone region B0 from Step 1.1 using a sphere with a radius of 3 as the dilation mask to obtain result B1; Step 1.
3. Use the water-filling method to fill the holes in B1 to obtain the complete bone area B2; Step 1.
4. Based on the bone region B2, process the original image by setting the pixel value of the non-bone region (i.e., B2=0) in the original image data to -1000 to obtain the processed image. Input the processed image into the pre-trained rib segmentation model to obtain the rib segmentation result R0.
3. The method for post-processing of ribs according to claim 1, characterized in that, Skeleton extraction includes: Step 2.1: Binarize the bone region B2 obtained in Step 1.3 and multiply it with the rib segmentation result R0 in Step 1.4 to obtain the three-dimensional rib segmentation result R1. Step 2.2: Using a circular mask with radius r1, perform a closing operation on the three-dimensional rib segmentation result R1 obtained in step 2.1 in axial order to obtain the rib segmentation result R2. Step 2.3: The rib segmentation result R2 is filled with water in the axial, coronal and sagittal directions to obtain the rib segmentation result R3. Step 2.4: Using a circular mask with radius r2, the rib segmentation result R3 is processed by opening operation in axial order to obtain the processed rib segmentation result R4. Step 2.5: Mark the connected regions of the rib segmentation results using R4, determine the rib regions, and generate the initial positioning of the 24 ribs; Step 2.6, Initial Rib Skeleton Diagram The determination is made by generating an initial rib skeleton diagram through the rib skeleton of the connected regions. The determination; Step 2.7, Loop elimination, based on the initial rib skeleton diagram. To eliminate loops, a depth-first search is used to detect the initial rib skeleton at each branch point. The loop path exists in the loop path. The loop path starts with a branch point. Delete all the connection points in the loop path and establish a one-to-one connection edge between the starting branch point of the loop and the other branch points in the loop to eliminate the loop. Step 2.8, Rib skeleton diagram To obtain the distance to the nearest branch point for each endpoint, select the branch with a length less than a threshold. Delete all points from the endpoint to the nearest branch point, where, The value is 15; the deleted points include endpoints but not branch points, and the number of other skeleton points in the 26-neighborhood of the branch point is recalculated. The points are then classified according to the rules in step 2.6 to obtain the rib skeleton diagram. ; Step 2.9: For the rib skeleton of each connected region, repeat steps 2.6 to 2.8 to obtain the skeleton and skeleton diagram of all connected regions. , .
4. The method for post-processing of ribs according to claim 1, characterized in that, The determination of rib connection includes: Step 3.1, collecting the rib segmentation results of M cases without rib connection, and calculating the length of each rib skeleton according to the 24 rib skeletons extracted in Step 2. , Divide by the average ribcage length ,Right now Repeat the example M times to form 24 rib length datasets L with a data size of M. ,in, , The relative length of the i-th rib in the segmentation result of the m-th rib; Step 3.2: Sort the length dataset of the i-th rib in ascending order, and take the 99th percentile as the base maximum length. Set a length threshold , ; Step 3.3, for a chest CT scan showing the rib-connected skeletal region, its first... The relative length H of the rib skeleton i With length threshold In comparison, if If there are connected ribs, then the number of connected ribs, n, is calculated. Otherwise, there would be no rib connection.
5. A method for post-processing of ribs according to claim 1, characterized in that, Corrections for rib connection include: Step 4.1: Based on the coronal information, locate the spinal lateral region and thoracic lateral region of the target rib, and extract the endpoints P of the spinal lateral region and Q of the thoracic lateral region of the rib to form a set of spinal endpoints. and thoracic vertebral endpoints ; Step 4.2, Traverse and calculate the set of spinal endpoints from Step 4.1 and thoracic vertebral endpoints When combined in pairs, then... Among various combinations, the one that minimizes the energy function E is chosen. The shortest path corresponding to the combination is used as the path of each rib in the connected ribs, which corrects the connected skeletal lines. Step 4.3: The rib skeleton line obtained in Step 4.2 is expanded using a spherical core with a radius of r3, and then multiplied with the rib segmentation result R4 to complete the rib segmentation result after correcting the connected ribs.
6. A method for post-processing of ribs according to claim 3, characterized in that, Initial rib skeleton diagram The acquisition process includes refining the rib skeleton of a connected region to 1 pixel to obtain the initial rib skeleton; determining the type of each point based on the number of other skeleton points in the 26-neighborhood, where points with 1 other skeleton point in the neighborhood are endpoints; points with 2 other skeleton points are connection points; and points with more than 2 other skeleton points are branch points; thus obtaining the initial rib skeleton image. In this context, V represents a point in the skeleton, and E represents the edge between two points. E is 1 when the two points are connected, and 0 otherwise.
7. A system for post-processing of ribs after segmentation, characterized in that, The system implemented by the method for post-rib segmentation processing according to any one of claims 1-6 includes: The rib segmentation module performs segmentation processing on the rib image to obtain the segmented rib image. The skeleton extraction module performs post-processing on the segmented rib images to obtain processed segmented rib images, and then extracts the skeleton from the segmented rib images. The rib connection determination module calculates the rib length of the extracted skeleton and determines the rib connection based on the calculated skeleton length. The rib connection correction module corrects the rib connection results by constructing an energy function. When the spinal endpoint set and thoracic vertebral endpoints The target consists of n connected ribs, starting from the set of the spinal endpoints. and thoracic vertebral endpoints Choose n points from each of the following: After pairing them up, a breadth-first search algorithm is used to search the rib skeleton map. Calculate the shortest path, where V is a node in the skeleton and E is the edge between two nodes; the obtained path... That is, the skeleton of each of the n ribs; for connected ribs, it is the nth rib. To the Root rib; the constructed energy function is E: ; in, for Length, for The corresponding rib length threshold, for z-axis coordinates of the lateral endpoints of the spine for z-axis coordinates of the lateral endpoints of the thoracic vertebrae As weight.