Lung model acquisition device, method, electronic device and storage medium
By performing branch extension and convex hull treatment on the tracheal tree, combined with regional growth technology, the problem of uneven boundaries of the lung sub-segment in the lung model is solved, and the boundaries of the generated lung model are smoother, improving the accuracy of diagnosis.
Patent Information
- Application Number
- CN202210217258.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-03-07
AI Technical Summary
In the lung model obtained in the prior art, large protrusions and striped areas appear on the boundary of the lung sub-segment, which violates the human lung growth pattern and leads to inaccurate diagnosis.
By performing branch extension treatment and convex hull treatment on the basis of the tracheal tree, combined with regional growth technology, a uniform transition lung model is constructed, and boundary protrusions and striped areas caused by uneven tracheal growth are avoided.
The problem of uneven transition of the lung sub-segment boundary on the surface of the lung model is effectively solved, and the boundary of the generated lung model is smoother, in line with the human lung growth law, and improving the accuracy of diagnosis.
Smart Images

Figure CN114565599B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer graphics processing, and in particular to a lung model acquisition device, method, electronic device and storage medium. Background Art
[0002] Computed Tomography (CT) uses precisely collimated X-ray beams, gamma rays, ultrasound, etc., together with highly sensitive detectors to perform cross-sectional scans around a certain part of the human body. It has the characteristics of fast scanning time and clear images. It is currently known as the most common imaging method for diagnosing and evaluating lung diseases. In order to provide doctors with reliable diagnostic data to detect and treat patients' conditions as early as possible, it is necessary to obtain lung data through CT images, annotate the lung data, and then build a lung model based on the annotated lung data.
[0003] At present, the trachea data corresponding to the lung subsegment is usually directly grown in regions. The lung model after regional growth includes multiple lung subsegments of different colors, and different lung subsegments can be distinguished by color. In the case of normal growth of human lungs, the boundaries of lung subsegments should be smooth, without obvious protrusions or strip-shaped areas. However, in the lung model obtained by the above method, large protrusions and strip-shaped areas will appear at the edges of the lung subsegments, which is inconsistent with the growth law of human lungs. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a lung model acquisition device, method, electronic device and storage medium to solve the problem of uneven transition of lung subsegment boundaries on the surface of the lung model.
[0005] In a first aspect, an embodiment of the present application provides a lung model acquisition device, comprising:
[0006] A data acquisition module, used to acquire lung segment data of multiple lung segments, each lung segment includes multiple lung subsegments, each lung segment data includes multiple lung subsegment data, and each lung subsegment data includes trachea data and color identification;
[0007] An extraction module, for inputting, for each lung subsegment, tracheal data corresponding to the lung subsegment into a tracheal tree extraction model, and obtaining a color-labeled tracheal tree corresponding to the lung subsegment, wherein the tracheal tree includes multiple branches;
[0008] A processing module, used for performing branch extension processing and convex hull processing on a target branch of each tracheal tree, and obtaining a lung subsegment model to be grown of a lung subsegment corresponding to the tracheal tree;
[0009] A growing module is used to perform regional growing on multiple lung subsegment models to be grown in each lung segment at the same time to obtain a lung segment model of the lung segment;
[0010] The model building module is used to combine the lung segment models of multiple lung segments to obtain a lung model.
[0011] Optionally, the processing module is also used to: obtain multiple branch endpoints in the tracheal tree, the tracheal tree includes multiple branch endpoints; for each branch endpoint, determine whether the branch type to which the branch corresponding to the branch endpoint belongs meets the extension requirements; if the branch type meets the extension requirements, determine the branch corresponding to the branch endpoint as the target branch.
[0012] Optionally, the target branch includes multiple processing modules, including: a branch extension unit, used to perform multiple branch extension processing on each target branch until the distance between the target branch and the lung epidermis is less than a preset length, and the lung epidermis is determined based on the lung subsegment data corresponding to the target branch; a convex hull processing unit, used to perform convex hull processing on the tracheal tree after the branch extension processing, and obtain the lung subsegment model to be grown corresponding to the lung subsegment.
[0013] Optionally, the branch extension unit includes: an extension subunit, used to perform branch extension processing on the target branch with a preset length; a distance judgment subunit, used to determine whether the distance between the branch endpoint of the target branch and the lung epidermis is less than a preset length after the branch extension processing with a preset length; a loop subunit, used to return to execute the extension subunit if the distance between the target branch and the lung epidermis is not less than the preset length; and an end subunit, used to end the branch extension processing of the target branch if the distance between the target branch and the lung epidermis is less than the preset length.
[0014] Optionally, the tracheal tree includes multiple connection points; the extension subunit is specifically used to: select a preset number of connection points closest to the branch endpoint of the target branch as the target connection points; determine the point corresponding to the coordinate mean of the preset number of target connection points as the starting point; determine the direction of the extension line starting from the starting point and passing through the branch endpoint of the target branch as the target direction; starting from the branch endpoint of the target branch, extend the target branch by a preset length along the target direction.
[0015] Optionally, the branch extension unit also includes a pruning processing subunit; the pruning processing subunit is used to: obtain the branch length of the target branch before extension and the branch length after extension; determine the extension ratio of the target branch based on the branch length before extension and the branch length after extension; select a branch to be pruned from the target branch based on the extension ratio; and perform pruning on the branch to be pruned.
[0016] Optionally, the model building module is specifically used to: combine multiple lung segment models together to obtain a lung model to be smoothed; for each pixel point on the lung model to be smoothed, adjust the color of the pixel point based on the color of the target pixel point, the target pixel point is a set number of target pixels around the pixel point, to obtain the lung model of the lung subsegment.
[0017] In a second aspect, an embodiment of the present application further provides a method for obtaining a lung model, the method comprising:
[0018] Acquire lung segment data of multiple lung segments, each lung segment includes multiple lung subsegments, each lung segment data includes multiple lung subsegment data, and each lung subsegment data includes trachea data and a color identifier;
[0019] For each lung subsegment, the tracheal data corresponding to the lung subsegment is input into the tracheal tree extraction model to obtain a tracheal tree with color marking corresponding to the lung subsegment, wherein the tracheal tree includes multiple branches;
[0020] Perform branch extension processing and convex hull processing on the target branch of each tracheal tree to obtain a lung subsegment model to be grown for the lung subsegment corresponding to the tracheal tree;
[0021] For each lung segment, regional growing is performed on multiple lung subsegment models to be grown in the lung segment at the same time to obtain a lung segment model of the lung segment;
[0022] The segment models of multiple lung segments are combined together to obtain a lung model.
[0023] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and when the machine-readable instructions are executed by the processor, the steps of the lung model acquisition method as described above are performed.
[0024] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the lung model acquisition method as described above are executed.
[0025] The embodiments of the present application bring the following beneficial effects:
[0026] The embodiments of the present application provide a lung model acquisition device, method, electronic device and storage medium, which can avoid the appearance of large protrusions and strip-shaped areas at the lung subsegment boundary after regional growth due to the rapid growth of thick trachea and slow growth of thin trachea in a single lung subsegment by performing convex hull processing and regional growth on the basis of the tracheal tree. At the same time, by first performing branch extension processing on the target branch and then performing convex hull processing on the target branch, the appearance of large protrusions and strip-shaped areas at the lung subsegment boundary after regional growth due to the rapid growth of long trachea and slow growth of short trachea is avoided. Compared with the lung model acquisition device in the prior art, the problem of uneven transition of lung subsegment boundaries on the surface of the lung model is solved.
[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A schematic diagram of the structure of a lung model acquisition device provided in an embodiment of the present application is shown;
[0030] Figure 2 A schematic diagram of a lung subsegmental tracheal tree provided in an embodiment of the present application is shown;
[0031] Figure 3 A schematic diagram showing a tracheal tree branch point provided in an embodiment of the present application is shown;
[0032] Figure 4 A schematic diagram showing an extension line of a branch extension process provided in an embodiment of the present application is shown;
[0033] Figure 5 A flow chart of a lung model acquisition method provided in an embodiment of the present application is shown;
[0034] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0036] It is worth noting that before the present application was proposed, computed tomography (CT) uses precisely collimated X-ray beams, gamma rays, ultrasound, etc., together with highly sensitive detectors to perform cross-sectional scans one after another around a certain part of the human body. It has the characteristics of fast scanning time and clear images. It is currently known as the most common imaging method for diagnosing and evaluating lung diseases. In order to provide doctors with reliable diagnostic data to detect and treat patients' conditions as early as possible, it is necessary to obtain lung data through CT images, annotate the lung data, and then build a lung model based on the annotated lung data. At present, it is usually necessary to directly grow the trachea data corresponding to the lung subsegment. The lung model after regional growth includes multiple lung subsegments of different colors, and different lung subsegments can be distinguished by color. In the case of normal growth of human lungs, the boundaries of lung subsegments should be smooth, without obvious protrusions or strip-shaped areas, but in the lung model obtained by the above method, large protrusions and strip-shaped areas will appear at the edges of the lung subsegments, which is inconsistent with the growth law of human lungs.
[0037] Based on this, an embodiment of the present application provides a lung model acquisition device to make the transition of lung sub-segment boundaries on the surface of the lung model uniform.
[0038] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a lung model acquisition device provided in an embodiment of the present application. Figure 1 As shown, the lung model acquisition device 100 provided in the embodiment of the present application includes: a data acquisition module 101, an extraction module 102, a processing module 103, a growth module 104 and a model construction module 105.
[0039] The data acquisition module 101 is used to acquire lung segment data of multiple lung segments.
[0040] Specifically, a lung segment may refer to a certain area in the lung. The human lung is divided into a left lung and a right lung. The left lung and the right lung each include multiple lung segments, and each lung segment includes multiple lung subsegments.
[0041] A lung subsegment may refer to a certain area within a lung segment. Whether the boundary between a lung subsegment and another adjacent lung subsegment is evenly transitioned can serve as a basis for doctors to diagnose the patient's lung health. Therefore, it is necessary to construct a lung model with even boundary transitions between lung subsegments.
[0042] The lung model may refer to a simulation model of the lungs, and the lung model is used to simulate the lung structure of a certain patient. The lung model includes multiple lung segment models, and each lung segment model includes multiple lung subsegment models.
[0043] The lung model can be constructed by using multiple lung segment data, each lung segment data includes multiple lung sub-segment data, and each lung sub-segment data includes trachea data and color identification.
[0044] The tracheal data may refer to the structural data of the trachea contained in the lung subsegment. The tracheal data is used to determine information such as the color, shape, position, and thickness of the trachea.
[0045] The color of the trachea can be determined by color identification. The color identification is used to distinguish the identification data of the trachea corresponding to different lung subsegments. As an example, the color identification can be a digital label or text. Taking the color identification as a digital label as an example, different numbers represent different colors. For example, the number 1 can represent red, the number 2 can represent blue, and so on.
[0046] In an embodiment of the present application, the data acquisition module 101 receives externally input labeled lung segment data, and then extracts lung subsegment data and tracheal data corresponding to the lung subsegment from the lung segment data. The lung subsegment data and tracheal data both include identification data, and the lung subsegment data and the tracheal data corresponding to the lung subsegment are matched together through the identification data, wherein the identification data can be a color identification or a number. Taking the identification data as a color identification as an example, the lung subsegment data including the color identification 3 in multiple lung segment data can be matched with the tracheal data also having the color identification 3 to determine the tracheal data corresponding to the lung subsegment data.
[0047] The extraction module 102 is used to input the tracheal data corresponding to each lung subsegment into the tracheal tree extraction model to obtain the tracheal tree with color marking corresponding to the lung subsegment, wherein the tracheal tree includes multiple branches.
[0048] Specifically, the tracheal tree extraction model may refer to a skeleton extraction model. Exemplarily, the tracheal tree extraction model may be a Skeleton model.
[0049] In the embodiment of the present application, the tracheal structure in the lung subsegment is represented in the form of a tracheal tree, which can eliminate the difference in thickness between different tracheas. At the same time, the extracted tracheal tree has a color mark to distinguish the tracheal trees corresponding to different lung subsegments.
[0050] Refer to the following Figure 2 Let’s introduce the pulmonary subsegmental tracheal tree.
[0051] Figure 2 A schematic diagram of a lung subsegmental tracheal tree provided in an embodiment of the present application is shown.
[0052] like Figure 2 As shown, the tracheal tree is represented by a tree-like graph, in which a branch corresponds to a bronchus in a lung subsegment. The tracheal tree may include multiple branches, and the length of each branch corresponds to the actual length of the trachea of the patient's lung subsegment, but the thickness is the same. Each branch of the tracheal tree includes multiple branch points, and the more branch points, the longer the branch.
[0053] The processing module 103 is used to perform branch extension processing and convex hull processing on the target branch of each tracheal tree to obtain a lung subsegment model to be grown of the lung subsegment corresponding to the tracheal tree.
[0054] Specifically, although the tracheal tree includes multiple branches, not all branches are suitable for branch extension processing. There are two types of branches that are not suitable for branch extension processing, one type is the root branch of the tracheal tree, and the other type is the short branch.
[0055] The above two types of branches are short and need to be extended over a long distance, which not only increases the amount of calculation, but also causes inaccurate positioning of the branch extension direction due to the small amount of available reference data for the short branches. Therefore, branches other than the above two types of branches can be selected as target branches, and branch extension processing can be performed on the target branches.
[0056] In an optional embodiment, the processing module 103 is also used to: obtain multiple branch endpoints in the tracheal tree, the tracheal tree includes multiple branch endpoints; for each branch endpoint, determine whether the branch type to which the branch corresponding to the branch endpoint belongs meets the extension requirements; if the branch type meets the extension requirements, determine the branch corresponding to the branch endpoint as the target branch.
[0057] Here, the branch points of the branches include the following types: branch endpoints, intersection points, and connection points.
[0058] The branch endpoint may refer to the endpoint of the two endpoints of the branch that is not shared with other branches, and there is only one adjacent branch point around the branch endpoint on the branch where the branch endpoint is located.
[0059] The intersection point may refer to the intersection point of multiple branches, and there are at least three adjacent branch points around the intersection point on the branch where the intersection point is located.
[0060] The connection point may refer to a branch point between a branch endpoint and an intersection point, and there are two adjacent branch points around the connection point on the branch where the connection point is located.
[0061] Refer to the following Figure 3 Let's introduce the branch points on the branches.
[0062] Figure 3 A schematic diagram of a tracheal tree branch point provided in an embodiment of the present application is shown.
[0063] like Figure 3 As shown, the tracheal tree includes branches 210, 220, 230, 240, 250, 260 and 270, wherein the branch endpoint of branch 210 is branch point 211, the branch endpoint of branch 220 is branch point 221, the branch endpoint of branch 230 is branch point 231, the branch endpoint of branch 240 is branch point 241, the branch endpoint of branch 250 is branch point 251, the branch endpoint of branch 260 is branch point 261, and there is no branch endpoint on branch 270, and there are only connection points and bifurcation points on branch 270.
[0064] The branch point 271 is a bifurcation point, and the branches where it is located are the branch 230 , the branch 240 , and the branch point 271 is the intersection of the branches 230 , the branch 240 , and the branch 270 .
[0065] The branch point 212 is a connection point, and the branch where the branch point is located is 210. There are two branch points around the branch point 212, namely, the branch point 211 and the branch point 213.
[0066] In an embodiment of the present application, branch points 211, 221, 231, 241, 251 and 261 in the tracheal tree are obtained, and for branches 210, 220, 230, 240, 250 and 260 corresponding to the above branch points, it is determined for each of the above branches whether the branch is a short branch or a root branch. If the branch is a short branch or a root branch, it is determined that the branch does not meet the extension requirement. If the branch is not a short branch or a root branch, the branch is determined as a target branch.
[0067] Root branches may refer to branches that are at the root of the tracheal tree and, therefore, do not need to be extended.
[0068] A short branch may refer to a branch with a shorter length. Since the number of branch points on a short branch is small, it is inaccurate to determine the extension direction based on the branch points. Therefore, the short branch is not extended.
[0069] Here, whether a branch is a root branch or a short branch can be determined in the following way: obtain the branch endpoint of the branch, take the branch endpoint as the center of the circle, and determine whether there is a bifurcation point on the branch in a space with a radius of R. If there is a bifurcation point, it indicates that the branch is a root branch or a short branch. It should be pointed out that the length of the radius R determines the length of the branch. The smaller the radius R, the shorter the branch, and the less suitable it is for branch extension processing.
[0070] Secondly, the root trachea in the trachea data may be marked, and the branch corresponding to the root trachea may be determined as the root branch according to the root mark.
[0071] In an optional embodiment, the processing module includes: a branch extension unit, which is used to perform multiple branch extension processes on each target branch until the distance between the target branch and the lung epidermis is less than a preset length, and the lung epidermis is determined based on the lung subsegment data corresponding to the target branch; a convex hull processing unit, which is used to perform convex hull processing on the tracheal tree after the branch extension process to obtain a lung subsegment model to be grown corresponding to the lung subsegment.
[0072] Here, the lung epidermis may refer to the surface of the lung model, and the lung epidermis is used to determine the distance of branch extension. The lung segment data includes lung contour data corresponding to each lung subsegment, and the position of the lung epidermis can be determined according to the lung contour data.
[0073] Convex Hull is a concept in computational geometry (graphics). In a real vector space V, for a given set X, the intersection S of all convex sets that contain X is called the convex hull of X. The convex hull of X can be constructed using the linear combination of all points in X (X1...Xn). In a two-dimensional Euclidean space, the convex hull can be imagined as a polygon that just encloses all points, such as Figure 1 In three-dimensional space, the convex hull can be imagined as a polyhedron that exactly encloses all the points.
[0074] In the present application, the convex hull processing is performed in three-dimensional space. The process of the convex hull processing is: select the branch endpoints of multiple target branches that have been processed by branch extension, connect every three branch endpoints to determine a face, so that a polyhedron can be constructed through multiple faces. The polyhedron is the lung subsegment model to be grown corresponding to the lung subsegment. Since the convex hull processing belongs to the prior art, the detailed process of the convex hull processing will not be repeated in this application.
[0075] In the embodiment of the present application, assuming that there are a total of 5 target branches numbered 1 to 5 in a certain lung subsegment, the target branch numbered 1 is first subjected to branch extension processing until the distance between the target branch numbered 1 and the lung epidermis is less than a preset length, and then the target branch numbered 2 is subjected to branch extension processing until the distance between the target branch numbered 1 and the lung epidermis is less than a preset length, and so on. After the branch extension processing is performed on these 5 target branches, the convex hull processing is performed on the tracheal tree after the branch extension processing, and the lung subsegment model to be grown corresponding to the lung subsegment can be obtained.
[0076] In an optional embodiment, the branch extension unit includes: an extension subunit, which is used to perform branch extension processing on the target branch by a preset length; a distance judgment subunit, which is used to determine whether the distance between the branch endpoint of the target branch and the lung epidermis is less than a preset length after the branch extension processing by a preset length; a loop subunit, which is used to return to execute the extension subunit if the distance between the target branch and the lung epidermis is not less than the preset length; and an end subunit, which is used to end the branch extension processing of the target branch if the distance between the target branch and the lung epidermis is less than the preset length.
[0077] Here, first, a graphic coordinate system is constructed. The graphic coordinate system is a three-dimensional coordinate system. Each branch point of the tracheal tree has corresponding coordinates in the graphic coordinate system. Assume that the initial coordinates of the branch endpoint of the target branch numbered 1 in the tracheal tree are [10.8, 0, 0]. The process of multiple branch extension processing is: when performing the first branch extension processing, it is first extended by 0.8 pixels. After the first extension processing, the coordinates of the branch endpoint are [11.6, 0, 0]. At this time, it is determined whether there is a lung epidermis point in the neighborhood of the point [11, 0, 0] after the first extension processing and rounding down. If there is no lung epidermis point, the second branch extension processing is performed, and then extended by 0.8 The coordinates of the branch endpoint after the pixel is [12.4, 0, 0]. At this time, it is determined whether there is a lung epidermis point in the neighborhood of the point [12, 0, 0] after the second extension process and rounding down. If there is no lung epidermis point, the third branch extension process is performed. After the third extension of 0.8 pixels, the coordinates of the branch endpoint are [13.2, 0, 0]. At this time, it is determined whether there is a lung epidermis point in the neighborhood of the point [13, 0, 0] after the third extension process and rounding down. If there is a lung epidermis point, the branch extension process is terminated, and the point [12, 0, 0] after the second branch extension process and rounding down is used as the branch endpoint after the final branch extension. Among them, the range of the neighborhood is a 3×3 cube array composed of 27 sub-cubes with a side length of 1 pixel, and the branch endpoint after each extension process is located in the central sub-cube of the cube array.
[0078] In an optional embodiment, the tracheal tree includes multiple connection points; the extension subunit is specifically used to: select a preset number of connection points closest to the branch endpoint of the target branch as the target connection point; determine the point corresponding to the coordinate mean of the preset number of target connection points as the starting point; determine the direction of the extension line starting from the starting point and passing through the branch endpoint of the target branch as the target direction; and start from the branch endpoint of the target branch, and extend the target branch by a preset length along the target direction.
[0079] Refer to the following Figure 4 Let's introduce the processing of single branch extension.
[0080] Figure 4 A schematic diagram of an extension line of a branch extension process provided in an embodiment of the present application is shown.
[0081] like Figure 4 As shown, taking the branch extension processing of the branch corresponding to the branch endpoint 301 as an example, the first five connection points closest to the branch endpoint 301 are selected as the target connection points, and the five target connection points are the branch point 302, branch point 303, branch point 304, branch point 312, and branch point 313 in the circle. Here, since the branch point 311 is a branch endpoint, it cannot be used as a target connection point. Although the branch point 314 is a connection point, it is not the first five nearest connection points, so the branch point 314 cannot be used as a target connection point. Then, the point 320 corresponding to the coordinate mean of the five target connection points is determined as the starting point, and the direction of the extension line 330 starting from the point 320 and passing through the branch endpoint 301 is determined as the target direction, wherein the vector from the point 320 to the branch endpoint 301 is used as the target direction vector, and the branch extension processing is performed according to the target direction vector, that is, starting from the branch endpoint 301, the target branch is extended by a preset length along the direction pointed by the extension line 330.
[0082] In an optional embodiment, the branch extension unit also includes a pruning processing subunit; the pruning processing subunit is used to: obtain the branch length of the target branch before extension and the branch length after extension; determine the extension ratio of the target branch based on the branch length before extension and the branch length after extension; select the branch to be pruned from the target branch based on the extension ratio; and perform pruning processing on the branch to be pruned.
[0083] Here, assuming that the branch length of the target branch before extension is 10 pixels, the branch length after extension is 30 pixels, and the extension ratio threshold is 1.5, the calculated extension ratio is (30-10) / 10=2. The extension ratio threshold can be used to determine whether the target branch is to be pruned. If it is greater than the extension ratio threshold, it is to be pruned. Since the extension ratio 2 is greater than the extension ratio threshold 1.5, the target branch is to be pruned. The purpose of pruning the branches to be pruned is to prevent the overlap and intersection between the extended target branches and reduce the mutual influence between the tracheae.
[0084] In addition, target branches with overlapping intersections may be selected as branches to be pruned, and then pruning may be performed on the selected branches to be pruned.
[0085] The growing module 104 is used to perform regional growing on multiple lung subsegment models to be grown in each lung segment at the same time to obtain a lung segment model of the lung segment.
[0086] Specifically, region growing refers to the process of growing groups of pixels or regions into larger regions. Starting from a set of seed points, regions are grown from these points by merging neighboring pixels with similar properties to each seed point, such as intensity, grayscale, texture color, etc., into this region.
[0087] In an embodiment of the present application, each lung segment includes multiple lung subsegment models to be grown, and the points on the polyhedron corresponding to each lung subsegment model to be grown are used as seed points, wherein the points on the polyhedron include points inside the polyhedron and points on the surface of the polyhedron, and these points form a point set, and all points in the point set are seed points. Regional growth is performed on these seed points, and growth stops when the lung subsegment model to be grown grows to the lung epidermis. It should be noted that determining whether to stop growth is a prior art, and the method is to pass the seed point and lung epidermis data into the existing algorithm, and the growth automatically stops when the seed point grows to the lung epidermis, which will not be repeated here.
[0088] The model building module 105 is used to combine the lung segment models of multiple lung segments to obtain a lung model.
[0089] Specifically, a model formed by connecting the lung segment models corresponding to the multiple lung segments is determined as the patient's lung model. Since the lung model is obtained based on the lung subsegment model to be grown after eliminating the influence of the different thickness and length of the trachea, the lung subsegment boundary on the surface of the lung model is uniformly transitioned.
[0090] In an optional embodiment, the model building module is specifically used to: combine multiple lung segment models together to obtain a lung model to be smoothed; for each pixel point on the lung model to be smoothed, adjust the color of the pixel point based on the color of the target pixel point, the target pixel point is a set number of target pixels around the pixel point, to obtain the lung model of the lung subsegment.
[0091] Here, the lung subsegment boundaries of the lung model after combining multiple lung segment models may still have small protrusions, which can be smoothed using a smoothing window. The process of smoothing using a smoothing window is: for each pixel, a preset number of target pixels around the pixel are selected. This selection process can be understood as selection through a smoothing window. The colors of these target pixels determine the color of the pixel. If the target pixels are all red and the pixel is green, the color of the pixel is also adjusted to red. The above smoothing is performed on each pixel to obtain a lung model with smooth lung subsegment boundaries.
[0092] Compared with the lung model acquisition device in the prior art, the present application can avoid the appearance of large protrusions and strip-like areas at the lung subsegment boundary after regional growth due to the rapid growth of thick trachea and slow growth of thin trachea in a single lung subsegment by performing convex hull processing and regional growth on the basis of the tracheal tree. At the same time, by first extending the target branch, then performing appropriate pruning operations, and then performing convex hull processing, the appearance of large protrusions and strip-like areas at the lung subsegment boundary after regional growth due to the rapid growth of long trachea and slow growth of short trachea is avoided, thereby solving the problem of uneven transition of lung subsegment boundaries on the surface of the lung model.
[0093] Based on the same inventive concept, a lung model acquisition method corresponding to the lung model acquisition device is also provided in the embodiment of the present application. Since the principle of solving the problem by the method in the embodiment of the present application is similar to that of the lung model acquisition device in the embodiment of the present application, the implementation of the method can refer to the implementation of the device, and the repeated parts will not be repeated.
[0094] See also Figure 5 , Figure 5 This is a flow chart of a lung model acquisition method provided in an embodiment of the present application. Figure 5 As shown in , the lung model acquisition method includes:
[0095] Step S401, acquiring lung segment data of a plurality of lung segments, each lung segment including a plurality of lung sub-segments, each lung segment data including a plurality of lung sub-segment data, each lung sub-segment data including trachea data and a color identifier;
[0096] Step S402, for each lung subsegment, inputting the tracheal data corresponding to the lung subsegment into the tracheal tree extraction model to obtain a tracheal tree with color marking corresponding to the lung subsegment, wherein the tracheal tree includes multiple branches;
[0097] Step S403, performing branch extension processing and convex hull processing on the target branch of each tracheal tree to obtain a lung subsegment model to be grown of the lung subsegment corresponding to the tracheal tree;
[0098] Step S404, for each lung segment, performing regional growing on multiple lung subsegment models to be grown in the lung segment at the same time to obtain a lung segment model of the lung segment;
[0099] Step S405, combining the lung segment models of multiple lung segments to obtain a lung model.
[0100] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown in , the electronic device 500 includes a processor 510 , a memory 520 and a bus 530 .
[0101] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530. When the machine-readable instructions are executed by the processor 510, the above-mentioned Figure 5 The specific implementation of the steps of the lung model acquisition method in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0102] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 5 The specific implementation of the steps of the lung model acquisition method in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0108] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A lung model acquisition device, characterized in that: The device comprises: A data acquisition module, used to acquire lung segment data of multiple lung segments, each lung segment includes multiple lung subsegments, each lung segment data includes multiple lung subsegment data, and each lung subsegment data includes tracheal data and color identification; An extraction module, for inputting, for each lung subsegment, tracheal data corresponding to the lung subsegment into a tracheal tree extraction model, and obtaining a tracheal tree with the color mark corresponding to the lung subsegment, wherein the tracheal tree includes a plurality of branches; A processing module, used for performing branch extension processing and convex hull processing on a target branch of each tracheal tree, and obtaining a lung subsegment model to be grown of a lung subsegment corresponding to the tracheal tree; A growing module is used to perform regional growing on multiple lung subsegment models to be grown in each lung segment at the same time to obtain a lung segment model of the lung segment; A model building module, used for combining lung segment models of multiple lung segments to obtain a lung model; The processing module includes a branch extension unit, and the branch extension unit includes an extension subunit, and the extension subunit is used to perform branch extension processing of a preset length on the target branch; The tracheal tree comprises a plurality of connection points, and the extension subunit is specifically used for: Select a preset number of connection points closest to the branch endpoint of the target branch as the target connection points; The point corresponding to the mean value of the coordinates of a preset number of target connection points is determined as the starting point; Determine the direction of the extension line starting from the starting point and passing through the branch end point of the target branch as the target direction; Starting from the branch end point of the target branch, the target branch is extended along the target direction by a preset length.
2. The device according to claim 1, characterized in that The processing module is further used for: Acquire a plurality of branch endpoints in the tracheal tree, wherein the tracheal tree includes a plurality of branch endpoints; For each branch endpoint, determine whether the branch type to which the branch corresponding to the branch endpoint belongs meets the extension requirement; If the branch type meets the extension requirement, the branch corresponding to the branch endpoint is determined as the target branch.
3. The device according to claim 1, characterized in that The target branches include multiple ones, and the processing module also includes a convex hull processing unit; The branch extension unit is used to perform multiple branch extension processes on each target branch until the distance between the target branch and the lung epidermis is less than a preset length, and the lung epidermis is determined based on the lung subsegment data corresponding to the target branch; The convex hull processing unit is used to perform convex hull processing on the tracheal tree after the branch extension processing to obtain the lung subsegment model to be grown corresponding to the lung subsegment.
4. The device according to claim 1, characterized in that The branch extension unit further includes: A distance judgment subunit is used to determine whether the distance between the branch endpoint of the target branch and the lung epidermis is less than a preset length after a single branch extension process; a loop subunit, configured to return to execute the extension subunit if the distance between the target branch and the lung epidermis is not less than a preset length; The ending subunit is used to end the branch extension processing of the target branch if the distance between the target branch and the lung epidermis is less than a preset length.
5. The device according to claim 1, characterized in that The branch extension unit further includes a pruning processing subunit; The pruning processing subunit is used to: Get the branch length before and after the target branch is extended; Determining an extension ratio of the target branch based on the branch length before extension and the branch length after extension; Based on the extension ratio, selecting a branch to be pruned from the target branch; Pruning is performed on the branch to be pruned.
6. The device according to claim 1, characterized in that Model building modules, specifically for: Combine multiple lung segment models together to obtain a lung model to be smoothed; For each pixel on the lung model to be smoothed, the color of the pixel is adjusted based on the color of the target pixel, where the target pixel is a set number of target pixels around the pixel, to obtain the lung model of the lung subsegment.
7. A method for obtaining a lung model, characterized in that: The method comprises: Acquire lung segment data of multiple lung segments, each lung segment includes multiple lung subsegments, each lung segment data includes multiple lung subsegment data, and each lung subsegment data includes trachea data and a color identifier; For each lung subsegment, inputting tracheal data corresponding to the lung subsegment into a tracheal tree extraction model to obtain a tracheal tree with the color mark corresponding to the lung subsegment, wherein the tracheal tree includes multiple branches; Perform branch extension processing and convex hull processing on the target branch of each tracheal tree to obtain a lung subsegment model to be grown for the lung subsegment corresponding to the tracheal tree; For each lung segment, regional growing is performed on multiple lung subsegment models to be grown in the lung segment at the same time to obtain a lung segment model of the lung segment; Combining lung segment models of multiple lung segments to obtain a lung model; The step of performing branch extension processing and convex hull processing on the target branch of each tracheal tree to obtain a lung subsegment model to be grown of the lung subsegment corresponding to the tracheal tree includes: Extend the target branch to a preset length; The tracheal tree includes a plurality of connection points, and the step of performing branch extension processing on a target branch by a preset length includes: Select a preset number of connection points closest to the branch endpoint of the target branch as the target connection points; The point corresponding to the mean value of the coordinates of a preset number of target connection points is determined as the starting point; Determine the direction of the extension line starting from the starting point and passing through the branch end point of the target branch as the target direction; Starting from the branch end point of the target branch, the target branch is extended along the target direction by a preset length.
8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the lung model acquisition method as described in claim 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the lung model acquisition method as claimed in claim 7 are executed.
