A whole brain and whole spinal cord automatic delineation method and device, electronic equipment and medium
By using CT image segmentation and processing technology, regions of interest in the whole brain and spinal cord are automatically delineated, solving the problems of time-consuming and inaccurate delineation of the whole brain and spinal cord. This achieves rapid and accurate delineation of the whole brain and spinal cord, reducing the workload of doctors and improving the accuracy of treatment.
Patent Information
- Application Number
- CN202311160985.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-09-08
AI Technical Summary
Existing whole-brain and whole-spinal cord delineation methods are time-consuming and inaccurate, especially in whole-central radiotherapy where automation is difficult, affecting clinical application.
Using CT image segmentation technology, adaptive threshold segmentation, dilation and erosion operations, combined with dilation translation superposition and subtraction processing, are used to automatically delineate the regions of interest in the whole brain and spinal cord.
It enables rapid and accurate mapping of the entire brain and spinal cord, reducing the workload of doctors and improving the accuracy of image analysis and treatment.
Smart Images

Figure CN117115430B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an automatic whole-brain and whole-spinal cord delineation method, a whole-brain and whole-spinal cord delineation device, an electronic device, and a computer-readable medium. Background Technology
[0002] Malignant brain tumors, such as medulloblastomas and germ cell tumors, often have unclear boundaries between the lesion and normal brain tissue, making complete surgical removal difficult and posing a risk of cerebrospinal fluid dissemination. Therefore, postoperative radiotherapy and chemotherapy are necessary to control potential tumor recurrence and metastasis. In addition to the two types mentioned above, patients requiring postoperative whole-brain or whole-spinal cord radiotherapy include: primary central nervous system malignant lymphomas, poorly differentiated ependymomas, meningeal leukemia, pinealoblastomas, and other nervous system tumors with potential for cerebrospinal fluid dissemination.
[0003] Because whole-brain and whole-spinal cord radiotherapy covers a large area and the spinal cord is irregular and discontinuous, automatic delineation of the spinal cord is often too complex, time-consuming, and inaccurate. As a result, it has not been well applied and recognized in clinical practice. Therefore, in current clinical applications, whole-brain and whole-spinal cord radiotherapy mainly relies on doctors to manually delineate layer by layer. Although this method is generally considered reliable, it is time-consuming. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide an automatic whole-brain and whole-spinal cord delineation method, a corresponding automatic whole-brain and whole-spinal cord delineation device, an electronic device, and a computer-readable medium to overcome or at least partially solve the above problems.
[0005] This invention discloses an automatic whole-brain and whole-spinal cord delineation method, the method comprising:
[0006] Acquire CT images;
[0007] The CT image is segmented according to a first adaptive threshold to obtain the region of interest of the human body contour.
[0008] The human body contour region of interest is segmented according to the second adaptive threshold to obtain the human skeleton contour region of interest.
[0009] The region of interest in the human skeletal contour is expanded and eroded to obtain the region of interest in the brain tissue.
[0010] The region of interest of the human skeletal contour is subjected to dilation, translation, superposition, subtraction, and erosion operations to obtain the target contour of the spinal cord.
[0011] The regions of interest in the brain tissue and the target contour of the spinal cord are combined to obtain regions of interest in the whole brain and the whole spinal cord.
[0012] Optionally, the step of performing dilation and erosion operations on the region of interest of the human skeletal contour to obtain the region of interest of brain tissue includes:
[0013] A first expansion operation and a first erosion operation are performed on the region of interest of the human skeletal contour to obtain a preliminary segmentation region of interest of the whole brain and spinal cord of the human body.
[0014] The region of interest in the whole brain and spinal cord of the human body is subjected to a second erosion operation and a second expansion operation to obtain the region of interest in the brain tissue.
[0015] Optionally, the step of performing a first dilation operation and a first erosion operation on the region of interest of the human skeletal contour to obtain a preliminary segmented region of interest for the whole brain and spinal cord includes:
[0016] Using a 3D cube structuring element with a width of a preset first number of pixels, a first dilation operation is performed on the region of interest of the human skeleton outline to obtain the dilated human skeleton outline image.
[0017] A first erosion operation is performed on the expanded human skeleton contour image using a three-dimensional cube structuring element with a width equal to the preset first number of pixels to obtain an eroded human skeleton contour image.
[0018] Subtracting the eroded human skeletal contour image from the region of interest of the human skeletal contour image yields the preliminary segmentation region of interest of the whole brain and spinal cord of the human body.
[0019] Optionally, the step of performing a second erosion operation and a second dilation operation on the initially segmented region of interest in the whole human brain and spinal cord to obtain the brain tissue region of interest includes:
[0020] Using a three-dimensional cube structuring element with a width equal to the preset first number of pixels, a second erosion operation is performed on the initially segmented region of the human whole brain and whole spinal cord region of interest to obtain an eroded brain tissue image.
[0021] A second dilation operation is performed on the brain tissue image using a three-dimensional cube structuring element with a width equal to the preset first number of pixels to obtain the region of interest of the brain tissue.
[0022] Optionally, the step of performing dilation, translation, superposition, subtraction, and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord includes:
[0023] The region of interest in the human skeletal contour is subjected to dilation, translation, superposition, and subtraction processing to obtain a preliminary outline of the spinal cord.
[0024] The area of the non-zero region in the cross section of the preliminary spinal cord contour image is calculated layer by layer, and a third erosion operation is performed based on the area of the non-zero region in the cross section of the image to obtain the target spinal cord contour.
[0025] Optionally, the step of performing dilation, translation, superposition, and subtraction processing on the region of interest of the human skeletal contour to obtain a preliminary outline of the spinal cord includes:
[0026] Using a three-dimensional cube structuring element with a width of a preset second number of pixels, a third dilation operation is performed on the region of interest of the human skeleton contour to obtain a dilated human skeleton contour image.
[0027] The human skeletal contour image is translated vertically and horizontally, and the images are added together to obtain a translated and added image;
[0028] The axially superimposed image is obtained by calculating the translation and addition images layer by layer;
[0029] The preliminary outline of the spinal cord is obtained by subtracting the preliminary segmented region of the human whole brain and whole spinal cord region of interest from the brain tissue region of interest and the axial superimposed image.
[0030] Optionally, the step of calculating the area of the non-zero region of the cross-section of the preliminary spinal cord contour image layer by layer, and performing a third erosion operation based on the area of the non-zero region of the image cross-section to obtain the target spinal cord contour includes:
[0031] Calculate the area of non-zero regions in the cross-section of the preliminary spinal cord contour image layer by layer;
[0032] If the area of the non-zero region in the current layer is less than the product of the area of the non-zero region in the next layer and a preset factor, then a three-dimensional cube structuring element with a width equal to the preset number of third pixels is used to perform a third erosion operation on the non-zero region in the next layer to obtain the spinal cord target contour.
[0033] This invention also discloses an automatic whole-brain and whole-spinal cord delineation device, the device comprising:
[0034] The acquisition module is used to acquire CT images;
[0035] The first segmentation processing module is used to segment the CT image according to a first adaptive threshold to obtain the region of interest of the human body contour.
[0036] The second segmentation processing module is used to segment the human body contour region of interest according to the second adaptive threshold to obtain the human skeleton contour region of interest.
[0037] The first expansion and erosion operation module is used to perform expansion and erosion operations on the region of interest of the human skeletal contour to obtain the region of interest of brain tissue.
[0038] The second expansion and erosion operation module is used to perform expansion, translation, superposition, subtraction and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord.
[0039] The combination module is used to combine the brain tissue region of interest and the spinal cord target contour to obtain the whole brain and whole spinal cord region of interest.
[0040] Optionally, the first expansion corrosion operation module includes:
[0041] The first expansion and erosion operation submodule is used to perform a first expansion operation and a first erosion operation on the human skeletal contour region of interest to obtain a preliminary segmentation region of interest for the whole brain and spinal cord of the human body.
[0042] The second expansion and erosion operation submodule is used to perform a second erosion operation and a second expansion operation on the initially segmented region of interest of the whole brain and whole spinal cord of the human body to obtain the region of interest of the brain tissue.
[0043] Optionally, the first expansion corrosion operation submodule includes:
[0044] The first dilation operation unit is used to perform a first dilation operation on the region of interest of the human skeleton contour using a three-dimensional cube structuring element with a width of a preset first number of pixels, so as to obtain a dilated human skeleton contour image.
[0045] The first erosion operation unit is used to perform a first erosion operation on the expanded human skeleton contour image using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, to obtain an eroded human skeleton contour image.
[0046] The first image subtraction unit is used to subtract the eroded human skeleton contour image from the human skeleton contour region of interest to obtain the preliminary segmentation region of the whole brain and whole spinal cord region of interest.
[0047] Optionally, the second expansion corrosion operation submodule includes:
[0048] The second erosion operation unit is used to perform a second erosion operation on the preliminary segmented region of the human whole brain and whole spinal cord region of interest using a three-dimensional cube structure element with a width equal to the preset number of first pixels, so as to obtain an eroded brain tissue image.
[0049] The second dilation operation unit is used to perform a second dilation operation on the brain tissue image using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, to obtain the region of interest of the brain tissue.
[0050] Optionally, the second expansion corrosion operation module includes:
[0051] The expansion-translation-superposition-subtraction submodule is used to perform expansion-translation-superposition-subtraction processing on the region of interest of the human skeletal contour to obtain the preliminary contour of the spinal cord.
[0052] The third erosion operation submodule is used to calculate the area of the non-zero region of the cross section of the preliminary spinal cord contour image layer by layer, and perform the third erosion operation based on the area of the non-zero region of the image cross section to obtain the spinal cord target contour.
[0053] Optionally, the expansion-translation-superposition-subtraction submodule includes:
[0054] The third dilation operation unit is used to perform a third dilation operation on the region of interest of the human skeleton contour using a three-dimensional cube structure element with a width of a preset second pixel number, so as to obtain a dilated human skeleton contour image.
[0055] The translation unit is used to perform vertical, horizontal, and vertical translation operations on the human skeletal contour image, and add the images together to obtain a translated and added image.
[0056] Axial stacking unit is used to calculate the axially stacked image of the translated and added images layer by layer to obtain the axially stacked image;
[0057] The second image subtraction unit is used to subtract the preliminary segmented region of the human whole brain and whole spinal cord region of interest from the brain tissue region of interest and the axial superimposed image to obtain the preliminary outline of the spinal cord.
[0058] Optionally, the third corrosion operation submodule includes:
[0059] The calculation unit is used to calculate the area of the non-zero region in the cross-section of the preliminary outline image of the spinal cord layer by layer;
[0060] The third erosion operation unit is used to perform a third erosion operation on the non-zero region of the next layer if the area of the non-zero region of the current layer is less than the product of the area of the non-zero region of the next layer and a preset factor, thereby obtaining the spinal cord target contour.
[0061] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0062] The memory is used to store computer programs;
[0063] When the processor executes the program stored in the memory, it implements the automatic whole-brain and whole-spinal cord delineation method as described in the embodiments of the present invention.
[0064] This invention also discloses one or more computer-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the whole-brain and whole-spinal cord automatic delineation method as described in this invention.
[0065] The embodiments of the present invention have the following advantages:
[0066] The automatic delineation method for the whole brain and spinal cord in this invention involves acquiring CT images, segmenting the CT images according to a first adaptive threshold to obtain regions of interest (ROIs) for the human body contour, segmenting these ROIs according to a second adaptive threshold to obtain ROIs for the human skeleton contour, performing dilation and erosion operations on the ROIs for the human skeleton contour to obtain ROIs for the brain tissue, performing dilation, translation, superposition, subtraction, and erosion operations on the ROIs for the human skeleton contour to obtain the target contour of the spinal cord, and combining the ROIs for the brain tissue and the target contour of the spinal cord to obtain the ROIs for the entire brain and spinal cord. This method can automatically, quickly, and accurately delineate ROIs for the entire brain and spinal cord, greatly aiding in patient image analysis, accurate treatment, and reducing the workload of clinicians. Attached Figure Description
[0067] Figure 1 This is a flowchart of the steps of an automatic whole-brain and whole-spinal cord delineation method provided in an embodiment of the present invention;
[0068] Figure 2 This is a cross-sectional view of the region of interest in brain tissue provided in this embodiment of the invention;
[0069] Figure 3 This is a coronal view of the region of interest in brain tissue provided in this embodiment of the invention;
[0070] Figure 4 This is a sagittal plane view of the region of interest in brain tissue provided in this embodiment of the invention;
[0071] Figure 5 This is a cross-sectional view of the preliminary segmentation region of the region of interest of the whole brain and spinal cord provided in this embodiment of the invention;
[0072] Figure 6 This is a coronal view of the preliminary segmentation region of the region of interest in the whole brain and spinal cord of the human body provided in this embodiment of the invention;
[0073] Figure 7 This is a sagittal plane view of the preliminary segmentation region of the region of interest of the whole brain and spinal cord provided in this embodiment of the invention;
[0074] Figure 8 This is a cross-sectional view of the whole brain and whole spinal cord region of interest provided in the embodiments of the present invention;
[0075] Figure 9 This is a coronal view of the region of interest in the whole brain and spinal cord provided in this embodiment of the invention;
[0076] Figure 10 This is a sagittal plane view of the region of interest in the whole brain and spinal cord provided in this embodiment of the invention;
[0077] Figure 11 This is a structural block diagram of an automatic brain and spinal cord delineation device provided in an embodiment of the present invention;
[0078] Figure 12 This is a block diagram of an electronic device provided in an embodiment of the present invention;
[0079] Figure 13 This is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. Detailed Implementation
[0080] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0081] Reference Figure 1 The diagram illustrates a step-by-step flowchart of an automatic whole-brain and whole-spinal cord delineation method provided in an embodiment of the present invention, which may specifically include the following steps:
[0082] Step 101: Acquire CT images;
[0083] Existing technologies lack optimized segmentation based on the anatomical characteristics of the spine, thus failing to automatically, quickly, and accurately delineate the entire spinal cord region of interest. However, the whole-brain and whole-spinal cord automatic delineation method of this invention optimizes segmentation based on the anatomical characteristics of the spine and, by leveraging the three-dimensional continuity of the spine, achieves relatively accurate and rapid automatic delineation of the spinal cord.
[0084] The embodiments of the present invention are based on CT images to automatically delineate the regions of interest of the whole brain and the whole spinal cord. Therefore, in order to automatically delineate the regions of interest of the whole brain and the whole spinal cord, the patient's CT images can be obtained first.
[0085] Step 102: Segment the CT image according to the first adaptive threshold to obtain the region of interest of the human body contour;
[0086] The patient's CT image includes the human body contour, the surrounding air, and the scanning bed. Therefore, the CT image can be segmented first to extract the human body contour. In this embodiment of the invention, an adaptive threshold segmentation method can be used for segmentation. The CT image can be segmented according to a first adaptive threshold to obtain the region of interest of the human body contour. The first adaptive threshold can be determined appropriately based on the characteristics of the image, the target, and the actual application scenario; this invention does not impose any limitations on this.
[0087] Specifically, the human tissue and the surrounding air in the CT image can be segmented using a threshold (CT value = -450). Pixels above the threshold are assigned a value of 1, and pixels below the threshold are assigned a value of 0. Hollow areas in the binary image are filled in. Then, the connected region with the largest area in the binary image is found and retained, thereby obtaining the region of interest of the human body contour in the CT image.
[0088] Step 103: Segment the human body contour region of interest according to the second adaptive threshold to obtain the human skeleton contour region of interest;
[0089] Since the treatment scope of whole-central therapy is the whole brain and whole spinal cord, rather than the entire human body outline, the human skeletal outline region of interest can be further extracted from the human body outline region of interest, so as to automatically delineate the whole brain and whole spinal cord region of interest based on the human skeletal outline region of interest.
[0090] In this embodiment of the invention, an adaptive threshold segmentation method can also be used to extract the region of interest (ROI) of the human skeletal contour. The ROI can be segmented according to a second adaptive threshold to obtain the ROI of the human skeletal contour. The second adaptive threshold can also be determined appropriately based on the characteristics of the image, the target, and the actual application scenario; this invention does not impose any limitations on this.
[0091] Specifically, the skeletal contours in the CT image can be segmented using a threshold (CT value = 130). Pixels above the threshold are assigned a value of 1, and pixels below the threshold are assigned a value of 0. At the same time, all pixels outside the human body contour area are assigned a value of 0. Finally, to improve the processing efficiency of subsequent work, objects containing fewer than 13 pixels are deleted, and the region of interest of the human skeletal contours in the CT image is finally obtained.
[0092] Step 104: Perform dilation and erosion operations on the region of interest of the human skeletal outline to obtain the region of interest of the brain tissue;
[0093] Because the volume of brain tissue in a CT image cross-section is much larger than that of the spinal cord, in order to accurately obtain the edge contour of the region of interest, it is necessary to process the delineation of the brain tissue level and the spinal cord level separately. That is, the brain tissue region of interest and the spinal cord target contour can be delineated separately first, and then the delineated brain tissue region of interest and the spinal cord target contour can be combined to obtain the whole brain and whole spinal cord region of interest.
[0094] Reference Figure 2 This image shows a cross-sectional view of a region of interest in brain tissue provided in an embodiment of the present invention.
[0095] Reference Figure 3 This image shows a coronal view of the region of interest in brain tissue provided in an embodiment of the present invention.
[0096] Reference Figure 4 This shows a sagittal view of the region of interest in brain tissue provided in an embodiment of the present invention;
[0097] In this embodiment of the invention, the region of interest in brain tissue can be obtained by performing expansion and erosion operations on the region of interest of the human skeletal outline, thereby achieving the delineation of the region of interest in brain tissue.
[0098] In one embodiment of the present invention, the step of performing dilation and erosion operations on the region of interest of the human skeletal contour to obtain the region of interest of brain tissue includes:
[0099] S11, perform a first expansion operation and a first erosion operation on the human skeletal contour region of interest to obtain a preliminary segmentation region of interest for the whole brain and spinal cord of the human body.
[0100] S12, perform a second erosion operation and a second expansion operation on the initially segmented region of interest of the whole brain and whole spinal cord of the human body to obtain the region of interest of the brain tissue.
[0101] To delineate the regions of interest in brain tissue, we can first perform a first expansion and a first erosion operation on the region of interest of the human skeleton outline to obtain a preliminary segmentation region of interest for the whole brain and spinal cord. Then, we can perform a second erosion and a second expansion operation on the preliminary segmentation region of interest for the whole brain and spinal cord to obtain the region of interest in brain tissue.
[0102] In one embodiment of the present invention, the step of performing a first dilation operation and a first erosion operation on the region of interest of the human skeletal contour to obtain a preliminary segmented region of interest of the whole brain and whole spinal cord includes:
[0103] S21, using a three-dimensional cube structuring element with a width of a preset number of first pixels, perform a first dilation operation on the region of interest of the human skeleton outline to obtain the dilated human skeleton outline image.
[0104] S22, using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, perform a first erosion operation on the expanded human skeleton contour image to obtain an eroded human skeleton contour image.
[0105] S23, subtract the eroded human skeleton contour image from the human skeleton contour region of interest to obtain the preliminary segmentation region of interest of the whole brain and whole spinal cord of the human body.
[0106] Reference Figure 5 This image shows a cross-sectional view of the preliminary segmentation region of the human brain and spinal cord region of interest provided in an embodiment of the present invention.
[0107] Reference Figure 6 This shows a coronal view of the preliminary segmentation region of the region of interest of the whole brain and spinal cord provided in an embodiment of the present invention.
[0108] Reference Figure 7 This shows a sagittal view of the preliminary segmentation region of the region of interest of the whole brain and spinal cord provided in an embodiment of the present invention.
[0109] In this embodiment of the invention, the preliminary segmentation region of interest for the whole brain and spinal cord of the human body can be obtained by performing a first dilation operation and a first erosion operation on the human skeletal contour region of interest. Specifically, a three-dimensional cube structuring element with a width of a preset first number of pixels can be created first. Using this three-dimensional cube structuring element object, the first dilation operation is performed on the human skeletal contour region of interest to fill the empty areas in the human skeletal contour region of interest image, resulting in a dilated human skeletal contour image. Then, using a three-dimensional cube structuring element object of the same width, the first erosion operation is performed on the dilated human skeletal contour image, resulting in an eroded human skeletal contour image. Finally, the eroded human skeletal contour image is subtracted from the human skeletal contour region of interest to obtain the preliminary segmentation region of interest for the whole brain and spinal cord of the human body.
[0110] In the specific implementation, a three-dimensional cube structuring element with a width of 11 pixels can be used first to perform a dilation operation on the region of interest of the human skeletal contour to fill the empty areas in the binary image. Then, the same three-dimensional cube structuring element with a width of 11 pixels is used to perform an erosion operation, and the binary image is subtracted from the region of interest of the human skeletal contour. Finally, pixels with a value greater than 0 are assigned a value of 1, and pixels with a value not greater than 0 are assigned a value of 0, thus obtaining the preliminary segmentation region of the region of interest of the whole brain and whole spinal cord in the CT image.
[0111] In one embodiment of the present invention, the step of performing a second erosion operation and a second expansion operation on the initially segmented region of interest in the whole brain and spinal cord of the human body to obtain the region of interest in brain tissue includes:
[0112] S31, using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, a second erosion operation is performed on the initially segmented region of the human whole brain and whole spinal cord region of interest to obtain an eroded brain tissue image;
[0113] S32, using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, a second dilation operation is performed on the brain tissue image to obtain the region of interest of the brain tissue.
[0114] After obtaining the preliminary segmentation region of interest for the entire human brain and spinal cord, it can be further processed to obtain the brain tissue region of interest. In this embodiment of the invention, the brain tissue region of interest can be obtained by performing a second erosion operation and a second dilation operation on the preliminary segmentation region of interest for the entire human brain and spinal cord. Specifically, a three-dimensional cube structuring element with a width of a preset first number of pixels can be used to perform the second erosion operation on the preliminary segmentation region of interest for the entire human brain and spinal cord to obtain an eroded brain tissue image; then, a three-dimensional cube structuring element object of the same width can be used to perform a second dilation operation on the brain tissue image to obtain the brain tissue region of interest.
[0115] In the specific implementation, a three-dimensional cube structuring element with a width of 11 pixels is first used to perform an erosion operation on the initially segmented region of interest in the whole brain and spinal cord, breaking the narrow connections between the whole brain tissue and the spinal cord. To improve efficiency, connected regions with an area less than 7777 in the binary image are removed. Then, the largest connected region in the binary image is found and retained, thereby removing non-brain tissue regions surrounding the brain tissue and obtaining the eroded brain tissue image. Finally, the same three-dimensional cube structuring element with a width of 11 pixels is used to perform a dilation operation on the binary image to obtain the region of interest in the brain tissue in the CT image.
[0116] Step 105: Perform dilation, translation, superposition, subtraction, and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord;
[0117] In this embodiment of the invention, in order to obtain the spinal cord target contour, the region of interest of the human skeletal contour can be subjected to dilation, translation, superposition, subtraction and erosion operations to obtain the spinal cord target contour.
[0118] In one embodiment of the present invention, the step of performing dilation, translation, superposition, subtraction, and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord includes:
[0119] S41, Perform expansion, translation, superposition and subtraction processing on the region of interest of the human skeletal outline to obtain the preliminary outline of the spinal cord;
[0120] S42, calculate the area of the non-zero region of the cross section of the preliminary spinal cord contour image layer by layer, and perform a third erosion operation based on the area of the non-zero region of the cross section of the image to obtain the target contour of the spinal cord.
[0121] For delineating the spinal cord target contour, the region of interest of the human skeletal contour can first be expanded, translated, superimposed, and subtracted to obtain the preliminary spinal cord contour. Subsequently, during the spinal cord contour extraction process, some spinal cord layers are not completely surrounded by vertebrae. At these layers, there may be large connection areas between the spinal cord and the surrounding area. Therefore, it is necessary to perform an erosion operation on these layers of the preliminary spinal cord contour to break the narrow connection areas between these individual layers and the surrounding area. Furthermore, because the non-zero area of some individual spinal cord layers is too small, if the erosion operation is applied to all layers of the spinal cord, it may remove these small non-zero areas, resulting in discontinuities in the spinal cord contour. Therefore, after obtaining the preliminary spinal cord contour, the area of the non-zero area in the cross-section of the preliminary spinal cord contour image can be calculated layer by layer, and a third erosion operation can be performed based on the area of the non-zero area in the image cross-section to finally obtain the target spinal cord contour.
[0122] In one embodiment of the present invention, the step of performing dilation, translation, superposition, and subtraction processing on the region of interest of the human skeletal contour to obtain a preliminary spinal cord contour includes:
[0123] S51, using a three-dimensional cube structuring element with a width of a preset second number of pixels, a third dilation operation is performed on the region of interest of the human skeleton outline to obtain the dilated human skeleton outline image.
[0124] S52, perform vertical and horizontal translation operations on the human skeleton contour image, and add the translated images together to obtain a translated and added image;
[0125] S53, calculate the axially superimposed image of the translated and added images layer by layer to obtain the axially superimposed image;
[0126] S54, subtract the preliminary segmented region of the human whole brain and whole spinal cord region of interest from the brain tissue region of interest and the axial superimposed image to obtain the preliminary outline of the spinal cord.
[0127] The preliminary outline of the spinal cord can be obtained by performing dilation, translation, superposition, and subtraction on the region of interest (ROI) of the human skeletal outline. Specifically, a three-dimensional cube structuring element with a width of a preset second number of pixels can be used to perform a third dilation operation on the ROI of the human skeletal outline to obtain a dilated human skeletal outline image. Then, translation, superposition, and subtraction operations are performed on the human skeletal outline image, and the translation images are added together to obtain a translation-added image. Next, the axial superposition image of the translation-added image can be calculated layer by layer to obtain an axial superposition image. Finally, the preliminary segmentation region of the whole brain and whole spinal cord ROI can be subtracted from the brain tissue ROI and the axial superposition image to obtain the preliminary outline of the spinal cord.
[0128] In the specific implementation, a 3D cube structure element with a width of 2 pixels can be created. Using this structure element object, a dilation operation is performed on the region of interest (ROI) of the human skeletal contour to obtain a dilated human skeletal contour image. Then, a translation operation is performed on this dilated image, translating it by 2 pixels in each of the four directions (up, down, left, and right) of the cross-section. The original image and the translated images in the four directions are then added together to obtain a translated image. Next, the axial superposition image of the translated images is calculated layer by layer. The current layer (layer n) of the translated image is superimposed with the previous layer (layer n-1) and the next layer (layer n+1) to obtain the final axial superposition image. Finally, the preliminary segmentation region of the whole brain and spinal cord ROI of the human body is subtracted from the brain tissue ROI and the axial superposition image. Pixels with a value greater than 0 are assigned a value of 1, and pixels with a value less than 0 are assigned a value of 0. Furthermore, to improve efficiency, connected regions with an area less than 33 in the binary image can be removed. Then, the largest connected region in the binary image is found and retained to obtain the preliminary spinal cord contour.
[0129] In one embodiment of the present invention, the step of calculating the area of the non-zero region of the cross-section of the preliminary spinal cord contour image layer by layer, and performing a third erosion operation based on the area of the non-zero region of the image cross-section to obtain the target spinal cord contour includes:
[0130] S61, calculate the area of the non-zero region in the cross section of the preliminary spinal cord contour image layer by layer;
[0131] S62, if the area of the non-zero region in the current layer is less than the product of the area of the non-zero region in the next layer and a preset factor, then a three-dimensional cube structuring element with a width equal to the preset number of third pixels is used to perform a third erosion operation on the non-zero region in the next layer to obtain the spinal cord target contour.
[0132] Since there may be a large connection area between the initial spinal cord contour and the periphery, it is necessary to perform an erosion operation on the initial spinal cord contour to disconnect the narrow connection areas between individual layers of the spinal cord contour and the periphery. And because the non-zero area of individual layers of the spinal cord is too small, if the erosion operation is applied to all layers of the spinal cord, it may remove the non-zero areas with too small areas of these layers, resulting in discontinuity of the spinal cord contour. Therefore, after obtaining the initial spinal cord contour, the non-zero area of the cross-section of the initial spinal cord contour image can be calculated layer by layer. If the non-zero area of the current layer is less than the product of the non-zero area of the next layer and a preset factor, a three-dimensional cubic structure element with a width of the preset number of the third pixels is used to perform a third erosion operation on the non-zero area of the next layer to obtain the target spinal cord contour.
[0133] Specifically, the non-zero area of the cross-section of the image can be calculated layer by layer. When the non-zero contour area An of the current layer is less than the product of the non-zero contour area An+1 of the next layer and 0.618 (An < An+1 * 0.618), a three-dimensional cubic structure element with a width of 3 pixels is used to perform an erosion operation on the non-zero area of the next layer (the n+1th layer) of the initial spinal cord contour. Subsequently, the connected area with the largest area in the binary image is searched for and retained to obtain the spinal cord contour in the CT image. And to reduce the impact of the erosion operation on the勾画 of the true spinal cord contour, a three-dimensional cubic structure element with a width of 3 pixels can be used to perform a dilation operation on the spinal cord contour in the CT image. Subsequently, the dilated spinal cord contour is intersected with the preliminary segmentation area of the whole brain and whole spinal cord region of interest of the human body, and the overlapping area is assigned a value of 1, and the non-overlapping area is assigned a value of 0 to obtain the target spinal cord contour.
[0134] Step 106, perform a combination process on the brain tissue region of interest and the target spinal cord contour to obtain the whole brain and whole spinal cord region of interest.
[0135] Refer to Figure 8 , which shows a cross-sectional view of the whole brain and whole spinal cord region of interest provided in an embodiment of the present invention;
[0136] Refer to Figure 9 , which shows a coronal view of the whole brain and whole spinal cord region of interest provided in an embodiment of the present invention;
[0137] Refer to Figure 10 , which shows a sagittal view of the whole brain and whole spinal cord region of interest provided in an embodiment of the present invention;
[0138] After delineating the regions of interest (ROIs) in the brain and the target contours of the spinal cord, these ROIs can be combined to obtain whole-brain and whole-spinal cord ROIs. Specifically, the ROIs in the brain and the target contours of the spinal cord in the CT image can be added together. Pixels with a value greater than 0 are assigned a value of 1, and pixels with a value less than 0 are assigned a value of 0. Connected regions with an area less than 33 in the binary image are removed. Then, the largest connected region in the binary image is found and retained, ultimately yielding the whole-brain and whole-spinal cord ROIs, thus achieving the delineation of the whole-brain and whole-spinal cord ROIs. (Comparison...) Figure 2-4 and Figure 8-10 It can be found that optimizing segmentation based on the characteristics of the spine can greatly improve the accuracy of spinal cord segmentation and delineation.
[0139] In this embodiment of the invention, CT images are acquired, segmented according to a first adaptive threshold to obtain regions of interest (ROIs) for the human body contour, and then segmented again according to a second adaptive threshold to obtain regions of interest for the human skeleton contour. Dilation and erosion operations are then performed on the human skeleton contour ROIs to obtain regions of interest for the brain tissue. Dilation, translation, superposition, subtraction, and erosion operations are then performed on the human skeleton contour ROIs to obtain the spinal cord target contour. Finally, the brain tissue ROIs and the spinal cord target contours are combined to obtain the whole-brain and whole-spinal cord ROIs. This method can automatically, quickly, and accurately delineate the whole-brain and whole-spinal cord ROIs, greatly aiding in patient image analysis, accurate treatment, and reducing the workload of clinicians.
[0140] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0141] Reference Figure 11 The diagram illustrates a structural block diagram of an automatic brain and spinal cord mapping device provided in an embodiment of the present invention, which may specifically include the following modules:
[0142] Acquisition module 1101 is used to acquire CT images;
[0143] The first segmentation processing module 1102 is used to segment the CT image according to a first adaptive threshold to obtain the human body contour region of interest;
[0144] The second segmentation processing module 1103 is used to segment the human body contour region of interest according to the second adaptive threshold to obtain the human skeleton contour region of interest.
[0145] The first expansion and erosion operation module 1104 is used to perform expansion and erosion operations on the region of interest of the human skeletal outline to obtain the region of interest of brain tissue.
[0146] The second expansion and erosion operation module 1105 is used to perform expansion, translation, superposition, subtraction and erosion operations on the region of interest of the human bone contour to obtain the target contour of the spinal cord.
[0147] The combination module 1106 is used to combine the brain tissue region of interest and the spinal cord target contour to obtain the whole brain and whole spinal cord region of interest.
[0148] Optionally, the first expansion corrosion operation module includes:
[0149] The first expansion and erosion operation submodule is used to perform a first expansion operation and a first erosion operation on the human skeletal contour region of interest to obtain a preliminary segmentation region of interest for the whole brain and spinal cord of the human body.
[0150] The second expansion and erosion operation submodule is used to perform a second erosion operation and a second expansion operation on the initially segmented region of interest of the whole brain and whole spinal cord of the human body to obtain the region of interest of the brain tissue.
[0151] Optionally, the first expansion corrosion operation submodule includes:
[0152] The first dilation operation unit is used to perform a first dilation operation on the region of interest of the human skeleton contour using a three-dimensional cube structuring element with a width of a preset first number of pixels, so as to obtain a dilated human skeleton contour image.
[0153] The first erosion operation unit is used to perform a first erosion operation on the expanded human skeleton contour image using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, to obtain an eroded human skeleton contour image.
[0154] The first image subtraction unit is used to subtract the eroded human skeleton contour image from the human skeleton contour region of interest to obtain the preliminary segmentation region of the whole brain and whole spinal cord region of interest.
[0155] Optionally, the second expansion corrosion operation submodule includes:
[0156] The second erosion operation unit is used to perform a second erosion operation on the preliminary segmented region of the human whole brain and whole spinal cord region of interest using a three-dimensional cube structure element with a width equal to the preset number of first pixels, so as to obtain an eroded brain tissue image.
[0157] The second dilation operation unit is used to perform a second dilation operation on the brain tissue image using a three-dimensional cube structuring element with a width equal to the preset number of first pixels, to obtain the region of interest of the brain tissue.
[0158] Optionally, the second expansion corrosion operation module includes:
[0159] The expansion-translation-superposition-subtraction submodule is used to perform expansion-translation-superposition-subtraction processing on the region of interest of the human skeletal contour to obtain the preliminary contour of the spinal cord.
[0160] The third erosion operation submodule is used to calculate the area of the non-zero region of the cross section of the preliminary spinal cord contour image layer by layer, and perform the third erosion operation based on the area of the non-zero region of the image cross section to obtain the spinal cord target contour.
[0161] Optionally, the expansion-translation-superposition-subtraction submodule includes:
[0162] The third dilation operation unit is used to perform a third dilation operation on the region of interest of the human skeleton contour using a three-dimensional cube structure element with a width of a preset second pixel number, so as to obtain a dilated human skeleton contour image.
[0163] The translation unit is used to perform vertical, horizontal, and vertical translation operations on the human skeletal contour image, and add the images together to obtain a translated and added image.
[0164] Axial stacking unit is used to calculate the axially stacked image of the translated and added images layer by layer to obtain the axially stacked image;
[0165] The second image subtraction unit is used to subtract the preliminary segmented region of the human whole brain and whole spinal cord region of interest from the brain tissue region of interest and the axial superimposed image to obtain the preliminary outline of the spinal cord.
[0166] Optionally, the third corrosion operation submodule includes:
[0167] The calculation unit is used to calculate the area of the non-zero region in the cross-section of the preliminary outline image of the spinal cord layer by layer;
[0168] The third erosion operation unit is used to perform a third erosion operation on the non-zero region of the next layer if the area of the non-zero region of the current layer is less than the product of the area of the non-zero region of the next layer and a preset factor, thereby obtaining the spinal cord target contour.
[0169] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0170] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 12 As shown, it includes a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204. The processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.
[0171] Memory 1203 is used to store computer programs;
[0172] Processor 1201, when executing the program stored in memory 1203, implements the automatic whole-brain and whole-spinal cord delineation method as described in the above embodiment:
[0173] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0174] The communication interface is used for communication between the aforementioned terminal and other devices.
[0175] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0176] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0177] like Figure 13 As shown, in another embodiment of the present invention, a computer-readable storage medium 1301 is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the whole-brain and whole-spinal cord automatic delineation method described in the above embodiment.
[0178] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the automatic whole-brain and whole-spinal cord delineation method described in the above embodiments.
[0179] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0180] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0181] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0182] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for automatically delineating the entire brain and spinal cord, characterized in that, The method includes: Acquire CT images; The CT image is segmented according to a first adaptive threshold to obtain the region of interest of the human body contour. The human body contour region of interest is segmented according to the second adaptive threshold to obtain the human skeleton contour region of interest. The region of interest in the human skeletal contour is expanded and eroded to obtain the region of interest in the brain tissue. The region of interest of the human skeletal contour is subjected to dilation, translation, superposition, subtraction, and erosion operations to obtain the target contour of the spinal cord. The brain tissue region of interest and the spinal cord target contour are combined to obtain the whole brain and whole spinal cord region of interest. The step of performing dilation and erosion operations on the region of interest of the human skeletal contour to obtain the region of interest of the brain tissue includes: A first expansion operation and a first erosion operation are performed on the region of interest of the human skeletal contour to obtain a preliminary segmentation region of interest of the whole brain and spinal cord of the human body. A second erosion operation and a second expansion operation are performed on the initially segmented region of interest of the whole human brain and spinal cord to obtain the region of interest of the brain tissue. The step of performing dilation, translation, superposition, subtraction, and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord includes: Using a three-dimensional cube structuring element with a width of a preset second number of pixels, a third dilation operation is performed on the region of interest of the human skeleton contour to obtain a dilated human skeleton contour image. The human skeletal contour image is translated vertically, horizontally, and vertically, and the images are added together to obtain a translated and added image. The axially superimposed image is obtained by calculating the translation and addition images layer by layer; The preliminary segmentation region of the human whole brain and whole spinal cord region of interest is subtracted from the brain tissue region of interest and the axial superimposed image to obtain the preliminary outline of the spinal cord; Calculate the area of non-zero regions in the cross-section of the preliminary spinal cord contour image layer by layer; If the area of the non-zero region in the current layer is less than the product of the area of the non-zero region in the next layer and a preset factor, then a three-dimensional cube structuring element with a width equal to the preset number of third pixels is used to perform a third erosion operation on the non-zero region in the next layer to obtain the spinal cord target contour.
2. The method according to claim 1, characterized in that, The step of performing a first dilation operation and a first erosion operation on the region of interest of the human skeletal contour to obtain a preliminary segmented region of interest for the entire human brain and spinal cord includes: Using a 3D cube structuring element with a width of a preset first number of pixels, a first dilation operation is performed on the region of interest of the human skeleton outline to obtain the dilated human skeleton outline image. A first erosion operation is performed on the expanded human skeleton contour image using a three-dimensional cube structuring element with a width equal to the preset first number of pixels to obtain an eroded human skeleton contour image. Subtracting the eroded human skeletal contour image from the region of interest of the human skeletal contour image yields the preliminary segmentation region of interest of the whole brain and spinal cord of the human body.
3. The method according to claim 1, characterized in that, The step of performing a second erosion operation and a second expansion operation on the initially segmented region of interest in the whole human brain and spinal cord to obtain the brain tissue region of interest includes: Using a three-dimensional cube structuring element with a width of a preset first number of pixels, a second erosion operation is performed on the initially segmented region of the human whole brain and whole spinal cord region of interest to obtain an eroded brain tissue image; A second dilation operation is performed on the brain tissue image using a three-dimensional cube structuring element with a width equal to the preset first number of pixels to obtain the region of interest of the brain tissue.
4. An automatic brain and spinal cord mapping device, characterized in that, The device includes: The acquisition module is used to acquire CT images; The first segmentation processing module is used to segment the CT image according to a first adaptive threshold to obtain the region of interest of the human body contour. The second segmentation processing module is used to segment the human body contour region of interest according to the second adaptive threshold to obtain the human skeleton contour region of interest. The first expansion and erosion operation module is used to perform expansion and erosion operations on the region of interest of the human skeletal contour to obtain the region of interest of brain tissue. The second expansion and erosion operation module is used to perform expansion, translation, superposition, subtraction and erosion operations on the region of interest of the human skeletal contour to obtain the target contour of the spinal cord. The combination module is used to combine the brain tissue region of interest and the spinal cord target contour to obtain the whole brain and whole spinal cord region of interest; The first expansion corrosion operation module includes: The first expansion and erosion operation submodule is used to perform a first expansion operation and a first erosion operation on the human skeletal contour region of interest to obtain a preliminary segmentation region of interest for the whole brain and spinal cord of the human body. The second expansion and erosion operation submodule is used to perform a second erosion operation and a second expansion operation on the initially segmented region of the human whole brain and whole spinal cord region of interest to obtain the brain tissue region of interest. The second expansion corrosion operation module includes: The expansion-translation-superposition-subtraction submodule is used to perform expansion-translation-superposition-subtraction processing on the region of interest of the human skeletal contour to obtain the preliminary contour of the spinal cord. The third erosion operation submodule is used to calculate the area of the non-zero region of the cross section of the preliminary spinal cord contour image layer by layer, and perform the third erosion operation based on the area of the non-zero region of the cross section of the image to obtain the target contour of the spinal cord. The expansion-translation-superposition-subtraction submodule includes: The third dilation operation unit is used to perform a third dilation operation on the region of interest of the human skeleton contour using a three-dimensional cube structure element with a width of a preset second pixel number, so as to obtain a dilated human skeleton contour image. The translation unit is used to perform vertical, horizontal, and vertical translation operations on the human skeletal contour image, and add the images together to obtain a translated and added image. Axial stacking unit is used to calculate the axially stacked image of the translated and added images layer by layer to obtain the axially stacked image; The second image subtraction unit is used to subtract the preliminary segmented region of the human whole brain and whole spinal cord region of interest from the brain tissue region of interest and the axial superimposed image to obtain the preliminary outline of the spinal cord. The third corrosion operation submodule includes: The calculation unit is used to calculate the area of the non-zero region in the cross-section of the preliminary outline image of the spinal cord layer by layer; The third erosion operation unit is used to perform a third erosion operation on the non-zero region of the next layer if the area of the non-zero region of the current layer is less than the product of the area of the non-zero region of the next layer and a preset factor, thereby obtaining the spinal cord target contour.
5. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the automatic whole-brain and whole-spinal cord delineation method as described in any one of claims 1-3.
6. One or more computer-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the automatic whole-brain and whole-spinal cord delineation method as described in any one of claims 1-3.
Citation Information
Patent Citations
Image contour automatic extraction method and system
CN106875410A
Method and device for positioning region of interest in medical image
CN112308823A
Spinal CT image enhancement method and device and spinal surgical robot
CN114170114A
Brain core infarction region segmentation method and device and computer equipment
CN114387287A