Magnetic resonance head 3D image head shell segmentation method based on region growth threshold iteration

Through the method based on the region growth threshold iteration, the problem of head shell segmentation that the prior art cannot be applied to MRA-TOF imaging is solved, and the accurate segmentation of the head shell and effective de-occlusion of the internal area is achieved, and it is suitable for the application of head magnetic resonance images, especially vascular imaging.

CN120125600AActive Publication Date: 2025-06-10MARVEL STONE HEALTHCARE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing 3D image segmentation method of magnetic resonance head cannot be applied to MRA-TOF imaging, and it is impossible to effectively segment the head shell and retain the vascular pixels below the brain.

Method used

Using a method based on regional growth threshold iteration, the head shell mask rough extraction, planarity extraction and head shell mask precision extraction are used, combined with morphological operations and iterative regional growth, the head shell shell is gradually divided and its occlusion on the internal area is removed.

Benefits of technology

The adaptability to different magnetic resonance imaging sequences is achieved, and the head shell can be accurately segmented and its visual occlusion on the internal area can be removed, reducing the difficulty of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125600A_ABST
    Figure CN120125600A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image segmentation, and discloses a magnetic resonance head 3D image head shell segmentation method based on region growth threshold iteration, and the method comprises the steps: obtaining a magnetic resonance head 3D image, and carrying out the resampling of the magnetic resonance head 3D image, and obtaining a first image; performing head and shell mask coarse extraction based on the first image to obtain a second image, each pixel of the second image being a binary mask; flatness extraction is carried out on the first image to obtain a third image, and each pixel of the third image is a scalar value; based on the second image and the third image, head and shell mask fine extraction is carried out, a fourth image is obtained, and each pixel of the fourth image is a binary mask; post-processing the fourth image, and extracting 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 without a head shell. Visual shielding of voxels of the head shell area to the internal area is eliminated, and the diagnosis difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image segmentation, and particularly relates to a method for segmenting the skull of a 3D magnetic resonance head image based on region growth threshold iteration. Background Technique

[0002] The 3D magnetic resonance head image can provide more detailed brain structure information, which plays an important role in diagnosing brain tumors, cerebrovascular diseases, nervous system diseases, etc. It can help doctors more accurately judge the nature, location and scope of diseases. It can be widely applied in multiple disciplinary fields such as medicine, biology, and psychology.

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

[0004] At present, the existing segmentation methods mainly include the following: First, "Skull Stripping for MRI Images Using Morphological Operators" proposed by authors such as Swiebocka-Wiek J. This technology is an image processing method based on morphology; its technical implementation includes 5 steps: 1. Perform image threshold segmentation; 2. Fill the gaps between the segmented objects through morphological operations; 3. Edge-detection; 4. Select the object with the largest area in the image and create a binary mask (Mask); 5. Combine the mask with the input image to obtain the output image.

[0005] This technology has the following problems in practical applications: it is very sensitive to differences in different magnetic resonance imaging sequences, and only T1-weighted imaging of 3T magnetic resonance is involved in this paper; it cannot be applied to scalp segmentation of MRA-TOF (Magnetic Resonance Angiography - Time of Flight, abbreviated as MRA-TOF, which is a magnetic resonance angiography technique) imaging to retain the vascular pixels under the brain.

[0006] II. The technology proposed by authors such as Somasundaram K and Kalavathi P in the paper "Brain segmentation in magnetic resonance human head scans using multi-seeded region growing" is an image processing method based on region growing. Its technical implementation includes two major steps: 1. First, perform brain segmentation on the middle slice image; 2. Then, perform brain segmentation on other slice images; The following problems exist in the actual application of this technology: it is very sensitive to differences in different magnetic resonance imaging sequences. This paper only involves processing T1-weighted imaging, T2-weighted imaging, and PD-weighted imaging of magnetic resonance. Similarly, it cannot be applied to perform skull segmentation on MRA-TOF imaging and retain the vascular pixels (voxels) below the brain.

[0007] Therefore, the existing segmentation technology cannot be applied to perform skull segmentation on MRA-TOF imaging and retain the vascular pixels below the brain. Summary of the Invention

[0008] The purpose of the present invention is to provide a method for skull segmentation of magnetic resonance head 3D images based on region growth threshold iteration to solve the problem that the existing segmentation technology cannot be applied to perform skull segmentation on MRA-TOF imaging and retain the vascular pixels below the brain.

[0009] To achieve the above purpose, the present invention adopts the following technical solutions: In the first aspect, the present invention provides a method for skull segmentation of magnetic resonance head 3D images based on region growth threshold iteration, and the method includes: Obtain a magnetic resonance head 3D image, and resample the magnetic resonance head 3D image to obtain a first image; Based on the first image, perform rough extraction of the skull mask to obtain a second image, and each pixel of the second image is a binary mask; Perform flatness extraction on the first image to obtain a third image, and each pixel of the third image is a scalar value; Based on the second image and the third image, perform fine extraction of the skull mask to obtain a fourth image, and each pixel of the fourth image is a binary mask; Perform post-processing on the fourth image to extract the head mask image in the fourth image; Based on the head mask image, perform pixel masking on the magnetic resonance head 3D image to obtain a 3D head image without the skull.

[0010] Preferably, based on the first image, a rough extraction of the head shell mask is performed to obtain a second image, including: Perform 3D gray-scale morphological dilation on the first image to obtain the dilated first image; Extract at least one pixel point from the dilated first image as the first seed point; Based on the pre-constructed first pixel gray-scale interval, perform region growing on the first seed point no less than the first preset number of times to generate multiple first region-growing images; Count the number of pixels with the reference value in each first region-growing image to obtain the total number of reference pixels corresponding to each first region-growing image; When the total number of reference pixels corresponding to a continuous plurality of first region-growing images is greater than the preset quantity, calculate the ratio of the increment of the reference pixels for every two adjacent times based on the total number of reference pixels corresponding to the first region-growing image to obtain the ratio coefficient; When the ratio coefficient is greater than the preset coefficient for the first time, use the first region-growing image after the previous execution of region growing as the convergence image; Perform morphological dilation on the convergence image to obtain the dilated convergence image; Perform pixel inversion processing on the dilated convergence image to obtain the first inverted image; Perform morphological dilation on the inverted image to obtain the dilated first inverted image; Obtain the second image according to the first inverted image and the dilated first inverted image.

[0011] Preferably, the method further includes: When the total number of reference pixels corresponding to each first region-growing image is not greater than the preset quantity, or the number of executions of region growing has not reached the first preset number of times, update the upper limit value of the first pixel gray-scale interval based on the pre-constructed first step value, and perform region growing on the first seed point again with the updated first pixel gray-scale interval until the total number of reference pixels corresponding to each first region-growing image is greater than the preset quantity and the number of executions of region growing reaches or exceeds the first preset number of times.

[0012] Preferably, the method further includes: constructing the first step value, including: Extract the image parameters of the dilated first image, where the image parameters include: the cumulative sum of all pixel gray values in the dilated first image and the number of non-zero pixels; Determine the first step value according to the cumulative sum of all pixel gray values in the dilated first image and the number of non-zero pixels.

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

[0014] Preferably, performing flatness extraction on the first image to obtain a third image, including: Performing pixel gray value stretching on the first image to obtain a stretched image; Performing smoothing filtering processing based on gradient anisotropic diffusion on the stretched image to obtain a processed image; Taking the processed image as the image to be processed, and calculating the recursive Gaussian Hessian matrix image of the image to be processed based on the recursive Gaussian Hessian algorithm; Calculating the flatness of each element matrix in the recursive Gaussian Hessian matrix image to obtain a calculated image, taking the calculated image as the new image to be processed, recalculating the recursive Gaussian Hessian matrix image and the flatness until the execution times of the flatness calculation reach the second preset times, obtaining the final calculated image, and taking the final calculated image as the third image.

[0015] Preferably, performing fine extraction of the head shell mask based on the second image and the third image to obtain a fourth image, including: Extracting the pixel maximum value and the pixel minimum value of the third image; Constructing a second pixel gray value interval according to the pixel maximum value and the pixel minimum value of the third image; Taking the pixel points with all pixels as the reference value in the second image as the second seed point set; Based on the second pixel gray value interval, performing iterative region growing on the second seed point set on the third image to generate multiple second region growing images, and in the next iteration, updating the lower limit value of the second pixel gray value interval with a pre-constructed second step value; Performing joint pixel statistics on the second region growing image after each iteration and the second image to obtain a first statistical result and a second statistical result, wherein the first statistical result is: the total number of pixels in the two images that satisfy the first preset condition, and the first preset condition is any pixel that is zero in the second image, and the pixel corresponding to the zero pixel in the second region growing image is non-zero; the second statistical result is the total number of pixels in the two images that satisfy the second preset condition, and the second preset condition is any pixel that is non-zero in the second image, and the pixel corresponding to the non-zero pixel in the second region growing image is zero; Counting the total number of non-zero pixels in the second image, and taking the total number of non-zero pixels in the second image, the first statistical result and the second statistical result as the input of a preset loss function to obtain the iterative loss value of the region growing; Obtaining the iterative loss value of the region growing after three consecutive iterations, and when the iterative loss value of the region growing after three consecutive iterations shows an increase, it is regarded as preliminary convergence; After initial convergence, the lower limit value of the second pixel grayscale interval used in the first of three consecutive iterations is used as the initial value, the lower limit value of the second pixel grayscale interval is fine-tuned based on a preset algorithm near the initial value, and the second seed point set is subjected to secondary iterative region growth on the third image with the finely adjusted second pixel grayscale interval, and the iterative loss value is recalculated until the iterative loss value accurately converges to a local minimum; The second region growing image corresponding to the iterative loss value that converges precisely after the second iterative region growing is masked and superimposed on the second image to obtain a fourth image.

[0016] Preferably, the second step value is constructed based on the maximum pixel value and the minimum pixel value of the third image, and the function expression of the second step value is: ; In the formula, is the second step value, is the maximum pixel value of the third image, is the minimum pixel value of the third image, is a preset constant.

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

[0018] Preferably, post-processing the fourth image to extract the head mask image in the fourth image includes: Performing 3D binary morphological dilation on the fourth image to obtain a dilated fourth image; Perform pixel inversion on the expanded fourth image to obtain a second inverted image; Performing connected area filtering on the second inverted image to obtain a head area mask image; Perform 3D binary morphological dilation on the head region mask image to obtain an expanded head region mask image; Resampling the expanded head region mask image to obtain a sampled mask image; The sampled mask image is smoothed based on a 3D morphological closing operation to obtain the final head mask image.

[0019] Beneficial effects: The present invention is applicable to the segmentation and stripping of the head capsule in head magnetic resonance 3D images, especially head magnetic resonance angiography images, so as to eliminate the visual occlusion of the voxels (3D pixels) in the head capsule area to the internal area and reduce the difficulty of diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a flow chart of a method for head shell segmentation of a 3D magnetic resonance head image based on region growing threshold iteration provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of a process of head shell segmentation of a magnetic resonance head 3D image based on region growing threshold iteration provided by an embodiment of the present invention; Figure 3 It is a 3D MIP rendering of 0.5T magnetic resonance TOF brain vascular imaging of the present invention; Figure 4 It is a block diagram of a head capsule segmentation system for magnetic resonance head 3D images based on region growing threshold iteration provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order 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 combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0022] Embodiment 1 Figure 1 FIG. 1 is a flowchart of a method for head shell segmentation of a 3D magnetic resonance head image based on region growing threshold iteration provided by an embodiment of the present invention. Figure 1 As shown, this embodiment provides a method for head shell segmentation of a magnetic resonance head 3D image based on region growing threshold iteration, the method comprising: Step S10: Acquire a 3D magnetic resonance head image, and resample the 3D magnetic resonance head image to obtain a first image. In this embodiment, the 3D magnetic resonance head image 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 with equal spacing, so that the pixel spacings in the three directions of the X-axis, Y-axis, and Z-axis are equal, for example, the spacings are all 1.0 mm, and an isotropic 3D image is obtained, and the isotropic 3D image is used as the first image. The acquired 3D magnetic resonance head image is as follows: Figure 2 Image0 in the first image is Figure 2 Image1.

[0023] Step S20: performing a rough extraction of the head shell mask based on the first image to obtain a second image, wherein each pixel of the second image is a binary mask.

[0024] Specifically, performing a rough extraction of a head shell mask based on the first image to obtain a second image includes: Step S201: Perform 3D grayscale morphological expansion on the first image to fill the holes on the head shell, such as the ear area, to obtain an expanded first image. The expanded first image is as follows: Figure 2 Image2-1 in the image.

[0025] Step S202: extract at least one pixel point in the expanded first image as a first seed point; in this embodiment, statistics are performed on image parameters of the expanded first image, such as the cumulative grayscale value of all pixels of Image2-1, the minimum value of all pixels, the maximum value of all pixels, the number of non-zero pixels and the total number of pixels in the 3D image; in this embodiment, the pixel points corresponding to the 8 vertices in the expanded first image are used as the first seed points, and the first seed points can also be specified by the user in the expanded first image.

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

[0027] In this embodiment, the upper limit value of the first pixel grayscale interval can be determined according to the minimum value of all pixels of the expanded first image. For example, the minimum value of all pixels of the expanded first image is directly used as the upper limit value of the first pixel grayscale interval, and the lower limit value of the first pixel grayscale interval is 0. At this time, the first pixel grayscale interval is [0, tH], where tH is the minimum value of all pixels of the expanded first image.

[0028] In this embodiment, the first preset number of times is preferably three times, so that at least three first regional growth images can be obtained. After each regional growth is performed, it is necessary to update the upper limit value of the first pixel gray level interval. The update method is as follows: update the upper limit value of the first pixel gray level interval based on the pre-constructed first step value, and perform regional growth on the first seed point again with the updated first pixel gray level interval until the total number of reference pixels corresponding to each first regional growth image is greater than the preset number and the number of executions of the regional growth reaches or exceeds the first preset number of times. That is, after each regional growth is performed, add the first step value to the upper limit value of the first pixel gray level interval in the previous time to obtain the updated first pixel gray level interval; in this embodiment, the upper limit value of the updated first pixel gray level interval cannot exceed the maximum value of all pixels in the dilated first image. When the upper limit value of the updated first pixel gray level interval exceeds the maximum value of all pixels in the dilated first image, the algorithm fails.

[0029] Among them, the construction method of the first step value is: extract the image parameters of the dilated first image, and the image parameters include: the cumulative sum of all pixel gray levels in the dilated first image and the number of non-zero pixels; determine the first step value according to the cumulative sum of all pixel gray levels in the dilated first image and the number of non-zero pixels.

[0030] The function expression of the first step value is: ; In the formula, is the first step value, is the cumulative sum of all pixel gray levels in the dilated first image, is the number of non-zero pixels in the dilated first image, is a preset constant. In this embodiment, takes the value of 100, the upper limit of is limited to 10.0, the lower limit of is limited to 1.0.

[0031] Step S204: Count the number of pixels with the reference value in each first regional growth image to obtain the total number of reference pixels corresponding to each first regional growth image; among them, the reference value is that the pixel value is "1".

[0032] Step S205: When the total number of reference pixels corresponding to a continuous plurality of first regional growth images is greater than the preset number, calculate the ratio of the reference pixel increment between every two adjacent times based on the total number of reference pixels corresponding to the first regional growth image, that is, the proportionality coefficient; among them, the preset number is preferably 5% of the total number of 3D image pixels; In this embodiment, the upper limit value of the first pixel gray level interval is updated with a first step value, and the updated first pixel gray level interval is used to perform region growing on the first seed point once to obtain a new first region growing image. At the same time, the oldest first region growing image is discarded, so that there are always three first region growing images until the total number of reference pixels corresponding to the three first region growing images is greater than a preset number.

[0033] The expression of the proportionality coefficient is: ; In the formula, is the proportionality coefficient. n represents the total number of executions, and n is greater than or equal to 3; is the total number of reference pixels corresponding to the first region growing image after the (n - 1)-th execution of region growing; is the total number of reference pixels corresponding to the first region growing image after the (n - 2)-th execution of region growing; is the total number of reference pixels corresponding to the first region growing image after the n-th execution of region growing.

[0034] Step S206: When it first appears that the proportionality coefficient is greater than the preset coefficient, it indicates that the pixel region of region growing has spread from the outside into the inside of the skull, and the pixel increment has a jump. Therefore, the new proportionality coefficient is significantly higher than 1.0. The first region growing image after the previous execution of region growing is used as the convergence image. In this embodiment, since only the latest three first region growing images are selected as the images for region growing; when the proportionality coefficient is greater than the preset coefficient, it means that the region growing has converged; at this time, the first region growing image after the (n - 1)-th execution of region growing is used as the convergence image, and the convergence image is as shown in Figure 2 Image2-2; among them, the preset coefficient is preferably 1.2.

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

[0036] Step S208: Perform pixel inversion processing on the dilated convergence image to obtain the first inverted image. The pixel inversion processing is specifically: set the pixel value of "1" in the dilated convergence image to "0", and set the pixel value of "0" to "1". The first inverted image is Figure 2 Image2-4.

[0037] Step S209: Perform morphological dilation on the inverted image to obtain the dilated first inverted image, and the dilated first inverted image is Figure 2 Image2-5.

[0038] Step S210: Obtain a second image based on the first inverted image and the dilated first inverted image; in this embodiment, by performing pixel-level subtraction between the dilated first inverted image and the first inverted image, the second image can be obtained, and the second image is Image2 in Figure 2 In this embodiment, the proportionality coefficient calculated using the number of pixels included in the results of three consecutive region growing operations is used as the judgment condition for the iterative convergence of the region growing operation, ensuring that the region growing spreads from the outside to near the head contour and does not spread inside the skull.

[0039]

[0040] Step S30: Extract the flatness of the first image to obtain a third image, and each pixel of the third image is a scalar value.

[0041] Specifically, extracting the flatness of the first image to obtain a third image includes: Step S301: Stretch the pixel gray values of the first image to obtain a stretched image. For example, stretch the pixel gray values of the first image to the range [0, 8196].

[0042] Figure 2 Step S302: Perform gradient anisotropic diffusion on the stretched image, that is, perform smoothing filtering on the image while retaining edge information to obtain a processed image, and the processed image is Image3-1 in

[0043]

[0044] Step S303: Use the processed image as the image to be processed, and based on the recursive Gaussian Hessian algorithm, calculate the recursive Gaussian Hessian matrix of the image to be processed; the recursive Gaussian Hessian matrix is an image matrix, and the size of this matrix is the same as the pixel size of the image to be processed. Each element in the recursive Gaussian Hessian matrix is a 3×3 second-order tensor (that is, a 3×3 matrix). The calculation method of the recursive Gaussian Hessian matrix is: calculate it using the HessianRecursiveGaussianlmageFiler 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 the Gaussian.

[0044] Step S304: Calculate the flatness of each element (pixel) in the recursive Gaussian Hessian matrix (image) for a 3×3 matrix, obtaining the calculated image. Use the calculated image as the new image to be processed, recalculate the recursive Gaussian Hessian matrix and flatness until the number of executions of the flatness calculation reaches the second preset number of times, obtaining the finally calculated image. Use the finally calculated 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

[0045] In this embodiment, for each element (voxel) in the recursive Gaussian Hessian matrix, the "flatness value" is calculated to obtain an image with the same pixel size as the original image and each pixel also being a scalar value. Specifically: By calculating the three eigenvalues in the 3×3 matrix and substituting them into the conversion formula to obtain the result value, these two operations are calculated using the HessianToObjectnessMeasureImageFilter module in the itk library. This module is a class template for calculating the blob similarity value / tubular similarity value / 2D plane similarity value of each voxel in the 3D image of the Hessian matrix. In this example, this module is used to calculate the 2D plane similarity value (i.e., the flatness value). The smaller the curvature of the surface where a single voxel in the original image is located (the closer it is to a plane), the higher the calculated flatness value. Therefore, after stretching the image grayscale and performing gradient anisotropic diffusion and then calculating the recursive Gaussian Hessian matrix, the anti-interference and generalization capabilities are enhanced; and by calculating the recursive Gaussian Hessian matrix and the flatness value multiple times in a loop, the high flatness value can more accurately indicate the pixel (voxel) points on the plane (small curvature surface), enhancing the anti-interference ability.

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

[0047] Specifically, performing fine extraction of the head shell mask based on the second image and the third image to obtain the fourth image includes: Step S401: Extract the pixel maximum value and pixel minimum value of the third image.

[0048] Step S402: According to the pixel maximum value and pixel minimum value of the third image, construct the second pixel grayscale interval, that is, the lower limit value of the second pixel grayscale interval is the pixel minimum value of the third image, and the upper limit value of the second pixel grayscale interval is the pixel maximum value of the third image.

[0049] Step S403: Use all the pixel points in the second image with the reference value (non-zero) as the second seed point set.

[0050] Step S404: Based on the second pixel gray interval, perform iterative region growing on the second set of seed points on the third image to generate multiple second region-growing images. In the next iteration, update the lower limit value of the second pixel gray interval with a pre-constructed second step value. Similarly, when performing the region-growing operation, set the pixel values within the region to "1" and the pixel values outside the region to "0". Among them, the updated lower limit value of the second pixel gray interval cannot exceed the upper limit value of the second pixel gray interval, that is, the maximum pixel value of the third image. When it exceeds, it indicates that the algorithm fails.

[0051] Among them, the second step value is constructed based on the maximum pixel value and the minimum pixel value of the third image, and the functional expression of the second step value is: ; In the formula, is the second step value, is the maximum pixel value of the third image, is the minimum pixel value of the third image, is a preset constant, usually takes 128.0.

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

[0053] Step S406: Count the total number of non-zero pixels in the second image, and input the total number of non-zero pixels in the second image, the first statistical result, and the second statistical result into a preset loss function to obtain the iterative loss value of region growing. Among them, the expression of the loss function is: ; In the formula, m is the number of iterations, is the iterative loss value of region growing after the mth iteration, is the second statistical result, is the first statistical result, is the total number of non-zero pixels in the second image.

[0054] 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 increases, it is considered to be initially converged, that is, roughly converged.

[0055] In this embodiment, when the number of iterations is not less than 3, and the iteration loss value increases for two consecutive times, that is: ,At this point, it means that the iterative loss value has passed the local minimum and the regional growth has roughly converged.

[0056] Step S408: After initial convergence, the lower limit value of the second pixel grayscale interval used in the first of three consecutive iterations is used as the initial value, and the lower limit value of the second pixel grayscale interval is fine-tuned near the initial value based on a preset algorithm. The second seed point set is subjected to secondary iterative region growth on the third image with the fine-tuned second pixel grayscale interval, and the iterative loss value is recalculated until the iterative loss value accurately converges to the local minimum.

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

[0058] The lower limit convergence range is then iteratively divided by the binary method. The median value of the range corresponding to each lower limit convergence range division is used as the new lower limit value of the second pixel grayscale interval. The iterative loss value of the region growth after the second iteration converges precisely to the local minimum. At this time, a binary image of the region growth result at the time of precise convergence can be obtained. The binary image of the region growth result at the time of precise convergence is as follows: Figure 2 Image4-1 in the image.

[0059] Step S409: Mask the second region growing image corresponding to the iterative loss value of the region growing after the second iteration when it is precisely converged with the second image to obtain a fourth image, that is, perform a pixel “AND” operation on the binary image of the region growing result when it is precisely converged with the second image, and the fourth image obtained is the precise head shell mask image. The precise head shell mask image is Figure 2 Image4 in.

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

[0061] Step S50: performing post-processing on the fourth image to extract the head mask image in the fourth image.

[0062] Specifically, post-processing the fourth image to extract the head mask image in the fourth image includes: Step S501: Perform 3D binary morphological dilation on the fourth image to obtain a dilated fourth image. The dilated fourth image is Figure 2 Image5-1 in the image.

[0063] Step S502: Invert the pixels of the expanded fourth image to obtain a second inverted image, that is, set the pixel values ​​of "1" in the expanded 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.

[0064] Step S503: Perform connected area filtering on the second inverted image, and only retain the largest connected area including the center of the 3D image, that is, the head area within the head shell, to obtain a head area mask image. The head area mask image is Figure 2 Image5-3 in the image.

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

[0066] Step S505: resample the expanded head region mask image to restore the pixel spacing of the expanded head region mask image to the pixel spacing of the original magnetic resonance head 3D image, and obtain a sampled mask image. The sampled mask image is Figure 2 Image5-5 in.

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

[0068] Step S60: Perform pixel masking on the 3D head image of the magnetic resonance image based on the head mask image to obtain a 3D head image without the head shell. The 3D head image without the head shell is Figure 2 Image6 in.

[0069] In this embodiment, the 3D MIP rendering of 0.5T magnetic resonance TOF brain vascular imaging is shown in FIG. Figure 3 As shown (left: before head shell removal; right: after head shell removal).

[0070] 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 a hollow region. This method is very sensitive to differences between different magnetic resonance imaging sequences. However, this embodiment uses an iterative region growing algorithm to extract the head region from the background. The extracted head region is a solid region. The method of this embodiment is insensitive to differences between different magnetic resonance imaging sequences. In addition, prior art 1 can only segment the brain region, while the method of this embodiment can segment the skull and the region within the skull.

[0071] Prior art 2: "Brain segmentation in magnetic resonance human head scans using multi-seeded region growing" processes single slice 2D images separately, which is easily affected by the so-called "intermediate slice" positioning. For example, the intermediate slice may not contain the brain. It can process fewer types of magnetic resonance sequences (T1, T2 and PD-weighted); the method of this embodiment directly processes 3D images. It is not sensitive to the influence of slice positioning; the method of this embodiment is not sensitive to the differences between different magnetic resonance imaging sequences, and in addition to T1, T2 and PD-weighted sequence types, it also supports TOF types.

[0072] Therefore, the present invention is suitable for segmentation and peeling of the head capsule in head magnetic resonance 3D images, especially head magnetic resonance angiography images, so as to eliminate the visual occlusion of the voxels (3D pixels) in the head capsule area on the internal area and reduce the difficulty of diagnosis.

[0073] Embodiment 2 Figure 4 FIG. 1 is a block diagram of a head capsule segmentation system for 3D magnetic resonance head images based on region growing threshold iteration provided by an embodiment of the present invention. Figure 4 As shown, this embodiment provides a head shell segmentation system for 3D magnetic resonance head images based on region growing threshold iteration, which is used to implement the head shell segmentation method for 3D magnetic resonance head images based on region growing threshold iteration in embodiment 1. The system includes: An image acquisition module is used to acquire a 3D magnetic resonance head image and resample the 3D magnetic resonance head image to obtain a first image; A first extraction module, configured to perform a rough extraction of a head shell mask based on the first image to obtain a second image, wherein each pixel of the second image is a binary mask; A plane extraction module, used for performing plane extraction on the first image to obtain a third image, wherein each pixel of the third image is a scalar value; A second extraction module is used to perform a 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; A post-processing module, used for post-processing the fourth image to extract a head mask image in the fourth image; The image fusion module is used to perform pixel mask processing on the magnetic resonance head 3D image based on the head mask image to obtain a 3D head image without the skull.

[0074] 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, the method for head shell segmentation of a 3D magnetic resonance head image based on region growing threshold iteration in the first embodiment is implemented.

[0075] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for head shell segmentation of a magnetic resonance head 3D image based on region growing threshold iteration in the first embodiment is implemented.

[0076] Therefore, the present invention is suitable for segmentation and peeling of the head capsule in head magnetic resonance 3D images, especially head magnetic resonance angiography images, so as to eliminate the visual occlusion of the voxels (3D pixels) in the head capsule area on the internal area and reduce the difficulty of diagnosis.

[0077] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0078] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxesFigure 1 A system that specifies the functions of a box or multiple boxes.

[0079] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for head shell segmentation of 3D magnetic resonance head images based on region growing threshold iteration, characterized in that: The method comprises: Acquire a 3D magnetic resonance head image, and resample the 3D magnetic resonance head image to obtain a first image; Performing a rough extraction of a head shell mask 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; post-processing the fourth image to extract a head mask image in the fourth image; The pixel masking process is performed on the 3D head image of magnetic resonance imaging based on the head mask image to obtain a 3D head image without the skull.

2. The head shell segmentation method for 3D magnetic resonance head images based on region growing threshold iteration according to claim 1, characterized in that: A head shell mask is roughly extracted based on the first image to obtain a second image, including: Performing 3D grayscale morphological dilation on the first image to obtain a dilated first image; Extracting at least one pixel point in the expanded first image as a first seed point; Based on the pre-constructed first pixel grayscale interval, performing region growing on the first seed point for no less than a first preset number of times to generate a plurality of first region growing images; Counting the number of pixels in each first region growth image that are reference values, to obtain a total number of reference pixels corresponding to each first region growth image; When the total number of reference pixels corresponding to the plurality of consecutive first region growth images is greater than a preset number, based on the total number of reference pixels corresponding to the first region growth images, a ratio of every two adjacent reference pixel increments is calculated to obtain a proportional coefficient; When the scale coefficient is greater than the preset coefficient for the first time, the first region growing image after the previous region growing is performed is used as the convergence image; Performing morphological dilation on the convergence image to obtain a dilated convergence image; Perform pixel inversion processing on the expanded converged image to obtain a first inverted image; Performing morphological dilation on the negated image to obtain a first negated image after dilation; A second image is obtained according to the first negated image and the expanded first negated image.

3. The head shell segmentation method for 3D magnetic resonance head images based on region growing threshold iteration according to claim 2, characterized in that: The method further comprises: 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 executions of region growth has not reached the first preset number, the upper limit value of the first pixel grayscale interval 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 executions of region growth reaches or exceeds the first preset number.

4. The head shell segmentation method for 3D magnetic resonance head images based on region growing threshold iteration according to claim 3, characterized in that: The method further includes: constructing a first step value, including: Extracting image parameters of the expanded first image, the image parameters including: the accumulated grayscale value of all pixels in the expanded first image and the number of non-zero pixels; The first step value is determined according to the accumulated grayscale values ​​of all pixels and the number of non-zero pixels in the expanded first image.

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

6. The method for head shell segmentation of 3D magnetic resonance head images based on region growing threshold iteration according to claim 1, characterized in that: Performing planarity extraction on the first image to obtain a third image includes: Performing pixel grayscale value stretching on the first image to obtain a stretched image; Performing smoothing filtering based on gradient anisotropic diffusion on the stretched image to obtain a processed image; The processed image is used as the image to be processed, and based on the recursive Gauss-Hessian algorithm, a recursive Gauss-Hessian matrix image of the image to be processed is calculated; Perform flatness calculation on each element matrix in the recursive Gaussian Hessian matrix image to obtain a calculated image, use the calculated image as a new image to be processed, recalculate the recursive Gaussian Hessian matrix image and flatness until the number of executions of the flatness calculation reaches a second preset number, obtain a final image after calculation, and use the final image after calculation as the third image.

7. The method for head capsule segmentation of 3D magnetic resonance head images based on region growing threshold iteration according to any one of claims 1 to 6, characterized in that: The head shell mask is finely extracted based on the second image and the third image to obtain a fourth image, including: Extracting the maximum pixel value and the minimum pixel value of the third image; Constructing a second pixel grayscale interval according to a maximum pixel value and a minimum pixel value of the third image; Taking all pixels in the second image that are reference values ​​as a second seed point set; Based on the second pixel grayscale interval, iteratively growing the second seed point set on the third image to generate a plurality of second region growing images, and in the next iteration, updating the lower limit value of the second pixel grayscale interval with a pre-constructed second step value; Performing joint pixel statistics on the second region growth image and the second image after each iteration to obtain a first statistical result and a second statistical result, wherein the first statistical result is: the total number of pixels in the two images that meet a first preset condition, the first preset condition being any zero pixel in the second image, and the pixel in the second region growth image corresponding to the zero pixel is non-zero; the second statistical result is the total number of pixels in the two images that meet a second preset condition, the second preset condition being any non-zero pixel in the second image, and the pixel in the second region growth image corresponding to the non-zero pixel is zero; Counting the total number of non-zero pixels in the second image, using the total number of non-zero pixels in the second image, the first statistical result, and the second statistical result as inputs of a preset loss function to obtain an iterative loss value of region growing; Obtain the iterative loss values ​​of three consecutive region growths. When the iterative loss values ​​of region growth after three consecutive iterations increase, it is considered to have initially converged. After initial convergence, the lower limit value of the second pixel grayscale interval used in the first of three consecutive iterations is used as the initial value, the lower limit value of the second pixel grayscale interval is fine-tuned based on the preset algorithm at the initial value, and the second seed point set is subjected to secondary iterative region growth on the third image with the finely adjusted second pixel grayscale interval, and the iterative loss value is recalculated until the iterative loss value accurately converges to a local minimum; The second region growing image corresponding to the iterative loss value that converges precisely after the second iterative region growing is masked and superimposed on the second image to obtain a fourth image.

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

9. The method for head shell segmentation based on region growing threshold iteration for 3D magnetic resonance head images according to claim 7, characterized in that: The preset algorithm is a binary search method, which constructs a lower limit convergence range based on an initial value, and iteratively divides the lower limit convergence range using the binary search method. The median value of the corresponding range after each division of the lower limit convergence range is used as the new lower limit value of the second pixel grayscale interval.

10. The method for head shell segmentation of 3D magnetic resonance head images based on region growing threshold iteration according to claim 1, characterized in that: Post-processing the fourth image to extract a head mask image in the fourth image includes: Performing 3D binary morphological dilation on the fourth image to obtain a dilated fourth image; Perform pixel inversion on the expanded fourth image to obtain a second inverted image; Performing connected area filtering on the second inverted image to obtain a head area mask image; Perform 3D binary morphological dilation on the head region mask image to obtain an expanded head region mask image; Resampling the expanded head region mask image to obtain a sampled mask image; The sampled mask image is smoothed based on 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

  • Brain parenchyma segmentation realization based on improved threshold segmentation algorithm

    CN105844617A

  • Visceral organ segmentation method and device for large-area high-density CT image

    CN111415340A

  • CT brain parenchyma segmentation system, method and device based on block region growing method

    CN113160245A

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

    CN115661467A