An interactive hematoma segmentation and analysis method and system based on brain CT images
An interactive hematoma segmentation method based on brain CT images was developed. This method utilizes three-dimensional median filtering and Otsu threshold segmentation, combined with PCA to calculate the hematoma centroid and long axis direction. This solves the problems of large memory consumption and complex operation in traditional methods, and achieves lightweight, easy operation and real-time assisted puncture path planning.
Patent Information
- Application Number
- CN202310928052.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2026-07-03
- Estimated Expiration
- 2043-07-26
AI Technical Summary
Existing methods for detecting and segmenting cerebral hematomas require loading large model files, consume excessive memory, are unsuitable for lightweight deployment, are complex to operate, and cannot provide real-time assistance in puncture path planning.
An interactive hematoma segmentation method based on brain CT images is adopted. Through three-dimensional median filtering, three-dimensional Otsu threshold segmentation, and three-dimensional opening operation, combined with PCA to calculate the centroid and long axis of the hematoma, the recommended puncture direction is output, simplifying the operation process and providing auxiliary information.
It achieves lightweight deployment, simplifies hematoma segmentation, provides hematoma centroid and orientation information, assists doctors or surgical robots in positioning and puncture path planning, and meets the requirements of immediacy.
Smart Images

Figure CN116977351B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of brain hematoma detection and segmentation technology, and more specifically to an interactive hematoma segmentation and analysis method and system based on brain CT images. Background Technology
[0002] Cerebral hematoma detection and segmentation is an important medical image processing task aimed at automatically or semi-automatically identifying and segmenting cerebral hematoma regions.
[0003] Currently, most traditional hematoma detection and segmentation techniques are based on deep learning methods, which require loading large model files and do not meet the requirements for lightweight deployment. Deep learning-based hematoma detection and segmentation methods all require at least one model file for computation and inference, but these model files consume excessive memory, making them unsuitable for lightweight deployment of brain hematoma segmentation and puncture analysis software. Furthermore, deep learning-based methods also require configuring a virtual environment during deployment, which adds unnecessary workload to the software deployment. In addition, when using commonly used medical image processing software like 3D Slicer for hematoma segmentation, the required steps are numerous. In 3D Slicer, the internal region of the hematoma must first be delineated in three separate views; then the external region of the hematoma must be delineated in three separate views; finally, segmentation is performed to obtain the result. This hematoma segmentation operation is overly cumbersome and not easy to operate.
[0004] Furthermore, traditional techniques for segmenting and calculating the volume of hematomas do not explicitly provide additional information such as the hematoma's centroid or direction of concentration. If the surgeon or surgical robot needs to locate the hematoma, the segmentation results must be further processed. This increases the complexity of the procedure.
[0005] More importantly, traditional techniques primarily focus on the detection and segmentation of cerebral hematomas. For instance, traditional techniques utilize deep learning methods to segment and calculate the volume of hematomas without providing any guidance on the needle insertion route based on existing brain region images. However, in clinical practice, when encountering brain diseases such as tumors, hydrocephalus, or cerebral hematomas, brain puncture surgery is required to alleviate the condition or treat the disease. If doctors want to combine these two methods, they need to first export the image analysis results into the puncture path planning algorithm, which is time-consuming and cannot meet the requirements of the immediacy of surgery.
[0006] Therefore, how to design an integrated, lightweight, and easy-to-operate interactive hematoma segmentation and analysis method and system is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] In view of this, the present invention provides an interactive hematoma segmentation and analysis method and system based on brain CT images, which can effectively assist in brain hematoma segmentation and analysis and puncture path planning while meeting the requirements of lightweight design.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] In a first aspect, the present invention provides an interactive hematoma segmentation and analysis method based on brain CT images, the specific steps of which include:
[0010] S1. Acquire brain medical images and set window width and window level for the medical images;
[0011] S2. Determine the first hematoma area based on the area selected by the human-computer interaction box;
[0012] S3. Perform three-dimensional median filtering on the first hematoma region;
[0013] S4. Perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmentation image;
[0014] S5. Perform a three-dimensional opening operation on the binary segmented image;
[0015] S6. In the three-dimensional opening operation result, select the largest three-dimensional connected component of the binary segmentation image to obtain the segmentation result of the second hematoma region;
[0016] S7. Based on the second hematoma region segmentation result, obtain the hematoma centroid and hematoma volume; and use PCA to calculate the long axis direction of the hematoma.
[0017] Preferably, the method further includes:
[0018] S8. Based on the centroid and long axis of the hematoma, output a ray, which is the recommended puncture direction;
[0019] Preferably, step S2 includes:
[0020] S21. Identify the cuboid region of the encapsulated hematoma drawn in the first view;
[0021] S22. Based on the cuboid region, determine the first hematoma region and generate a cuboid projection in the second and third views;
[0022] S23. If it is determined that the cuboid region does not completely cover the hematoma region, the cuboid region is finely adjusted to ensure that the cuboid region completely covers the hematoma region.
[0023] Preferably, step S4 includes:
[0024] S41. Perform binary segmentation of the first hematoma region according to the three-dimensional Otsu threshold method, including: calculating the segmentation threshold by maximizing the inter-class variance and segmenting the first hematoma region.
[0025] S42. Adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold.
[0026] Preferably, obtaining the hematoma centroid in step S7 includes:
[0027] S701. Based on the second hematoma region segmentation result, a dense three-dimensional point cloud is constructed using the hematoma region to obtain the pixel coordinate value of each point in the hematoma region.
[0028] S702. Calculate the average value of the pixel values in the three dimensions of the three-dimensional point cloud to obtain the centroid of the hematoma.
[0029] Preferably, obtaining the hematoma volume in step S7 includes:
[0030] S711. Based on the segmentation results of the second hematoma region, count the number of voxels occupied by the second hematoma region;
[0031] S712. Obtain the true length, width and height data corresponding to each voxel in the medical image file, and calculate the true volume of each voxel.
[0032] S713. The hematoma volume is obtained by multiplying the number of voxels and the actual volume of the voxels.
[0033] Secondly, the present invention also provides an interactive hematoma segmentation and analysis system based on brain CT images, specifically including:
[0034] An acquisition module is used to acquire brain medical images and set window width and window level for the medical images;
[0035] The determination module is used to determine the first hematoma area based on the area selected by the human-computer interaction box;
[0036] The filtering module is used to perform three-dimensional median filtering on the first hematoma region;
[0037] The segmentation module is used to perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmentation image.
[0038] The computation module is used to perform a three-dimensional opening operation on the binary segmented image;
[0039] The selection module selects the largest three-dimensional connected component of the binary segmented image from the three-dimensional opening operation results to obtain the segmentation result of the second hematoma region;
[0040] The analysis module obtains the centroid and volume of the hematoma based on the segmentation results of the second hematoma region; and uses PCA to calculate the long axis direction of the hematoma.
[0041] Preferably, the system also includes:
[0042] The output module outputs a ray based on the centroid of the hematoma and the direction of its long axis, wherein the ray is the recommended puncture direction;
[0043] Preferably, the determining module includes:
[0044] A recognition unit is used to recognize the cuboid region of the enveloping hematoma drawn in the first view;
[0045] The generation unit determines the first hematoma region based on the cuboid region and generates cuboid projections in the second and third views;
[0046] An adjustment unit is used to determine when the cuboid region does not completely cover the hematoma region, and to make fine adjustments to the cuboid region to ensure that the cuboid region completely covers the hematoma region.
[0047] Preferably, the segmentation module includes:
[0048] The first calculation unit is used to perform binary segmentation of the first hematoma region according to the three-dimensional Otsu threshold method, including: calculating the segmentation threshold by maximizing the inter-class variance and segmenting the first hematoma region;
[0049] The analysis unit is used to adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold.
[0050] Preferably, the analysis module obtains the hematoma centroid, including:
[0051] The construction unit, based on the second hematoma region segmentation result, constructs a dense three-dimensional point cloud using the hematoma region and obtains the pixel coordinate value of each point in the hematoma region;
[0052] The second calculation unit calculates the average value of the pixel values in the three dimensions of the three-dimensional point cloud to obtain the centroid of the hematoma.
[0053] Preferably, the analysis module obtains the hematoma volume, including:
[0054] The statistical unit, based on the segmentation results of the second hematoma region, counts the number of voxels occupied by the second hematoma region;
[0055] The acquisition unit is used to acquire the actual length, width and height data corresponding to each voxel in the medical image file and calculate the actual volume of each voxel.
[0056] The arithmetic unit performs a multiplication operation using the number of voxels and the actual volume of the voxels to obtain the hematoma volume.
[0057] As can be seen from the above technical solution, compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. This application overcomes the shortcomings of traditional deep learning-based methods that require loading large model files and thus consume excessive memory. At the same time, it does not require the configuration of a virtual environment and can be used for lightweight deployment of brain hematoma segmentation and puncture analysis.
[0059] 2. This application can provide other auxiliary information such as hematoma centroid and hematoma direction; it simplifies redundant operation steps in reprocessing hematoma segmentation results; and by combining brain hematoma detection and segmentation with needle insertion route recommendation guidance, it can effectively assist doctors or surgical robots in brain hematoma localization analysis and puncture path planning. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0061] Figure 1 Flowchart of the interactive hematoma segmentation and analysis method based on brain CT images provided by this invention;
[0062] Figure 2 A schematic diagram illustrating the importation of brain medical images provided by this invention;
[0063] Figure 3 This invention provides a schematic diagram of setting window width and window position.
[0064] Figure 4 This is a schematic diagram of the human-computer interaction for selecting a hematoma region provided by the present invention;
[0065] Figure 5 This invention provides a schematic diagram of the completed hematoma segmentation and a recommended puncture path.
[0066] Figure 6 A framework diagram of an interactive hematoma segmentation and analysis system based on brain CT images provided by this invention; Detailed Implementation
[0067] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0068] Example 1:
[0069] like Figure 1 As shown, an interactive hematoma segmentation and analysis method based on brain CT images includes the following steps:
[0070] S1. Acquire brain medical images and set window width and window level for the medical images;
[0071] S2. Determine the first hematoma area based on the area selected by the human-computer interaction box;
[0072] S3. Perform three-dimensional median filtering on the first hematoma region;
[0073] S4. Perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmentation image;
[0074] S5. Perform a three-dimensional opening operation on the binary segmented image;
[0075] S6. In the three-dimensional opening operation result, select the largest three-dimensional connected component of the binary segmentation image to obtain the segmentation result of the second hematoma region;
[0076] S7. Based on the second hematoma region segmentation result, obtain the hematoma centroid and hematoma volume; and use PCA to calculate the long axis direction of the hematoma.
[0077] In this embodiment, the method occupies less memory, is easy to integrate into software and deploy on various devices, and provides relatively complete hematoma information, effectively improving the calculation speed and hematoma segmentation accuracy. In addition, based on the hematoma centroid and long axis direction, a ray can be output, which is the recommended puncture direction. This enables doctors or surgical robots to perform brain hematoma localization analysis and puncture path planning, and has the characteristics of being lightweight, easy to integrate, easy to operate, information diverse, accurate and fast.
[0078] The following is a detailed explanation of each of the above steps:
[0079] In step S1, as Figure 2 As shown, the brain medical images to be analyzed are obtained, supporting the input of nii and dcm files; after importing the file, the medical image is visualized from the coronal, sagittal and axial angles respectively.
[0080] like Figure 3 As shown, setting the window width and level is for better display. For brain medical images, preset window width and level values have been provided. For CT images, the window width and level used to observe brain regions are usually selected as 100, 50. That is, voxel values with HU values between [0, 100] will be mapped to grayscale values between [0, 255] for display. Voxel values with HU values < 0 will be mapped to grayscale value = 0, and voxel values with HU values > 100 will be mapped to grayscale value = 255. If users have special needs, they can set the window width and level parameters themselves. For example, if a user is not only interested in observing cerebral hemorrhage but also needs to observe whether there is cerebral infarction, the window level of the HU value can be reduced from 100HU to 60HU for better observation.
[0081] In step S2, as Figure 4 As shown, it includes:
[0082] S21. Obtain the cuboid region of the enveloping hematoma drawn in the first view;
[0083] S22. Based on the cuboid region, determine the first hematoma region and generate a cuboid projection in the second and third views;
[0084] S23. If it is determined that the cuboid region does not completely cover the hematoma region, the cuboid region is finely adjusted to ensure that the cuboid region completely covers the hematoma region.
[0085] This step requires interaction with the user. The user needs to find the slice with the largest hematoma area in the cross section and select a rectangle on the slice that can cover the hematoma area using the mouse.
[0086] After the user completes the rectangle drawing in the first view, the algorithm interacts to determine the approximate area of the hematoma and generates a cuboid projection in the second and third views. If the selected cuboid cannot completely cover the hematoma area, it can be fine-tuned in the three views to ensure that the cuboid completely covers the hematoma area. In this step, expert prior knowledge is introduced before hematoma segmentation, reducing the region of interest from the entire image to a small cuboid area. This achieves improved accuracy and speed with less human intervention. This approach effectively reduces computational power consumption, increases calculation speed, and improves the accuracy of hematoma segmentation, making it less likely to segment contents such as skull, noise, and other tissues.
[0087] The machine interaction in this step is as follows: After the rectangle is drawn, firstly, (2D) Otsu thresholding is applied to this area to segment the hematoma on the slice. Secondly, the 2D center of the hematoma is roughly calculated based on the segmented mask, and the approximate 3D center of the hematoma can be obtained by combining the coordinates of the slice. Next, the center of the rectangle is moved to the approximate center of the hematoma. Then, by default, the rectangle is expanded axially using the shorter side (width) as its length to form a cuboid. Finally, on the axial slice containing the approximate 3D center of the hematoma, (2D) Otsu thresholding is applied to the hematoma within the rectangle on the slice. If the segmented hematoma area touches the boundary of the rectangle, the size of the rectangle in that direction is expanded by 1.5 times. Intelligent adjustment aims to obtain a cuboid that completely covers the hematoma area through a second selection.
[0088] After intelligent adjustment, users can observe the cuboid in slices from various directions to ensure it covers the entire hematoma area. If it cannot be covered, manual adjustments can be made on the corresponding slice. After manual fine-tuning, a cuboid that covers the hematoma area in all three views is obtained.
[0089] After completing steps S21-S23 above, input the coordinates (x1, y1, z1, x2, y2, z2) of the two opposite corner points of the selected cuboid into the algorithm. The algorithm will extract a voxel block of the cuboid from the complete brain medical image and perform fully automated analysis within this region.
[0090] In step S3, the selected filter size is 3×3×3 voxels. Median filtering is a non-linear digital filter that effectively removes salt-and-pepper noise while preserving the main information of the image. Median filtering uses a filter kernel of a given size to traverse the image. Within the range of the filter kernel, all pixels are sorted, and the median value of all pixels is taken and assigned to the center pixel of the filter kernel. After the traversal is complete, the filtered image is output.
[0091] Step S4 includes:
[0092] S41. Perform binary segmentation of the first hematoma region according to the three-dimensional Otsu threshold method, including: calculating the segmentation threshold by maximizing the inter-class variance and segmenting the first hematoma region.
[0093] S42. Adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold.
[0094] After median filtering, the Otsu thresholding method (3D) was used for binary segmentation of the first hematoma region. The Otsu thresholding method does not require manual threshold input; it automatically calculates the segmentation threshold and segments the selected region based on the principle of maximizing inter-class variance. After adjusting the window width and level to suit the brain region, the grayscale value of the hematoma was significantly higher than that of the surrounding soft tissue region, so areas exceeding the threshold were likely hematoma areas.
[0095] This method adaptively calculates an image threshold by maximizing the inter-class variance and then uses this threshold for binary segmentation. The 3D Otsu thresholding method calculates the inter-class variance corresponding to each threshold within a given 3D voxel region, and takes the threshold with the largest inter-class variance as the final segmentation threshold. The formula for calculating the inter-class variance is as follows:
[0096]
[0097] in, is the inter-class variance of the voxel values of the two classes separated by the threshold; w0 and w1 are the number of voxels in the first and second classes, respectively; μ0, μ1, and μ T This represents the mean of the first class, the second class, and all voxels. For example, in this embodiment, after converting the 3D image to a grayscale value of 0-255, the threshold is iterated within this grayscale range, and the inter-class variance of each threshold is calculated. The threshold corresponding to the maximum inter-class variance is applied to segment the image, and the segmented binary image is output.
[0098] In step S5, after Otsu thresholding, the segmented binary image will contain a lot of noise and tiny connections. The kernel size selected is 5×5×5 voxels. This method is used to eliminate the defects in the binary image and break the connections caused by small noise.
[0099] Opening is a morphological operation that involves first eroding the image and then dilating it. It can remove isolated noise, burrs, and fine connections from an image while preserving its main information.
[0100] In step S6, small connected components may exist in the binary image. These small connected components may be the segmentation results of other tissues or noise. Since the approximate hematoma region (first hematoma region) has already been selected, the hematoma region can be considered the largest connected component in the segmentation results of this region. Therefore, after obtaining the largest connected component, the hematoma region is retained, and the segmentation results of other tissues or noise are discarded.
[0101] After opening operations, the connected components in the binary image mainly include the first hematoma region, other tissue regions, and large noise regions. After selecting the hematoma region, the largest connected component inside the cuboid is the first hematoma region. Therefore, the SimpleITK library is first used to calculate the number of voxels occupied by each connected component inside the cuboid. The connected components with the most voxels are obtained by sorting, and the remaining connected components are removed. The binary image of the largest connected component is output, which is the second hematoma region. This completes the segmentation of the hematoma.
[0102] Obtaining the centroid of the hematoma in step S7 includes:
[0103] S701. Based on the segmentation results of the second hematoma region, construct a dense three-dimensional point cloud based on the hematoma region;
[0104] S702. Obtain the pixel coordinates of each point in the hematoma region;
[0105] S703. Calculate the average value of the pixel values in the three dimensions to obtain the centroid of the hematoma.
[0106] The density of the hematoma region is uniform. Therefore, for the three-dimensional point cloud of the hematoma, the centroid of the hematoma can be obtained by averaging the pixel values in the three dimensions.
[0107] Step S7 involves obtaining the hematoma volume, including:
[0108] S711. Based on the segmentation results of the second hematoma region, count the number of voxels occupied by the second hematoma region;
[0109] S712. Obtain the true length, width and height data corresponding to each voxel in the medical image file, and calculate the true volume of each voxel.
[0110] S713. The hematoma volume is obtained by multiplying the number of voxels and the actual volume of the voxels.
[0111] Step S7 also includes using PCA to calculate the long axis direction of the hematoma;
[0112] For a 3D point cloud of a hematoma, the major axis refers to the direction or axis of maximum variance in the point cloud; intuitively, it is the direction in which the point cloud extends the longest. Taking a 2D rectangle as an example, its principal axis direction is its major axis direction. After obtaining the hematoma segmentation results, PCA (Principal Component Analysis) is used to calculate the major axis direction of the hematoma. This method treats the hematoma in the binary image as a 3D point cloud and uses the statistical analysis method PCA to quickly and efficiently calculate the direction in which the hematoma extends the longest. If the "rotating caliper method" is used to calculate the minimum bounding cuboid of the hematoma, the time consumption increases significantly.
[0113] Principal Component Analysis (PCA) is a statistical method that reduces the dimensionality of data and outputs mutually orthogonal principal component directions. This method treats the hematoma as a three-dimensional point cloud, with the three-dimensional coordinates of each voxel considered as its feature. Assuming the hematoma region has N voxels, a sample matrix X of dimension [N, 3] can be obtained. Standardizing the sample matrix by subtracting the mean and dividing by the standard deviation yields a standardized sample matrix. calculate The covariance matrix and its eigenvalues and eigenvectors are obtained; the eigenvector corresponding to the largest eigenvalue is selected, and this eigenvector is the long axis direction of the hematoma. The variance of the hematoma point cloud is largest in the long axis direction, and visually, the hematoma extends the longest in this direction.
[0114] like Figure 5 As shown, a ray is output based on the hematoma's centroid and long axis, representing the recommended puncture direction and providing suggestions for puncture surgery planning. Combining the hematoma's centroid and long axis yields the recommended puncture path. This path points directly to the hematoma's centroid along its long axis, making it easier to access the hematoma area.
[0115] Example 2:
[0116] Based on the same inventive concept, this invention also provides an interactive hematoma segmentation and analysis system based on brain CT images. Since the principle of the problem solved by this system is similar to that of an interactive hematoma segmentation and analysis method based on brain CT images, the implementation of this system can refer to the implementation of the aforementioned method, and the repeated parts will not be described again.
[0117] This invention provides an interactive hematoma segmentation and analysis system based on brain CT images, such as... Figure 6 As shown, it specifically includes:
[0118] This invention also provides an interactive hematoma segmentation and analysis system based on brain CT images, specifically including:
[0119] An acquisition module is used to acquire brain medical images and set window width and window level for the medical images;
[0120] The determination module is used to determine the first hematoma area based on the area selected by the human-computer interaction box;
[0121] The filtering module is used to perform three-dimensional median filtering on the first hematoma region;
[0122] The segmentation module is used to perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmentation image.
[0123] The computation module is used to perform a three-dimensional opening operation on the binary segmented image;
[0124] The selection module selects the largest three-dimensional connected component of the binary segmented image from the three-dimensional opening operation results to obtain the segmentation result of the second hematoma region;
[0125] The analysis module obtains the centroid and volume of the hematoma based on the segmentation results of the second hematoma region; and uses PCA to calculate the long axis direction of the hematoma.
[0126] In one embodiment, determining the module includes:
[0127] A recognition unit is used to recognize the cuboid region of the enveloping hematoma drawn in the first view;
[0128] The generation unit determines the first hematoma region based on the cuboid region and generates cuboid projections in the second and third views;
[0129] An adjustment unit is used to determine when the cuboid region does not completely cover the hematoma region, and to make fine adjustments to the cuboid region to ensure that the cuboid region completely covers the hematoma region.
[0130] In one embodiment, the segmentation module includes:
[0131] The first calculation unit is used to perform binary segmentation of the first hematoma region according to the three-dimensional Otsu threshold method, including: calculating the segmentation threshold by maximizing the inter-class variance and segmenting the first hematoma region;
[0132] The analysis unit is used to adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold.
[0133] In one embodiment, the analysis module obtains the centroid of the hematoma, including:
[0134] The construction unit, based on the second hematoma region segmentation result, constructs a dense three-dimensional point cloud using the hematoma region and obtains the pixel coordinate value of each point in the hematoma region;
[0135] The second calculation unit calculates the average value of the pixel values in the three dimensions of the three-dimensional point cloud to obtain the centroid of the hematoma.
[0136] In one embodiment, the analysis module obtains the hematoma volume, including:
[0137] The statistical unit, based on the segmentation results of the second hematoma region, counts the number of voxels occupied by the second hematoma region;
[0138] The acquisition unit is used to acquire the actual length, width and height data corresponding to each voxel in the medical image file and calculate the actual volume of each voxel.
[0139] The arithmetic unit performs a multiplication operation using the number of voxels and the actual volume of the voxels to obtain the hematoma volume.
[0140] Compared to traditional brain CT image processing, the above embodiments use brain medical images and a manually selected approximate hematoma region as input. After performing a series of traditional image processing operations (including median filtering, 3D Otsu threshold segmentation, and 3D opening operation), the output includes auxiliary information such as hematoma region segmentation results, hematoma centroid location, hematoma principal axis direction (recommended puncture direction), and hematoma volume. This effectively assists doctors or surgical robots in brain hematoma localization analysis and puncture path planning, and features lightweight design, easy integration, ease of operation, diverse information, accuracy, and speed.
[0141] Lightweight and easy to integrate: This application does not require a model file that consumes a lot of memory, so it has a small memory footprint and is lightweight. It is also easy to integrate into software and deploy on various devices.
[0142] Ease of use: For a brain medical image, this application only requires a few intuitive selection steps to perform rapid and accurate hematoma segmentation.
[0143] Information diversity: This application provides relatively complete hematoma information for cerebral hematoma puncture surgery.
[0144] Accuracy and speed: Using manually selected hematoma regions as priors, only the cuboid region containing the hematoma needs to be considered; this operation can effectively improve the calculation speed and the accuracy of hematoma segmentation.
[0145] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0146] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An interactive hematoma segmentation and analysis method based on brain CT images, characterized in that, The specific steps include: S1. Acquire brain medical images and visualize them from the coronal, sagittal, and axial angles respectively, and set the window width and window level for the medical images; S2. Determine the first hematoma area based on the area selected in the human-computer interaction box; including: S21. Identify the cuboid region of the encapsulated hematoma drawn in the first view; S22. Based on the cuboid region, determine the first hematoma region and generate cuboid projections in the second and third views; S23. Determining that when the cuboid region does not completely cover the hematoma region, fine-tuning the cuboid region to ensure that the cuboid region completely covers the hematoma region; including: In the first view, a rectangle covering the hematoma area is determined based on the slice with the largest hematoma area. The hematoma area of the slice is segmented using a two-dimensional Otsu threshold based on the rectangle to obtain a mask. The two-dimensional center of the hematoma is calculated based on the mask, and the three-dimensional center of the hematoma is obtained by combining the coordinates of the slice. The center of the rectangle is moved to the three-dimensional center. The rectangle is expanded axially with the shorter side as the length to make it a cuboid. On the axial slice containing the three-dimensional center, the hematoma area of the cuboid on the slice is segmented using a two-dimensional Otsu threshold. If the segmented hematoma area touches the boundary of the cuboid, the size of the cuboid in the direction corresponding to the boundary is expanded by 1.5 times until the cuboid completely covers the hematoma area. S3. Perform three-dimensional median filtering on the first hematoma region; S4. Perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmentation image; including: S41. The first hematoma region is binary segmented according to the three-dimensional Otsu thresholding method. The three-dimensional image is converted to a gray value of 0-255. The inter-class variance of each threshold is calculated within the gray value range of 0-255. The segmentation threshold is calculated by maximizing the inter-class variance, and the first hematoma region is segmented accordingly. The formula for maximizing the inter-class variance is as follows: in, The inter-class variance of the voxel values of the two classes separated by the threshold. , These represent the number of voxels of type I and type II, respectively. , These are the mean values of the first and second type voxels, respectively; S42. Adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold; the segmentation threshold is calculated by traversing and calculating the inter-class variance corresponding to each gray value in a preset gray range, taking the gray value corresponding to the largest inter-class variance as the segmentation threshold, and performing binary segmentation on the first hematoma region based on the segmentation threshold. S5. Perform a three-dimensional opening operation on the binary segmented image; S6. In the three-dimensional opening operation result, the number of voxels occupied by each connected region inside the cuboid is calculated by the SimpleITK library. The largest three-dimensional connected region of the binary segmentation image is selected by sorting to obtain the segmentation result of the second hematoma region. S7. Based on the second hematoma region segmentation result, obtain the hematoma centroid and hematoma volume; and use PCA to calculate the long axis direction of the hematoma.
2. The interactive hematoma segmentation and analysis method based on brain CT images according to claim 1, characterized in that, Obtaining the centroid of the hematoma in step S7 includes: S701. Based on the second hematoma region segmentation result, a dense three-dimensional point cloud is constructed using the hematoma region to obtain the pixel coordinate value of each point in the hematoma region. S702. Calculate the average value of the pixel values in the three dimensions of the three-dimensional point cloud to obtain the centroid of the hematoma.
3. The interactive hematoma segmentation and analysis method based on brain CT images according to claim 1, characterized in that, Obtaining the hematoma volume in step S7 includes: S711. Based on the segmentation results of the second hematoma region, count the number of voxels occupied by the second hematoma region; S712. Obtain the true length, width and height data corresponding to each voxel in the medical image file, and calculate the true volume of each voxel. S713. The hematoma volume is obtained by multiplying the number of voxels and the actual volume of the voxels.
4. An interactive hematoma segmentation and analysis system based on brain CT images, characterized in that, Specifically, it includes: The acquisition module is used to acquire brain medical images, visualize them from three angles: coronal, sagittal, and axial, and set the window width and window level for the medical images. The determination module is used to determine the first hematoma area based on the area selected by the human-computer interaction box; The determining module includes: A recognition unit is used to recognize the cuboid region of the enveloping hematoma drawn in the first view; The generation unit determines the first hematoma region based on the cuboid region and generates cuboid projections in the second and third views; An adjustment unit is used to determine when the cuboid region does not completely cover the hematoma region, and to fine-tune the cuboid region to ensure that the cuboid region completely covers the hematoma region; including: In the first view, a rectangle covering the hematoma area is determined based on the slice with the largest hematoma area. The hematoma area of the slice is segmented using a two-dimensional Otsu threshold based on the rectangle to obtain a mask. The two-dimensional center of the hematoma is calculated based on the mask, and the three-dimensional center of the hematoma is obtained by combining the coordinates of the slice. The center of the rectangle is moved to the three-dimensional center. The rectangle is expanded axially with the shorter side as the length to make it a cuboid. On the axial slice containing the three-dimensional center, the hematoma area of the cuboid on the slice is segmented using a two-dimensional Otsu threshold. If the segmented hematoma area touches the boundary of the cuboid, the size of the cuboid in the direction corresponding to the boundary is expanded by 1.5 times until the cuboid completely covers the hematoma area. The filtering module is used to perform three-dimensional median filtering on the first hematoma region; A segmentation module is used to perform three-dimensional Otsu threshold segmentation on the first hematoma region after three-dimensional median filtering to obtain a binary segmented image; the segmentation module includes: The first calculation unit is used to perform binary segmentation of the first hematoma region according to the three-dimensional Otsu thresholding method, convert the three-dimensional image to a gray value of 0-255, calculate the inter-class variance of each threshold within the gray value range of 0-255, and calculate the segmentation threshold by maximizing the inter-class variance to segment the first hematoma region; the formula for maximizing the inter-class variance is: in, The inter-class variance of the voxel values of the two classes separated by the threshold. , These represent the number of voxels of type I and type II, respectively. , These are the mean values of the first and second type voxels, respectively; The analysis unit is used to adjust the window width and window level, and analyze the first hematoma region based on the difference in gray values using the segmentation threshold; The computation module is used to perform a three-dimensional opening operation on the binary segmented image; The module is selected, and in the three-dimensional opening operation result, the number of voxels occupied by each connected region inside the cuboid is calculated by the SimpleITK library. The largest three-dimensional connected region of the binary segmentation image is selected by sorting to obtain the segmentation result of the second hematoma region. The analysis module obtains the centroid and volume of the hematoma based on the segmentation results of the second hematoma region; and uses PCA to calculate the long axis direction of the hematoma.
5. The interactive hematoma segmentation and analysis system based on brain CT images according to claim 4, characterized in that, The analysis module obtains the centroid of the hematoma, including: The construction unit, based on the second hematoma region segmentation result, constructs a dense three-dimensional point cloud using the hematoma region and obtains the pixel coordinate value of each point in the hematoma region; The second calculation unit calculates the average value of the pixel values in the three dimensions of the three-dimensional point cloud to obtain the centroid of the hematoma.
6. The interactive hematoma segmentation and analysis system based on brain CT images according to claim 4, characterized in that, The analysis module obtains the hematoma volume, including: The statistical unit, based on the segmentation results of the second hematoma region, counts the number of voxels occupied by the second hematoma region; The acquisition unit is used to acquire the actual length, width and height data corresponding to each voxel in the medical image file and calculate the actual volume of each voxel. The arithmetic unit performs a multiplication operation using the number of voxels and the actual volume of the voxels to obtain the hematoma volume.
Citation Information
Patent Citations
System and method for planning drainage of brain hematoma
CN110074864A
Pulmonary nodule CT image segmentation algorithm
CN111062946A
