Magnetic resonance head 3D image skull segmentation method based on region growing threshold iteration

By using a region-growing threshold-based iterative method, the problem of head shell segmentation that cannot be applied to MRA-TOF imaging by existing techniques has been solved, achieving accurate segmentation and separation of the head shell in head magnetic resonance images and reducing the difficulty of diagnosis.

CN120125600BActive Publication Date: 2026-02-17MARVEL STONE HEALTHCARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510203052.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2026-02-17
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

Existing 3D image segmentation methods for the head using magnetic resonance imaging are not applicable to MRA-TOF imaging and cannot effectively preserve the pixels of blood vessels under the brain.

Method used

A method based on region growth threshold iteration is adopted, which involves steps such as resampling, coarse extraction of head shell mask, flatness extraction, and fine extraction of head shell mask. Combined with morphological operations and recursive Gaussian-Hayson algorithm, head shell segmentation of 3D images of the head from magnetic resonance imaging is achieved.

Benefits of technology

It achieves accurate segmentation and separation of the skull in head magnetic resonance imaging, especially head magnetic resonance angiography, eliminating visual occlusion of the internal region by the skull region and reducing the difficulty of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125600B_ABST
    Figure CN120125600B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image segmentation, and discloses a magnetic resonance head 3D image head shell segmentation method based on region growing threshold iteration, which comprises the following steps: acquiring a magnetic resonance head 3D image, resampling the magnetic resonance head 3D image to obtain a first image; performing head shell mask rough extraction based on the first image to obtain a second image, wherein each pixel of the second image is a binary mask; performing planarity extraction on the first image to obtain a third image, wherein each pixel of the third image is a scalar value; performing head shell mask fine extraction based on the second image and the third image to obtain a fourth image, wherein each pixel of the fourth image is a binary mask; performing post-processing on the fourth image to extract a head mask image in the fourth image; and performing pixel mask processing on the magnetic resonance head 3D image based on the head mask image to obtain a 3D head image with the head shell removed. The application eliminates the visual obstruction of voxels in the head shell region to the internal region, and reduces the difficulty of diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image segmentation technology, specifically relating to a method for head shell segmentation of 3D magnetic resonance head images based on region growing threshold iteration. Background Technology

[0002] 3D MRI images of the head provide more detailed information about brain structure, playing a crucial role in diagnosing brain tumors, cerebrovascular diseases, and neurological disorders. They help doctors more accurately determine the nature, location, and extent of the disease. This technology has wide applications in multiple disciplines, including medicine, biology, and psychology.

[0003] Scalp segmentation of 3D MRI images of the head is an important step in medical image processing. Its purpose is to separate the outer skin, eyes and other tissues from the internal brain parenchyma, spine and other tissues from the 3D images of the head. The accuracy and efficiency of scalp segmentation are crucial for subsequent image analysis and disease diagnosis.

[0004] Currently, the main segmentation methods are as follows:

[0005] I. The paper "Skull Stripping for MRI Images Using Morphological Operators" by Swiebocka-Wiek J et al. is a morphology-based image processing method; its implementation involves five steps:

[0006] 1. Perform image thresholding segmentation;

[0007] 2. Fill the gaps between the segmented objects using morphological operations;

[0008] 3. Edge detection;

[0009] 4. Select the object with the largest area in the image and create a binary mask;

[0010] 5. Combine the mask with the input image to obtain the output image.

[0011] The technology has the following problems in practical applications: it is very sensitive to differences in different magnetic resonance imaging sequences, and this paper only involves processing T1-weighted imaging of 3T magnetic resonance; it cannot be applied to the head and shell segmentation of MRA-TOF (Magnetic Resonance Angiography - Time of Flight, MRA-TOF for short, is a magnetic resonance angiography technique) imaging to preserve the blood vessel pixels under the brain.

[0012] II. The paper "Brain segmentation in magnetic resonance human head scans using multi-seeded region growing" by Somasundaram K, Kalavathi P, et al. is an image processing method based on region growing. Its implementation involves two main steps:

[0013] 1. First, brain segmentation is performed on the intermediate slice images;

[0014] 2. Then, brain segmentation is performed on other slice images;

[0015] The technology has the following problems in practical applications: it is very sensitive to differences in different magnetic resonance imaging sequences, and this paper only involves processing T1-weighted imaging, T2-weighted imaging, and PD-weighted imaging of magnetic resonance; it is also not applicable to the segmentation of the skull in MRA-TOF imaging to preserve the blood vessel pixels (voxels) under the brain.

[0016] Therefore, existing segmentation techniques are not suitable for segmenting the skull in MRA-TOF imaging to preserve the blood vessel pixels beneath the brain. Summary of the Invention

[0017] The purpose of this invention is to provide a head shell segmentation method based on region growth threshold iteration for 3D magnetic resonance head images, in order to solve the problem that existing segmentation techniques cannot be applied to head shell segmentation for MRA-TOF imaging and to preserve the blood vessel pixels under the brain.

[0018] To achieve the above objectives, the present invention adopts the following technical solution:

[0019] In a first aspect, the present invention provides a method for head shell segmentation based on region growing threshold iteration in magnetic resonance imaging 3D head images, the method comprising:

[0020] Acquire a 3D image of the head using magnetic resonance imaging (MRI), and resample the 3D image of the head to obtain the first image;

[0021] Based on the first image, a coarse extraction of the head shell mask is performed to obtain the second image, where each pixel of the second image is a binary mask.

[0022] Flatness extraction is performed on the first image to obtain the third image, where each pixel of the third image is a scalar value;

[0023] Based on the second and third images, the head shell mask is extracted to obtain the fourth image, where each pixel of the fourth image is a binary mask.

[0024] Post-process the fourth image to extract the head mask image from the fourth image;

[0025] Pixel masking is performed on the 3D head image of the magnetic resonance imaging head based on the head mask image to obtain a 3D head image with the head shell removed.

[0026] Preferably, a second image is obtained by coarsely extracting the headshell mask based on the first image, including:

[0027] Perform 3D grayscale morphological dilation on the first image to obtain the dilated first image;

[0028] Extract at least one pixel from the dilated first image as the first seed point;

[0029] Based on the pre-constructed first pixel grayscale range, perform region growing on the first seed point no less than a first preset number of times to generate multiple first region growing images;

[0030] The total number of reference pixels in each first region growth image is obtained by counting the number of pixels that are reference values ​​in each first region growth image.

[0031] When the total number of reference pixels corresponding to multiple consecutive first region growth images is greater than a preset number, the ratio of the reference pixel increment between each two adjacent reference pixel increments is calculated based on the total number of reference pixels corresponding to the first region growth images, and the ratio coefficient is obtained.

[0032] When the scaling factor is greater than the preset factor for the first time, the first region growth image after the previous region growth is used as the convergence image;

[0033] Morphological dilation is performed on the convergent image to obtain the dilated convergent image.

[0034] The pixels of the dilated convergent image are inverted to obtain the first inverted image.

[0035] Morphological dilation is performed on the inverted image to obtain the first inverted image after dilation.

[0036] The second image is obtained based on the first inverted image and the dilated first inverted image.

[0037] Preferably, the method further includes:

[0038] When the total number of reference pixels corresponding to each first region growth image is not greater than the preset number, or the number of times the region growth is executed has not reached the first preset number, the upper limit value of the grayscale interval of the first pixel is updated based on the pre-constructed first step value, and the region growth is re-executed on the first seed point with the updated first pixel grayscale interval until the total number of reference pixels corresponding to each first region growth image is greater than the preset number and the number of times the region growth is executed reaches or exceeds the first preset number.

[0039] Preferably, the method further includes: constructing a first step value, including:

[0040] Extract the image parameters of the first image after dilation, the image parameters including: the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels;

[0041] The first step value is determined based on the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels.

[0042] Preferably, the reference value is a pixel value of "1", and the first preset number of times is three.

[0043] Preferably, the first image is subjected to flatness extraction to obtain the third image, including:

[0044] Stretch the pixel grayscale values ​​of the first image to obtain the stretched image;

[0045] The stretched image is then subjected to a smoothing filter based on gradient anisotropic diffusion to obtain the processed image.

[0046] The processed image is used as the image to be processed. Based on the recursive Gaussian-Hassen algorithm, the recursive Gaussian-Hassen matrix image of the image to be processed is calculated.

[0047] Flatness calculation is performed on each element matrix in the recursive Gaussian-Hayssen matrix image to obtain the calculated image. The calculated image is then used as the new image to be processed. The recursive Gaussian-Hayssen matrix image and flatness are recalculated until the number of flatness calculations reaches the second preset number, resulting in the final image. The final image is then used as the third image.

[0048] Preferably, a fourth image is obtained by finely extracting the headshell mask based on the second and third images, including:

[0049] Extract the maximum and minimum pixel values ​​from the third image;

[0050] Construct the second pixel grayscale range based on the maximum and minimum pixel values ​​of the third image;

[0051] Use all pixels in the second image that have reference values ​​as the second seed point set;

[0052] Based on the grayscale range of the second pixel, iterative region growth is performed on the second seed point set on the third image to generate multiple second region grown images. In the next iteration, the lower limit value of the grayscale range of the second pixel is updated with the pre-constructed second step value.

[0053] After each iteration, the second region-grown image and the second image are subjected to joint pixel statistics to obtain a first statistical result and a second statistical result. The first statistical result is the total number of pixels in the two images that satisfy a first preset condition, where the first preset condition is any zero pixel in the second image and the corresponding pixel in the second region-grown image is non-zero. The second statistical result is the total number of pixels in the two images that satisfy a second preset condition, where the second preset condition is any non-zero pixel in the second image and the corresponding pixel in the second region-grown image is zero.

[0054] The total number of non-zero pixels in the second image is counted. The total number of non-zero pixels in the second image, the first statistical result, and the second statistical result are used as inputs to a preset loss function to obtain the iterative loss value of region growing.

[0055] Obtain the iterative loss value of the region growth after three consecutive iterations. When the iterative loss value of the region growth after three consecutive iterations increases, it is considered as initial convergence.

[0056] After initial convergence, the lower limit of the second pixel grayscale interval used in the first of the three consecutive iterations is used as the initial value. The lower limit of the second pixel grayscale interval is finely adjusted based on the preset algorithm near the initial value. The second seed point set is then used to perform a second iteration of region growth on the third image using the finely adjusted second pixel grayscale interval, and the iteration loss value is recalculated until the iteration loss value is precisely converged to a local minimum.

[0057] The fourth image is obtained by masking and overlaying the second region growth image corresponding to the iterative loss value that has converged precisely after the second iteration of region growth with the second image.

[0058] Preferably, the second step value is constructed based on the maximum and minimum pixel values ​​of the third image, and the functional expression of the second step value is:

[0059] ;

[0060] In the formula, This is the second step value. The maximum pixel value of the third image. The minimum pixel value of the third image. This is a preset constant.

[0061] Preferably, the preset algorithm is a bisection method, which constructs a lower limit convergence range based on the initial value, and iteratively divides the lower limit convergence range using the bisection method. After each division of the lower limit convergence range, the median value of the corresponding range is used as the new lower limit value of the grayscale interval of the second pixel.

[0062] Preferably, post-processing is performed on the fourth image to extract the head mask image from the fourth image, including:

[0063] Perform 3D binary morphological dilation on the fourth image to obtain the dilated fourth image;

[0064] Invert the pixels of the dilated fourth image to obtain the second inverted image;

[0065] Perform connected component filtering on the second inverted image to obtain the head region mask image;

[0066] Perform 3D binary morphological dilation on the head region mask image to obtain the dilated head region mask image;

[0067] The inflated head region mask image is resampled to obtain the sampled mask image;

[0068] The sampled mask image is smoothed using a 3D morphological closing operation to obtain the final head mask image.

[0069] Beneficial effects:

[0070] This invention is applicable to the segmentation and stripping of the skull in 3D magnetic resonance imaging of the head, especially in magnetic resonance angiography of the head, in order to eliminate the visual occlusion of the internal region by voxels (3D pixels) in the skull region and reduce the difficulty of diagnosis. Attached Figure Description

[0071] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0072] Figure 1 This is a flowchart of a method for head shell segmentation based on region growth threshold iteration in magnetic resonance imaging head 3D images provided by one embodiment of the present invention;

[0073] Figure 2 This is a schematic diagram of the head shell segmentation process based on region growth threshold iteration of magnetic resonance head 3D image according to one embodiment of the present invention.

[0074] Figure 3 This is a 3D MIP rendering of a 0.5T magnetic resonance TOF brain angiography image from this invention;

[0075] Figure 4 This is a block diagram of a head shell segmentation system based on region growth threshold iteration for magnetic resonance head 3D images provided by one embodiment of the present invention. Detailed Implementation

[0076] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0077] Example 1

[0078] Figure 1 This is a flowchart of a head shell segmentation method based on region growth threshold iteration provided by one embodiment of the present invention for 3D magnetic resonance head images. Figure 1 As shown, this embodiment provides a method for head shell segmentation based on region growing threshold iteration in 3D magnetic resonance imaging (MRI) head images. The method includes:

[0079] Step S10: Acquire a 3D image of the MRI head, and resample the 3D image of the MRI head to obtain a first image; in this embodiment, the 3D image of the MRI head is resampled, that is, the pixels in the three directions of the X-axis, Y-axis, and Z-axis of the 3D image are processed to be equally spaced, so that the pixel spacing in the three directions of the X-axis, Y-axis, and Z-axis is equal, for example, the spacing is 1.0mm, to obtain an isotropic 3D image, which is used as the first image; wherein, the acquired 3D image of the MRI head is as follows Figure 2 Image0 in the middle, the first image is Figure 2 Image1.

[0080] Step S20: Perform coarse extraction of the head shell mask based on the first image to obtain the second image, where each pixel of the second image is a binary mask.

[0081] Specifically, a coarse extraction of the head shell mask is performed based on the first image to obtain a second image, including:

[0082] Step S201: Perform 3D grayscale morphological dilation on the first image to fill holes in the skull, such as the ear area, to obtain the dilated first image, as shown below. Figure 2 Image2-1 in the image.

[0083] Step S202: Extract at least one pixel in the dilated first image as the first seed point; In this embodiment, the image parameters of the dilated first image are statistically analyzed, such as the cumulative grayscale value of all pixels in Image2-1, the minimum value among all pixels, the maximum value among all pixels, the number of non-zero pixels, and the total number of pixels in the 3D image; In this embodiment, the pixels corresponding to the 8 vertices in the dilated first image are used as the first seed points. The first seed points can also be specified by the user in the dilated first image.

[0084] Step S203: Based on the pre-constructed first pixel grayscale range, perform region growing on the first seed point no less than a first preset number of times to generate multiple first region growing images; when performing region growing operation, set the pixel value within the region to "1" and set the pixel value outside the region to "0".

[0085] In this embodiment, the upper limit of the grayscale range of the first pixel can be determined based on the minimum value among all pixels of the first image after dilation. For example, the minimum value among all pixels of the first image after dilation can be directly used as the upper limit of the grayscale range of the first pixel, and the lower limit of the grayscale range of the first pixel is 0. At this time, the grayscale range of the first pixel is [0, tH], where tH is the minimum value among all pixels of the first image after dilation.

[0086] In this embodiment, the first preset number of times is preferably three, so that at least three first region growth images can be obtained. After each region growth is performed, the upper limit value of the first pixel grayscale interval needs to be updated. The update method is as follows: the upper limit value of the first pixel grayscale interval is updated based on the pre-constructed first step value. The updated first pixel grayscale interval is used to re-perform region growth on the first seed point until the total number of reference pixels corresponding to each first region growth image is greater than the preset number and the number of times the region growth is performed reaches or exceeds the first preset number. That is, after each region growth is performed, the first step value is added to the upper limit value of the first pixel grayscale interval of the previous time to obtain the updated first pixel grayscale interval. In this embodiment, the upper limit value of the updated first pixel grayscale interval cannot exceed the maximum value among all pixels of the expanded first image. When the upper limit value of the updated first pixel grayscale interval exceeds the maximum value among all pixels of the expanded first image, the algorithm fails.

[0087] The first step value is constructed as follows: extract the image parameters of the first image after dilation, including the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels; determine the first step value based on the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels.

[0088] The function expression for the first step value is:

[0089] ;

[0090] In the formula, This is the first step value. This is the cumulative grayscale value of all pixels in the first image after dilation. This represents the number of non-zero pixels in the first image after dilation. As a preset constant, in this embodiment, The value is 100. The upper limit is 10.0. The lower limit is 1.0.

[0091] Step S204: Count the number of pixels with reference values ​​in each first region growth image to obtain the total number of reference pixels corresponding to each first region growth image; where the reference value is a pixel value of "1".

[0092] Step S205: When the total number of reference pixels corresponding to multiple consecutive first region growth images is greater than a preset number, calculate the ratio of the reference pixel increment between each two adjacent images, i.e., the ratio coefficient, based on the total number of reference pixels corresponding to the first region growth images; wherein, the preset number is preferably 5% of the total number of pixels in the 3D image;

[0093] In this embodiment, the upper limit of the grayscale range of the first pixel is updated with the first step value. The updated grayscale range of the first pixel is used to perform a region growth on the first seed point to obtain a new first region growth image. At the same time, the oldest first region growth image is discarded, so that there are always three first region growth images until the total number of reference pixels corresponding to the three first region growth images is greater than the preset number.

[0094] The expression for the proportionality coefficient is:

[0095] ;

[0096] In the formula, This is the scaling factor. n represents the total number of executions, where n is greater than or equal to 3. This represents the total number of reference pixels corresponding to the first region-grown image after the (n-1)th region-growing execution; This represents the total number of reference pixels corresponding to the first region-grown image after the (n-2)th region-growing execution; This represents the total number of reference pixels corresponding to the first region-grown image after the nth region-growing operation.

[0097] Step S206: When the scaling factor first exceeds the preset factor, it indicates that the pixel region of the region growth has spread from the outside into the head shell, and the pixel increment has jumped. Therefore, the new scaling factor is significantly higher than 1.0. The first region growth image after the previous region growth is used as the convergence image. In this embodiment, only the three latest first region growth images are selected as the region growth images. Scaling factor When the value is greater than the preset coefficient, it indicates that the region growing has converged; at this point, the first region growing image after the (n-1)th region growing operation is taken as the converged image, as shown in the figure. Figure 2 Image2-2 in the image; wherein, the preset coefficient is preferably 1.2.

[0098] Step S207: Perform morphological dilation on the converged image to obtain the dilated converged image, as shown below. Figure 2 Image2-3 in the image.

[0099] Step S208: Perform pixel inversion processing on the dilated convergent image to obtain a first inverted image. Specifically, the pixel inversion processing involves setting the pixel values ​​of "1" in the dilated convergent image to "0", and setting the pixel values ​​of "0" to "1". The first inverted image is... Figure 2 Image2-4 in the image.

[0100] Step S209: Perform morphological dilation on the inverted image to obtain the first inverted image after dilation. The first inverted image after dilation is... Figure 2 Image2-5 in the image.

[0101] Step S210: Obtain the second image based on the first inverted image and the dilated first inverted image; in this embodiment, the second image is obtained by subtracting the dilated first inverted image from the first inverted image at the pixel level. The second image is... Figure 2 Image2 in the middle.

[0102] In this embodiment, the proportional coefficient calculated from the number of pixels contained in three consecutive region growth results is used as the judgment condition for the convergence of the region growth operation, ensuring that the region growth extends from the outside to the vicinity of the head contour, but does not extend into the inside of the head shell.

[0103] Step S30: Perform flatness extraction on the first image to obtain a third image, wherein each pixel of the third image is a scalar value.

[0104] Specifically, flatness extraction is performed on the first image to obtain the third image, including:

[0105] Step S301: Stretch the pixel grayscale values ​​of the first image to obtain the stretched image, for example, stretch the pixel grayscale values ​​of the first image to the range of [0, 8196].

[0106] Step S302: Perform gradient anisotropic diffusion on the stretched image, that is, perform smoothing filtering on the image while preserving edge information to obtain the processed image. The processed image is... Figure 2 Image3-1 in the image.

[0107] Step S303: Using the processed image as the image to be processed, calculate the recursive Gaussian-Hassian matrix of the image to be processed based on the recursive Gaussian-Hassian algorithm. The recursive Gaussian-Hassian matrix is ​​an image matrix with the same size as the pixel size of the image to be processed. Each element in the recursive Gaussian-Hassian matrix is ​​a 3×3 second-order tensor (i.e., a 3×3 matrix). The recursive Gaussian-Hassian matrix is ​​calculated using the HessianRecursiveGaussianImageFilter module in the itk library. The HessianRecursiveGaussianImageFilter module in the itk library is a class template for calculating the Hessian matrix of an image. This module calculates the Hessian matrix by convolving the image with the second-order and cross-derivatives of Gaussians.

[0108] Step S304: Calculate the flatness of each element (pixel) of the 3×3 matrix in the recursive Gaussian-Hayssen matrix (image) to obtain the calculated image. Use this calculated image as the new image to be processed, and recalculate the recursive Gaussian-Hayssen matrix and flatness until the flatness calculation is performed a second preset number of times to obtain the final image. Use this final image as the third image; where the second preset number of times is 3 or 4, and the third image is... Figure 2 Image3 in the image.

[0109] In this embodiment, a "flatness value" is calculated for each element (voxel) in the recursive Gaussian-Hessian matrix to obtain an image with the same pixel size as the original image, where each pixel is also a scalar value. Specifically, this is achieved by calculating three eigenvalues ​​in the 3×3 matrix and substituting them into a conversion formula to obtain the result value. These two steps are performed using the HessianToObjectnessMeasureImageFilter module from the itk library. This module is a class template used to calculate the speckle similarity value, tubular similarity value, and 2D planar similarity value of each voxel in a Hessian matrix 3D image. In this example, the module is used to calculate the 2D planar similarity value (i.e., the flatness value). The smaller the curvature of a single voxel in the original image (the closer it is to a plane), the higher the calculated flatness value. Therefore, by performing grayscale stretching and gradient anisotropic diffusion on the image before calculating the recursive Gaussian-Hassen matrix, the anti-interference and generalization capabilities are enhanced. Furthermore, by repeatedly calculating the recursive Gaussian-Hassen matrix and the flatness value, the high flatness value more accurately indicates the pixel (voxel) point located on the plane (small curvature surface), thus enhancing the anti-interference capability.

[0110] Step S40: Based on the second and third images, perform fine extraction of the head shell mask to obtain the fourth image, where each pixel of the fourth image is a binary mask.

[0111] Specifically, based on the second and third images, a headshell mask is finely extracted to obtain a fourth image, including:

[0112] Step S401: Extract the maximum and minimum pixel values ​​of the third image.

[0113] Step S402: Based on the maximum and minimum pixel values ​​of the third image, construct a second pixel grayscale range, where the lower limit of the second pixel grayscale range is the minimum pixel value of the third image, and the upper limit of the second pixel grayscale range is the maximum pixel value of the third image.

[0114] Step S403: Take all pixels in the second image that have a reference value (non-zero) as the second seed point set.

[0115] Step S404: Based on the second pixel grayscale interval, iteratively grow the second seed point set on the third image to generate multiple second region-grown images. In the next iteration, update the lower limit of the second pixel grayscale interval with the pre-constructed second step value. Similarly, when performing the region growing operation, set the pixel value within the region to "1" and the pixel value outside the region to "0". The updated lower limit of the second pixel grayscale interval cannot exceed the upper limit of the second pixel grayscale interval, i.e., the maximum pixel value of the third image. If it exceeds this limit, the algorithm fails.

[0116] The second step value is constructed based on the maximum and minimum pixel values ​​of the third image, and the function expression for the second step value is:

[0117] ;

[0118] In the formula, This is the second step value. The maximum pixel value of the third image. The minimum pixel value of the third image. As a preset constant, The value is usually 128.0.

[0119] Step S405: Perform joint pixel statistics on the second region-grown image and the second image after each iteration to obtain a first statistical result and a second statistical result. The first statistical result is the total number of pixels in the two images that satisfy a first preset condition, where the first preset condition is any zero pixel in the second image and the corresponding pixel in the second region-grown image is non-zero. The second statistical result is the total number of pixels in the second image that satisfy a second preset condition, where the second preset condition is any non-zero pixel in the second image and the corresponding pixel in the second region-grown image is zero.

[0120] Step S406: Count the total number of non-zero pixels in the second image. Use the total number of non-zero pixels in the second image, the first statistical result, and the second statistical result as inputs to a preset loss function to obtain the iterative loss value for region growing; wherein, the expression of the loss function is:

[0121] ;

[0122] In the formula, m is the number of iterations. This represents the iterative loss value for the region growth after the m-th iteration. This is the second statistical result. This is the first statistical result. This represents the total number of non-zero pixels in the second image.

[0123] Step S407: As the number of iterations increases, the iteration loss value should show a trend of first decreasing and then increasing. Obtain the iteration loss value of the region growth after three consecutive iterations. When the iteration loss value of the region growth after three consecutive iterations shows an increase, it is considered as preliminary convergence, that is, approximate convergence.

[0124] In this embodiment, when the number of iterations is not less than 3, and there are two consecutive iteration loss values ​​that increase, that is: At this point, it indicates that the iterative loss value has reached a local minimum, and the region growth has roughly converged.

[0125] Step S408: After initial convergence, the lower limit of the second pixel grayscale interval used in the first of the three consecutive iterations is used as the initial value. The lower limit of the second pixel grayscale interval is finely adjusted near the initial value based on the preset algorithm. The second seed point set is then used to perform a second iteration of region growth on the third image using the finely adjusted second pixel grayscale interval, and the iteration loss value is recalculated until the iteration loss value is precisely converged to a local minimum.

[0126] In this embodiment, the preset algorithm is a binary search method, and the area near the initial value is the convergence range of the lower limit value, which is constructed based on the initial value; for example: The lower limit of the corresponding second pixel grayscale range ± , respectively, serve as the upper and lower limits of the convergence range of the lower limit value.

[0127] The lower limit convergence range is then iteratively divided using a bisection method. The median value of the range after each division is used as the new lower limit value for the second pixel's grayscale interval. After the second iteration, the iterative loss value of the region growing converges precisely to a local minimum. At this point, a binary image of the region growing result at precise convergence can be obtained, as shown below. Figure 2 Image4-1 in the image.

[0128] Step S409: Mask the second region-grown image corresponding to the exact convergence of the iterative loss value after the second iteration of region growing, and overlay the second image to obtain the fourth image. This is achieved by performing a pixel-wise AND operation between the binary image of the region growing result at exact convergence and the second image. The resulting fourth image is the accurate headshell mask image. Figure 2 Image4 in the image.

[0129] In this embodiment, all non-zero pixels in the second image are used as the second seed point set to perform region growing operation on the third image. This can filter out pixels in the third image that are far from the coarse head mask and improve separation accuracy.

[0130] Step S50: Post-process the fourth image to extract the head mask image from the fourth image.

[0131] Specifically, the fourth image is post-processed to extract the head mask image from the fourth image, including:

[0132] Step S501: Perform 3D binary morphological dilation on the fourth image to obtain the dilated fourth image. The dilated fourth image is... Figure 2 Image5-1 in the image.

[0133] Step S502: Invert the pixels of the dilated fourth image to obtain a second inverted image, that is, set the pixel values ​​of "1" in the dilated fourth image to "0", and set the pixel values ​​of "0" to "1". The second inverted image is... Figure 2 Image5-2 in the image.

[0134] Step S503: Perform connected component filtering on the second inverted image, retaining only the largest connected region containing the center of the 3D image, i.e., the head region within the skull, to obtain the head region mask image. The head region mask image is... Figure 2 Image5-3 in the image.

[0135] Step S504: Perform 3D binary morphological dilation on the head region mask image to obtain the dilated head region mask image. The dilated head region mask image is as follows: Figure 2 Image5-4 in the image.

[0136] Step S505: Resample the dilated head region mask image to restore the pixel spacing of the dilated head region mask image to the pixel spacing of the original MRI head 3D image, obtaining a sampled mask image. The sampled mask image is... Figure 2 Image5-5 in the image.

[0137] Step S506: Perform a 3D morphological closing operation on the sampled mask image to smooth the 3D contour lines, obtaining the final head mask image. The final head mask image is... Figure 2 Image5 in the image.

[0138] Step S60: Perform pixel masking on the 3D head image from the magnetic resonance imaging (MRI) scan to obtain a 3D head image with the scalp removed. The 3D head image with the scalp removed is... Figure 2 Image6 in the image.

[0139] In this embodiment, a 3D MIP rendering of a 0.5T MRI TOF brain angiography is shown, as follows: Figure 3 As shown (left: before removing the scalp; right: after removing the scalp).

[0140] Prior art 1, "Skull Stripping for MRI Images Using Morphological Operators," uses a mixed threshold to extract the head region from the background. The extracted head region contains hollow areas, and this method is very sensitive to differences between different MRI sequences. In contrast, this embodiment uses an iterative region growing algorithm to extract the head region from the background. The extracted head region is a solid area, and this method is not sensitive to differences between different MRI sequences. Furthermore, prior art 1 can only segment the brain region, while the method of this embodiment can segment the skull and the area within the skull.

[0141] Existing technology 2, "Brain segmentation in magnetic resonance human head scans using multi-seeded region growing," processes single-layer 2D images, making it susceptible to the influence of so-called "intermediate layers," which may not contain the brain. It can only process a limited number of magnetic resonance imaging (MRI) sequence types (T1, T2, and PD-weighted). The method of this embodiment directly processes 3D images. It is not sensitive to layer localization effects; the method of this embodiment is insensitive to differences in different MRI sequences and supports TOF type in addition to T1, T2, and PD-weighted sequence types.

[0142] Therefore, this invention is applicable to the segmentation and stripping of the skull in head magnetic resonance 3D images, especially head magnetic resonance angiography images, to eliminate the visual occlusion of the internal region by voxels (3D pixels) in the skull region and reduce the difficulty of diagnosis.

[0143] Example 2

[0144] Figure 4 This is a block diagram of a head shell segmentation system based on region growing threshold iteration for 3D magnetic resonance imaging of the head, provided by one embodiment of the present invention. Figure 4 As shown, this embodiment provides a head shell segmentation system based on region growing threshold iteration for 3D magnetic resonance imaging (MRI) head images, used to implement the head shell segmentation method based on region growing threshold iteration for 3D magnetic resonance imaging (MRI) head images in Embodiment 1. The system includes:

[0145] The image acquisition module is used to acquire a 3D image of the magnetic resonance head and resample the 3D image of the magnetic resonance head to obtain a first image.

[0146] The first extraction module is used to perform coarse extraction of the head shell mask based on the first image to obtain the second image, where each pixel of the second image is a binary mask.

[0147] A planar extraction module is used to extract the planarity of the first image to obtain a third image, wherein each pixel of the third image is a scalar value;

[0148] The second extraction module is used to perform fine extraction of the head shell mask based on the second image and the third image to obtain a fourth image, wherein each pixel of the fourth image is a binary mask.

[0149] The post-processing module is used to perform post-processing on the fourth image and extract the head mask image from the fourth image;

[0150] The image fusion module is used to perform pixel masking on the 3D head image of the magnetic resonance imaging head based on the head mask image to obtain a 3D head image with the scalp removed.

[0151] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the head shell segmentation method based on region growth threshold iteration of magnetic resonance head 3D image in Embodiment 1.

[0152] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the head shell segmentation method based on region growth threshold iteration of magnetic resonance head 3D images in Embodiment 1.

[0153] Therefore, this invention is applicable to the segmentation and stripping of the skull in head magnetic resonance 3D images, especially head magnetic resonance angiography images, to eliminate the visual occlusion of the internal region by voxels (3D pixels) in the skull region and reduce the difficulty of diagnosis.

[0154] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0155] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0156] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for head shell segmentation based on region growing threshold iteration in 3D magnetic resonance imaging (MRI) head images, characterized in that, The method includes: Acquire a 3D image of the head using magnetic resonance imaging (MRI), and resample the 3D image of the head to obtain the first image; Based on the first image, a coarse extraction of the head shell mask is performed to obtain the second image, where each pixel of the second image is a binary mask. Flatness extraction is performed on the first image to obtain the third image, where each pixel of the third image is a scalar value; Based on the second and third images, a headshell mask is extracted to obtain a fourth image, where each pixel of the fourth image is a binary mask, including: Extract the maximum and minimum pixel values ​​from the third image; Construct the second pixel grayscale range based on the maximum and minimum pixel values ​​of the third image; Use all pixels in the second image that have reference values ​​as the second seed point set; Based on the grayscale range of the second pixel, iterative region growth is performed on the second seed point set on the third image to generate multiple second region grown images. In the next iteration, the lower limit value of the grayscale range of the second pixel is updated with the pre-constructed second step value. After each iteration, the second region-grown image and the second image are subjected to joint pixel statistics to obtain a first statistical result and a second statistical result. The first statistical result is the total number of pixels in the two images that satisfy a first preset condition, where the first preset condition is any zero pixel in the second image and the corresponding pixel in the second region-grown image is non-zero. The second statistical result is the total number of pixels in the two images that satisfy a second preset condition, where the second preset condition is any non-zero pixel in the second image and the corresponding pixel in the second region-grown image is zero. The total number of non-zero pixels in the second image is counted. The total number of non-zero pixels in the second image, the first statistical result, and the second statistical result are used as inputs to a preset loss function to obtain the iterative loss value of region growing. Obtain the iterative loss value of three consecutive region growth iterations. When the iterative loss value of the region growth increases after three consecutive iterations, it is considered as initial convergence. After initial convergence, the lower limit of the second pixel grayscale interval used in the first of the three consecutive iterations is used as the initial value. At this initial value, the lower limit of the second pixel grayscale interval is finely adjusted based on the preset algorithm. The second seed point set is then used to perform a second iteration of region growth on the third image using the finely adjusted second pixel grayscale interval, and the iteration loss value is recalculated until the iteration loss value is precisely converged to a local minimum. The fourth image is obtained by masking and superimposing the second region growth image corresponding to the iterative loss value that has converged precisely after the second iteration of region growth with the second image. Post-process the fourth image to extract the head mask image from the fourth image; Pixel masking is performed on the 3D head image of the magnetic resonance imaging head based on the head mask image to obtain a 3D head image with the head shell removed.

2. The head shell segmentation method for 3D magnetic resonance head images based on region growth threshold iteration according to claim 1, characterized in that, Based on the first image, a coarse extraction of the head shell mask is performed to obtain the second image, which includes: Perform 3D grayscale morphological dilation on the first image to obtain the dilated first image; Extract at least one pixel from the dilated first image as the first seed point; Based on the pre-constructed first pixel grayscale range, perform region growing on the first seed point no less than a first preset number of times to generate multiple first region growing images; The total number of reference pixels in each first region growth image is obtained by counting the number of pixels that are reference values ​​in each first region growth image. When the total number of reference pixels corresponding to multiple consecutive first region growth images is greater than a preset number, the ratio of the reference pixel increment between each two adjacent reference pixel increments is calculated based on the total number of reference pixels corresponding to the first region growth images, and the ratio coefficient is obtained. When the scaling factor is greater than the preset factor for the first time, the first region growth image after the previous region growth is used as the convergence image; Morphological dilation is performed on the convergent image to obtain the dilated convergent image. The pixels of the dilated convergent image are inverted to obtain the first inverted image. Morphological dilation is performed on the inverted image to obtain the first inverted image after dilation. The second image is obtained based on the first inverted image and the dilated first inverted image.

3. The head shell segmentation method for 3D magnetic resonance head images based on region growth threshold iteration according to claim 2, characterized in that, The method further includes: When the total number of reference pixels corresponding to each first region growth image is not greater than the preset number, or the number of times the region growth is executed has not reached the first preset number, the upper limit value of the grayscale interval of the first pixel is updated based on the pre-constructed first step value, and the region growth is re-executed on the first seed point with the updated first pixel grayscale interval until the total number of reference pixels corresponding to each first region growth image is greater than the preset number and the number of times the region growth is executed reaches or exceeds the first preset number.

4. The method for head shell segmentation based on region growth threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 3, is characterized in that... The method further includes: constructing the first step value, including: Extract the image parameters of the first image after dilation, the image parameters including: the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels; The first step value is determined based on the cumulative grayscale value of all pixels in the first image after dilation and the number of non-zero pixels.

5. The method for head shell segmentation based on region growth threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 3, is characterized in that... The reference value is a pixel value of "1", and the first preset number of times is three.

6. The method for head shell segmentation based on region growing threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 1, is characterized in that... Flatness extraction is performed on the first image to obtain the third image, which includes: Stretch the pixel grayscale values ​​of the first image to obtain the stretched image; The stretched image is then subjected to a smoothing filter based on gradient anisotropic diffusion to obtain the processed image. The processed image is used as the image to be processed. Based on the recursive Gaussian-Hassen algorithm, the recursive Gaussian-Hassen matrix image of the image to be processed is calculated. Flatness calculation is performed on each element matrix in the recursive Gaussian-Hayssen matrix image to obtain the calculated image. The calculated image is then used as the new image to be processed. The recursive Gaussian-Hayssen matrix image and flatness are recalculated until the number of flatness calculations reaches the second preset number, resulting in the final image. The final image is then used as the third image.

7. The method for head shell segmentation based on region growing threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 1, is characterized in that... The second step value is constructed based on the maximum and minimum pixel values ​​of the third image, and the function expression for the second step value is: ; In the formula, This is the second step value. The maximum pixel value of the third image. The minimum pixel value of the third image. This is a preset constant.

8. The method for head shell segmentation based on region growth threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 1, is characterized in that... The preset algorithm is a binary search method. Based on the initial value, a lower limit convergence range is constructed. The lower limit convergence range is iteratively divided using the binary search method. After each division of the lower limit convergence range, the median value of the corresponding range is used as the new lower limit value of the grayscale interval of the second pixel.

9. The method for head shell segmentation based on region growth threshold iteration in magnetic resonance imaging of a 3D head, as described in claim 1, is characterized in that... Post-processing is performed on the fourth image to extract the head mask image from it, including: Perform 3D binary morphological dilation on the fourth image to obtain the dilated fourth image; Invert the pixels of the dilated fourth image to obtain the second inverted image; Perform connected component filtering on the second inverted image to obtain the head region mask image; Perform 3D binary morphological dilation on the head region mask image to obtain the dilated head region mask image; The inflated head region mask image is resampled to obtain the sampled mask image; The sampled mask image is smoothed using a 3D morphological closing operation to obtain the final head mask image.

Citation Information

Patent Citations

  • Skull segmenting method based on DICOM (Digital Imaging and Communications in Medicine) sequence

    CN104952079A

  • Cerebrovascular image segmentation method and device, electronic equipment and storage medium

    CN115661467A