Detailed Description
So that the manner in which the features and elements of the present embodiments can be understood in detail, a more particular description of the embodiments, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Example one
As shown in fig. 1, the blood vessel extraction method specifically includes:
step 101: acquiring N layers of slice images of a target blood vessel, wherein each layer of slice image comprises M directional velocity field images, and N and M are positive integers;
step 102: preprocessing each slice image in the N layers of slice images based on an image preprocessing algorithm to obtain a first class of N layers of images; the image preprocessing algorithm comprises at least one neighborhood processing algorithm;
step 103: based on a preset image segmentation algorithm, segmenting a target region containing a target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
step 104: and combining the second type of N layers of images based on the image sequence of the N layers of slice images to obtain an initial three-dimensional point cloud model of the target blood vessel.
Here, the execution subject of steps 101 to 104 may be a processor of the blood vessel extraction device.
Here, the target blood vessel may be a variety of blood vessels, and the blood vessel includes a main blood vessel and a micro blood vessel, and the main blood vessel may be a blood vessel such as an arterial blood vessel and a venous blood vessel, or any combination thereof. Microvessels include main vessel branches as well as capillaries.
In practical application, the N-layer slice images may be N-layer two-dimensional slice images of the target blood vessel, and are obtained by scanning a digital image of the target blood vessel into a computer through a slice scanner. The scanning technology comprises the following steps: MRI, Four-Dimensional Flow Magnetic Resonance Imaging (4D Flow MRI), CTA, Magnetic Resonance Angiography (MRA), Computed Tomography (CT), and the like.
Here, the image preprocessing algorithm may include at least one neighborhood processing algorithm; the neighborhood processing algorithm comprises a neighborhood variance method, a neighborhood energy method, neighborhood positive and negative judgment and the like. For example, step 102 may specifically include: based on a first neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of slice images to obtain N template images; based on a second neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of sliced images to obtain a third type of N layers of images; performing dot product operation on the ith template image in the N template images and the speed field images in the M directions of the ith image in the third type of N layer images to obtain a first type of N layer images, wherein i is a positive integer less than or equal to N; wherein the first neighborhood processing algorithm is different from the second neighborhood processing algorithm.
Specifically, the method for obtaining N template images includes: based on a first neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of sliced images to obtain N multiplied by M neighborhood processed images, and combining the speed field images in M directions in each layer of images in the N multiplied by M images to obtain N images; determining the optimal threshold values of the N images based on the maximum inter-class variance method; and dividing each image in the N images into two partial areas based on the optimal threshold value, setting the pixel of the noise area as 0, and setting the pixels of other areas as 1 to obtain N binary images, wherein the N binary images are N template images.
Here, the first neighborhood processing algorithm may be a neighborhood variance method, which can enlarge pixel values of a noise region in the image, and reduce pixel values of a blood vessel region to achieve the purpose of distinguishing the noise region from the blood vessel region, thereby improving the effect of subsequent image binarization processing. The second neighborhood processing algorithm can judge whether the neighborhood is positive or negative, and can effectively reduce the brightness of the noise area in the image, namely, the noise area in the image is restrained. Therefore, the two neighborhood combination processing methods can effectively inhibit noise in the image and improve the denoising effect.
In practical application, obtaining the first type N layer image includes: and performing morphological filling operation and/or median filtering on the image subjected to the dot product operation to obtain a first type of N-layer image. The filling operation can fill the pits in the image, and the median filtering can eliminate the residual part of noise in the image, thereby improving the subsequent image processing effect.
In the embodiment of the present application, each of the first N-layer images includes M direction velocity field images, and each of the third N-layer images also includes M direction velocity field images.
In practical application, step 103 specifically includes: combining the speed field images of each layer of image in the first class of N layers of images in the M directions into one image to obtain N layers of images to be segmented; determining the optimal threshold value of the N layers of images to be segmented based on the maximum inter-class variance method; and segmenting a target region containing a target blood vessel from each layer of image in the N layers of images to be segmented based on the optimal threshold value to obtain a second type of N layers of images. Here, the target region of each slice image includes vessel sections of the target vessel at different dissection positions.
In the embodiment of the present application, each layer image in the second class of N layer images includes only one image.
The self-adaptive threshold segmentation based on the maximum inter-class variance is implemented in the following steps:
the blood vessels and the surrounding tissues such as liver, pancreas, body fluid and fat have difference in gray distribution, and the blood vessels can be separated from the image by adopting an adaptive threshold segmentation method based on the maximum between-class variance, and the background part can be removed. The algorithm comprises the following steps:
1. the image to be segmented is normalized and calculated to obtain a gray level histogram, namely the number of pixels with certain gray level. Assuming that the total pixel points of the image are N, and N pixel points with the gray value of i appear in total, the probability of the gray level i appearing is p (i) ═ N/N;
2. setting a threshold k divides the gray level histogram into two categories, a and B: a: p (i) ≧ k and B: p (i) < k, calculating the between-class variance of the A and B classes;
3. changing K from 1 to 255, and respectively calculating the AB between-class variance corresponding to each K value, wherein the corresponding threshold value is the optimal threshold value K when the between-class variance is maximum;
4. and (3) performing binary segmentation on the image by using the K value, namely taking pixels with the image gray level being more than or equal to K as a target area, and taking the rest as a background.
In practical application, step 104 specifically includes: performing morphological corrosion treatment on a target area of each image in the second type N layer images based on a preset morphological algorithm to obtain corroded second type N layer images; and merging the corroded second type N layers of images based on the image sequence of the N layers of sliced images to obtain an initial three-dimensional point cloud model of the target blood vessel. Here, the preset morphological algorithm is an erosion algorithm,
here, the image sequence of the N layers of sliced images is the number of each layer of sliced images after the images are sliced, for example, the number from 1 to N, when the second type of images are merged, the position of each layer of images is determined according to the image sequence, the sequence when the images are merged is consistent with the sequence when the images are sliced, and it can be ensured that an accurate three-dimensional point cloud model can be obtained after merging.
The method further comprises the following steps: and performing surface reconstruction on the target blood vessel in the initial three-dimensional point cloud model to obtain a smooth and closed three-dimensional curved surface, wherein the three-dimensional curved surface is the best fit curved surface of the three-dimensional point cloud model, and the entity contained in the three-dimensional curved surface is the reconstructed three-dimensional target blood vessel.
By adopting the technical scheme, the N layers of slice images of the target blood vessel are subjected to neighborhood processing by utilizing at least one neighborhood processing algorithm, so that the interference of noise in the images can be effectively inhibited, the target blood vessel can be accurately positioned, and the accuracy of subsequent image segmentation operation can be ensured, thereby improving the extraction precision of the three-dimensional point cloud model of the target blood vessel and ensuring the quality of the three-dimensional reconstructed image of the target blood vessel.
Example two
To further illustrate the object of the present application, on the basis of the first embodiment of the present application, the method for extracting a blood vessel specifically includes:
step 201: acquiring N layers of slice images of a target blood vessel, wherein each layer of slice image comprises M directional velocity field images, and N and M are positive integers;
step 202: based on a first neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of slice images to obtain N template images;
specifically, the method for obtaining N template images includes: based on a first neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of sliced images to obtain N multiplied by M neighborhood processed images, and combining the speed field images in M directions in each layer of images in the N multiplied by M images to obtain N images; determining the optimal threshold values of the N images based on the maximum inter-class variance method; and dividing each image in the N images into two partial areas based on the optimal threshold value, setting the pixel of the noise area as 0, and setting the pixels of other areas as 1 to obtain N binary images, wherein the N binary images are N template images.
Here, the first neighborhood processing algorithm may be a neighborhood variance method, which can enlarge pixel values of a noise region in the image, and reduce pixel values of a blood vessel region to achieve the purpose of distinguishing the noise region from the blood vessel region, thereby improving the effect of subsequent image binarization processing.
Step 203: based on a second neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of sliced images to obtain a third type of N layers of images;
here, the second neighborhood processing algorithm may determine whether the neighborhood is positive or negative, and may effectively reduce the brightness of the noise region in the image, i.e., suppress the noise region in the image. Therefore, the two neighborhood combination processing methods can effectively inhibit noise in the image and improve the denoising effect.
Step 204: performing dot product operation on the ith template image in the N template images and the speed field images in the M directions of the ith image in the third type of N layer images to obtain a first type of N layer images, wherein i is a positive integer less than or equal to N;
here, the dot multiplication is a multiplication of pixel values at the same position between images.
In practical application, obtaining the first type N layer image includes: and performing morphological filling operation and/or median filtering on the image subjected to the dot product operation to obtain a first type of N-layer image. The filling operation can fill the pits in the image, and the median filtering can eliminate the residual part of noise in the image, thereby improving the subsequent image processing effect.
In the embodiment of the present application, each of the first N-layer images includes M direction velocity field images, and each of the third N-layer images also includes M direction velocity field images.
Step 205: based on a preset image segmentation algorithm, segmenting a target region containing a target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
specifically, speed field images in M directions of each layer of image in the first class of N layers of images are combined into one image, and N layers of images to be segmented are obtained; determining the optimal threshold value of the N layers of images to be segmented based on the maximum inter-class variance method; and segmenting a target region containing a target blood vessel from each layer of image in the N layers of images to be segmented based on the optimal threshold value to obtain a second type of N layers of images.
In the embodiment of the present application, each layer image in the second class of N layer images includes only one image.
Step 206: merging the second type of N layers of images based on the image sequence of the N layers of sliced images to obtain an initial three-dimensional point cloud model of the target blood vessel;
here, the image sequence of the N layers of sliced images is the number of each layer of sliced images after the images are sliced, for example, the number from 1 to N, when the second type of images are merged, the position of each layer of images is determined according to the image sequence, the sequence when the images are merged is consistent with the sequence when the images are sliced, and it can be ensured that an accurate three-dimensional point cloud model can be obtained after merging.
Step 207: slicing the initial three-dimensional point cloud model to obtain N template images;
specifically, slicing an initial three-dimensional point cloud model to obtain N layers of images; and based on a preset morphological algorithm, performing morphological expansion processing on the region containing the target blood vessel in each layer of the N layers of images to obtain N template images. Here, the preset morphological algorithm is a dilation algorithm.
Here, the quality of the N template images obtained by slicing the initial three-dimensional point cloud model is higher than that of the N template images obtained in step 202, that is, in the second iteration process, the template image generated by the initial three-dimensional point cloud model obtained in the first iteration process is used to perform the blood vessel extraction operation again, so that the denoising effect and the image segmentation precision can be improved. That is, if the blood vessel detection environment is better, the image processing operation is performed once to obtain a better initial three-dimensional point cloud model, and the steps after step 206 do not need to be performed; if the blood vessel detection environment is complex and the target blood vessel is adhered to other tissues or organs in the obtained initial three-dimensional point cloud model, secondary iteration is required to be performed, i.e., step 206 to step 210 are performed, so as to remove the influence of other tissues or organs.
Step 208: performing dot product operation on the ith template image in the N template images and the speed field images in the M directions of the ith image in the third type of N layer images to obtain a first type of N layer images;
here, the N template images obtained in step 202 are regarded as a first template, and the N template images obtained in step 207 are regarded as a second template.
That is, step 208 replaces the first template in step 204 with the second template, and the third type of N-layer images, and the operation process are the same.
Step 209: based on a preset image segmentation algorithm, segmenting a target region containing a target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
step 210: and combining the second type of N layers of images based on the image sequence of the N layers of slice images to obtain a final three-dimensional point cloud model of the target blood vessel.
Here, the image sequence of the N layers of sliced images is the number of each layer of sliced images after the images are sliced, for example, the number from 1 to N, when the second type of images are merged, the position of each layer of images is determined according to the image sequence, the sequence when the images are merged is consistent with the sequence when the images are sliced, and it can be ensured that an accurate three-dimensional point cloud model can be obtained after merging.
The method further comprises the following steps: and performing surface reconstruction on the target blood vessel in the final three-dimensional point cloud model to obtain a smooth and closed three-dimensional curved surface, wherein the three-dimensional curved surface is the best fit curved surface of the three-dimensional point cloud model, and the entity contained in the three-dimensional curved surface is the reconstructed three-dimensional target blood vessel.
Here, the execution subject of steps 201 to 210 may be a processor of the blood vessel extraction device.
EXAMPLE III
To further illustrate the purpose of the present application, based on the first and second embodiments of the present application, the method for extracting blood vessels specifically includes:
step 301: acquiring N layers of slice images of a target blood vessel, wherein each layer of slice image comprises M directional velocity field images, and N and M are positive integers;
step 302: determining a region to be enhanced in the velocity field image in each direction in the N layers of slice images based on the user selection information; wherein at least part of the vessels in the region to be enhanced comprises the target vessel;
in practical applications, if the characteristics of a part of the region in the target blood vessel are not obvious, the blood vessel extraction method may not be used to accurately extract the regions with the unobvious characteristics, and therefore, the regions need to be enhanced.
The user may determine the region to be enhanced through manual frame selection, for example, select the region to be enhanced through a user input unit frame, where the user input unit may be a touch display unit, and circle a region to be enhanced on the touch display unit, where the region to be enhanced is based on the region circled by the user, that is, the region to be enhanced of each layer of slice image.
Step 303: based on a first neighborhood processing algorithm, neighborhood processing is carried out on a region to be enhanced in the speed field image in each direction to obtain a first class of N-layer images;
here, when processing the region to be enhanced, only one neighborhood processing algorithm needs to be adopted, and more adhesion parts can be reserved. The first neighborhood processing algorithm is adopted to amplify the pixel value of the noise area in the image and reduce the pixel value of the blood vessel area, so that the purpose of distinguishing the noise area from the blood vessel area is achieved, and the part of the area to be enhanced, which is tightly adhered to the target blood vessel, is reserved. If the second neighborhood processing algorithm and neighborhood merging processing are adopted, target blood vessels adhered to other parts in the region to be enhanced can be removed as noise, and the part of the image cannot be completely extracted.
Step 304: based on a preset image segmentation algorithm, segmenting a target region containing a target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
specifically, speed field images in M directions of each layer of image in the first class of N layers of images are combined into one image, and N layers of images to be segmented are obtained; determining the optimal threshold value of the N layers of images to be segmented based on the maximum inter-class variance method; and segmenting a target region containing a target blood vessel from each layer of image in the N layers of images to be segmented based on the optimal threshold value to obtain a second type of N layers of images.
In the embodiment of the present application, each layer image in the second class of N layer images includes only one image.
Step 305: and combining the second type of N layers of images based on the image sequence of the N layers of sliced images to obtain a three-dimensional point cloud model of the region to be enhanced.
Here, the image sequence of the N layers of sliced images is the number of each layer of sliced images after the images are sliced, for example, the number from 1 to N, when the second type of images are merged, the position of each layer of images is determined according to the image sequence, the sequence when the images are merged is consistent with the sequence when the images are sliced, and it can be ensured that an accurate three-dimensional point cloud model can be obtained after merging.
In practical application, the method further comprises the following steps: combining the three-dimensional point cloud model of the region to be enhanced with the initial three-dimensional point cloud model to obtain an enhanced three-dimensional point cloud model of the target blood vessel; or combining the three-dimensional point cloud model of the region to be enhanced and the final three-dimensional point cloud model to obtain the enhanced three-dimensional point cloud model of the target blood vessel.
Namely, the enhanced three-dimensional point cloud model of the target blood vessel is combined with the initial three-dimensional model or the final three-dimensional point cloud model of the target blood vessel to obtain the enhanced three-dimensional point cloud model of the target blood vessel.
The method further comprises the following steps: and performing surface reconstruction on the target blood vessel in the enhanced three-dimensional point cloud model of the target blood vessel to obtain a smooth and closed three-dimensional curved surface, wherein the three-dimensional curved surface is a best fit curved surface of the three-dimensional point cloud model, and an entity contained in the three-dimensional curved surface is the reconstructed three-dimensional target blood vessel.
Here, the execution subject of steps 301 to 305 may be a processor of the blood vessel extraction device.
Example four
To further illustrate the object of the present application, the following examples are given in the first to third embodiments of the present application. The embodiment can realize high-precision automatic identification of the artery vessel aiming at the MRI image of the aorta.
The slice image is a Four-Dimensional Flow Magnetic Resonance Imaging (4D Flow MRI) of the human thorax, the N-layer slice image is a series of MRI images of 64 continuous sagittal planes in one heartbeat cycle (total 28 moments) of the human heart region, and the resolution of each image is r0×c0(in this example r)0=512,c0512), for a total of r0×c0An image. The goal of this example is from 28 hoursIn the process, the optimal time is determined, the artery blood vessels in the nuclear magnetic images at the time are accurately segmented, then the artery blood vessels in all 64 images at the time are extracted, and the artery blood vessels are reconstructed into a high-precision three-dimensional artery blood vessel.
The method for extracting the blood vessel specifically comprises the following steps:
step 1: two-dimensional image processing
1.1 two-dimensional image slices
The velocity field data in the 4D flow MRI image is sliced in the side view direction, and 64 slice images are generated on the three direction component velocity field images, respectively, for a total of 64 × 3 images. Three velocity field images in each slice image are respectively marked as U, V and W, and the meaning of the velocity field image is that the velocity vector of a particle at a certain position in space is decomposed into three directions in a corresponding space coordinate system, and represents the velocity of the particle in the three directions of the coordinate system. Fig. 2A to 2C show decomposition effect graphs, where fig. 2A is a U-direction velocity field image in the embodiment of the present application, fig. 2B is a V-direction velocity field image in the embodiment of the present application, and fig. 2C is a W-direction velocity field image in the embodiment of the present application.
1.2 neighborhood variance method
Neighborhood variance processing is performed on the image using a Neighborhood variance method (neighborwood variance), and the formula is as follows:
where (x, y) is the coordinates of a point, S is the neighborhood range, m and n are the dimensions of the neighborhood S respectively (in this embodiment, m and n are o and 3, i.e., S range is 3 × 3 × 3, i.e., 26 neighborhoods), f
S(x, y) is a pixel of the point (x, y),
is the average pixel in the neighborhood, I
S(i, j) is the variance in the neighborhood centered on point (i, j).
Through a neighborhood variance method, the pixel value of a noise region in an image can be amplified, and the pixel value of a blood vessel region is reduced to achieve the purpose of distinguishing the noise region from the blood vessel region, wherein fig. 3A is the image before being processed by the neighborhood variance method in the embodiment of the application, and fig. 3B is the image after being processed by the neighborhood variance method in the embodiment of the application.
1.3 neighborhood Positive and negative judgment
The raw data is processed again using Neighborhood Positive and Negative (PN) as follows:
PNS(i,j)=|lengthS(P)-lengthS(N)|2
wherein, lengthS(P) is the positive number in the neighborhood S, lengthS(N) is the number of negative values in the neighborhood S, PNS(i, j) is the PN value in the neighborhood S.
In this embodiment, the neighborhood S range is 8 neighborhoods, so the value range of PN is 0 to 81, fig. 4A is a schematic diagram of the positive and negative judgment result of the neighborhood of the U-direction velocity field image in the embodiment of the present application, fig. 4B is a schematic diagram of the positive and negative judgment result of the neighborhood of the V-direction velocity field image in the embodiment of the present application, and fig. 4C is a schematic diagram of the positive and negative judgment result of the neighborhood of the W-direction velocity field image in the embodiment of. The larger the PN value is, the stronger the consistency of the image in the region is, the smaller the PN value is, the worse the consistency is, and the consistency of the blood vessel target region is often far greater than that of the noise region, so the PN value and the original data are subjected to dot multiplication, the brightness of the noise region in the image can be effectively and remarkably reduced, namely the noise region in the image is restrained, and the denoising effect can be achieved through judgment of the positive and negative values of the neighborhood. Fig. 5A is a schematic diagram of a weighted result of positive and negative judgment of a U-direction velocity field image neighborhood in the embodiment of the present application, fig. 5B is a schematic diagram of a weighted result of positive and negative judgment of a V-direction velocity field image neighborhood in the embodiment of the present application, and fig. 5C is a schematic diagram of a weighted result of positive and negative judgment of a neighborhood of a W-direction velocity field image in the embodiment of the present application.
1.4 merging two neighborhood processing methods
After being respectively judged by a neighborhood variance method and neighborhood positive and negative values, firstly summing the results of three direction images in each slice of the results of the step 1.2 to generate 64 combined resultsAnd (4) an image. Dividing the image into two parts by using a maximum inter-class variance method, setting the pixels of a high-brightness area, namely a noise area, as 0, and setting the pixels of other areas as 1, thus obtaining a binary image, and marking the binary image as a template I1I.e. 64 template images I1A template I corresponding to each slice image1And performing dot multiplication on the result of the step 1.3 to generate N multiplied by 3 processed images. Through template processing, the purpose of further removing noise can be achieved. Fig. 6A is a schematic diagram of a result obtained by merging two kinds of neighborhood processing of a U-direction velocity field image in the embodiment of the present application, fig. 6B is a schematic diagram of a result obtained by merging two kinds of neighborhood processing of a V-direction velocity field image in the embodiment of the present application, and fig. 6C is a schematic diagram of a result obtained by merging two kinds of neighborhood processing of a W-direction velocity field image in the embodiment of the present application.
1.5 pit filling and median filtering
And (3) performing morphological filling operation and median filtering processing on the result of the step (1.4), wherein the filling operation is to search a connected region in the image, the connected region can divide the original image into two regions, then judging whether the two regions contain the edge of the whole blood vessel image, and setting the pixel value of the region not containing the edge of the blood vessel image as a global maximum value, namely filling the background region, wherein the filling criterion is as follows:
if the p point is located on the boundary line, the pixel value of the p point is the original pixel value f (p) of the p point, and the pixel value of the region which does not contain the blood vessel image and is outside the boundary line is set as the global maximum value tmaxHere, the padding operation is performed on the binary image, and the maximum pixel value is 1.
According to the above criteria, the original image is subjected to the hole filling operation in a certain connected region, and the hole and other features in the two-dimensional image can be filled through the step. In this embodiment, an 8-way shim is used. By the filling operation, the pits in the image can be effectively filled.
After the pit filling is carried out on the image, the image is filtered by using a filter operator, and the result can be subjected to median filtering, so that the noise characteristic of the image residual can be eliminated. The median filtering is a nonlinear smoothing technology, which sets the gray value of each pixel point as the median of all the gray values of the pixel points in a certain neighborhood window of the point, and the median filtering formula is as follows:
Y(i,j)=MedS(f(i-m,j-n),…f(i,j),…f(i+m,j+n))
where f (i, j) is the pixel value of the point (i, j), S is the neighborhood region (where m and n are the dimensions of the neighborhood S, respectively, and m ═ n ═ 3 in this embodiment, i.e., 8 neighborhoods), and Y (i, j) is the value of the point (i, j) in the neighborhood S, which is the median value in the neighborhood.
The pit holes in the image can be filled through the morphological filling operation of the image, and the residual partial noise of the image can be eliminated through the median filtering. Fig. 7A is a schematic diagram of a result of U-direction velocity field image hole filling and median filtering in the embodiment of the present application, fig. 7B is a schematic diagram of a result of V-direction velocity field image hole filling and median filtering in the embodiment of the present application, and fig. 7C is a schematic diagram of a result of W-direction velocity field image hole filling and median filtering in the embodiment of the present application.
1.6 maximum inter-class variance thresholding
The results of step 1.5 are first combined and the three directional images of each slice image are added to generate N images as shown in fig. 8. Then, the maximum inter-class variance method is used for carrying out threshold segmentation on the image, and the image is automatically divided into two parts, wherein the high-brightness area pixel is set to be 1, and the low-brightness area pixel is set to be 0. The high-brightness region is the region where the blood vessel is considered to be. The maximum inter-class variance method (also called the Otsu method) is adopted to carry out threshold segmentation, is proposed by Otsu scholars of Japan and is a self-adaptive threshold determination method. It is to divide the image into background and object 2 parts according to the gray scale characteristics of the image. The larger the inter-class variance between the background and the object, the larger the difference of 2 parts constituting the image is. The variance formula in the maximum inter-class variance method is set as:
g=w0w1(μ0-μ1)2
wherein, w0The ratio of the number of all pixels with gray values smaller than the threshold value in the image to all pixels, w1The ratio of the number of all pixels with gray values larger than the threshold value in the image to all pixels is mu0Is the mean gray value, μ, of all pixels in the image smaller than the threshold1Is the average gray value of all pixels in the image that are larger than the threshold.
By traversing all the pixel points, the optimal threshold value for dividing the image area can be obtained, namely the gray value of the pixel point which enables the variance formula to reach the maximum value. By threshold segmentation, a blood vessel target region can be completely extracted, and fig. 9 is a schematic diagram of a result after image segmentation in the embodiment of the present application.
1.7 morphological Corrosion
The result of step 1.6 is subjected to a morphological etch that shrinks its boundaries, which can cause unwanted adhesions due to errors to be cut. The corrosion is defined as follows:
where A is 64 divided images and B is a structure (in this embodiment, the structure B is defined as [ 010; 111; 010 ]).
And in the corrosion process, performing convolution operation on the structural body B in the pixel data of the image A, if the intersection of the structural body B taking a certain point as the center and the image A completely belongs to the area of the A, reserving the point, and taking the set of all points meeting the condition as the result of the corrosion of the image. FIG. 10 is a graph showing the result of image erosion in the example of the present application.
1.8 creating a preliminary three-dimensional point cloud
And (3) recombining 64 images of the result of the step (1.7) into a 3-dimensional form according to the image sequence of the slice image in the step (1.1), reserving a 3-dimensional maximum communication domain, and preliminarily extracting a 3-dimensional blood vessel target region by reserving the 3-dimensional maximum communication domain to form an initial three-dimensional point cloud model of the blood vessel.
Through the steps 1.1-1.8, an initial three-dimensional point cloud model of the blood vessel can be generated preliminarily. Fig. 11 is a schematic diagram of an initial three-dimensional point cloud model in an embodiment of the present application, where a light color area in the middle of an image is an aorta to be extracted, a dark color portion adhered to the aorta is a pulmonary artery, and a part of the steps in the above steps needs to be performed again to extract the aorta, so as to separate the aorta from the pulmonary artery.
Step 2: vascular region extraction
2.1 Re-dicing Process
And (3) slicing the initial three-dimensional point cloud model extracted preliminarily in the step 1.8 again according to the image slicing mode in the step 1.1 to obtain 64 two-dimensional images.
2.2 target template fabrication
For the 64 two-dimensional images obtained in step 2.1, since in step 1.7, the morphological erosion operation is performed to avoid the two-dimensional effect map from being erroneously connected in three dimensions as much as possible, the morphological dilation operation is performed here, and the morphological dilation formula is as follows:
where A is the two-dimensional image obtained in step 2.1 and B is the structure (in this example, structure B is defined as [ 010; 111; 010 ]).
The expansion process is to perform convolution operation on the structure B on the structure A, if the structure B taking a certain point as the center has an overlapping area with the original data A in the moving process of the original data A, the point is reserved, and the set of all the points meeting the condition is the result of morphological expansion of the image. The morphological dilation result is used as a processing template of the blood vessel target area to be recordedThe template is I2I.e. generating 64 template images I2. As a processing template for the target area. FIG. 12 is a graphical representation of the results after morphological dilation in the examples of the present application.
2.3 generating the final point cloud by iterative operation
64 template images I obtained in step 2.22Instead of 64 template images I in step 1.41And (3) performing the retreatment of the steps 1.3-1.6 on the 64 slice images in the step 1.1, and performing the 1.8 step treatment on the final result to obtain a final three-dimensional point cloud model of the arterial vessel. Fig. 13 is a schematic diagram of a final three-dimensional point cloud model in the embodiment of the present application.
2.4 Artificial augmentation of innominate, common carotid, and subclavian arteries
And (3) adding an artificial option according to the result obtained in the step (2.3) or the step (1.8) to enhance the extraction of the innominate artery, the common carotid artery and the subclavian artery, if the three arterial branches have unobvious features in the original data, adding an artificial enhancement step, as shown in a schematic diagram in fig. 14, selecting a region to be enhanced by an artificial frame, wherein three parts protruding upwards and similar to triangles in the region to be enhanced are the innominate artery, the common carotid artery and the subclavian artery respectively, and performing the processing operations of the steps (1.1-1.2) and (1.5-1.8) on the region to be enhanced again to obtain a three-dimensional point cloud model of the region to be enhanced.
2.5, combining the three-dimensional point cloud model of the region to be enhanced obtained in the step 2.4 with the initial three-dimensional point cloud model obtained in the step 1.8 to obtain an enhanced three-dimensional point cloud model of the target blood vessel; or combining the three-dimensional point cloud model of the region to be enhanced obtained in the step 2.4 and the final three-dimensional point cloud model obtained in the step 2.3 to obtain the enhanced three-dimensional point cloud model of the target blood vessel. Fig. 15 is a schematic diagram of an enhanced three-dimensional point cloud model in an embodiment of the present application.
And step 3: three-dimensional reconstruction of blood vessels
And (3) processing the three-dimensional point cloud model obtained in the step (1.8), the step (2.3) or the step (2.4) by using a Poisson surface reconstruction algorithm to obtain a smooth and closed three-dimensional curved surface, wherein the three-dimensional curved surface is a best fit curved surface for point cloud, and an entity contained in the three-dimensional curved surface is a reconstructed three-dimensional target blood vessel. Fig. 16 is a schematic diagram of a three-dimensional reconstruction model of a target blood vessel in an embodiment of the present application.
In this embodiment, the velocity field image in the 4D flow MRI image is first processed by the neighborhood variance method. And then, carrying out neighborhood positive and negative value judgment on the image, and weighting the result after the positive and negative value judgment to the image. And then performing morphological filling operation on the image to fill the pits, and using median filtering to enable the image to be full and smoother. The image is then automatically thresholded using the maximum inter-class variance method. And then, performing morphological corrosion operation on the image, and reserving a 3-dimensional connected region as an initial three-dimensional point cloud model of the image. And carrying out slicing operation with the same direction and consistent dimension as the original slice image on the initial three-dimensional point cloud model, then carrying out morphological expansion processing, and taking the processed image as an area limiting template of the original slice image. And performing one iteration operation on the image according to the template, finally generating a final three-dimensional point cloud model of the target blood vessel, and obtaining a three-dimensional curved surface by using a Poisson surface reconstruction algorithm, wherein an entity contained in the three-dimensional curved surface is the three-dimensional reconstruction body of the target blood vessel.
The blood vessel extraction method provided in the embodiment of the application has the following advantages:
1. by adopting the extraction of two kinds of neighborhood information, the structural information of the image is effectively utilized, the noise suppression effect is improved, and the method has obvious advantages compared with a simple threshold value method or a growth method.
2. The method utilizes the maximum inter-class variance method to perform automatic threshold segmentation, well utilizes the gray information of the image, realizes complete automatic image segmentation and has better segmentation effect.
3. And 3-dimensional connected regions are reserved, so that errors caused by processing on a two-dimensional image can be effectively avoided, and the processing of 3-dimensional data is realized.
4. Manual intervention is greatly reduced, so that the extraction of the model is more stable and the efficiency is higher.
EXAMPLE five
Based on the same inventive concept, the embodiment of the application also provides a blood vessel extraction device. As shown in fig. 17, the apparatus includes:
the acquisition unit 171 is configured to acquire N layers of slice images of the target blood vessel, where each layer of slice image includes velocity field images in M directions, and N and M are positive integers;
the processing unit 172 is configured to pre-process each slice image of the N layers of slice images based on an image pre-processing algorithm to obtain a first class N layer image; wherein the image pre-processing algorithm comprises at least one neighborhood processing algorithm;
the processing unit 172 is further configured to segment a target region including the target blood vessel from each layer of image in the first class N layer of images based on a preset image segmentation algorithm to obtain a second class N layer of images;
a reconstructing unit 173, configured to merge the second class of N-layer images based on the image sequence of the N-layer slice images to obtain an initial three-dimensional point cloud model of the target blood vessel.
In some embodiments, the processing unit 172 is specifically configured to perform neighborhood processing on the velocity field image in each direction in the N layers of slice images based on a first neighborhood processing algorithm, so as to obtain N template images; based on a second neighborhood processing algorithm, carrying out neighborhood processing on the speed field image in each direction in the N layers of slice images to obtain a third type of N layers of images; performing dot product operation on the ith template image in the N template images and the speed field images in the M directions of the ith image in the third type of N layer images to obtain a first type of N layer images, wherein i is a positive integer less than or equal to N; wherein the first neighborhood processing algorithm is different from the second neighborhood processing algorithm.
In some embodiments, the reconstructing unit 173 is specifically configured to perform morphological erosion processing on the target region of each layer of the second class N layer of images based on a preset morphological algorithm, so as to obtain an eroded second class N layer of images; and merging the corroded second N layers of images based on the image sequence of the N layers of sliced images to obtain an initial three-dimensional point cloud model of the target blood vessel.
In some embodiments, after obtaining the initial three-dimensional point cloud model of the target blood vessel, the processing unit 172 is further configured to slice the initial three-dimensional point cloud model to obtain N template images; performing dot product operation on the ith template image in the N template images and the speed field images in the M directions of the ith image in the third type of N-layer images to obtain a first type of N-layer images; based on a preset image segmentation algorithm, segmenting a target region containing the target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
correspondingly, the reconstructing unit 173 is further configured to merge the second type N layers of images based on the image sequence of the N layers of slice images to obtain a final three-dimensional point cloud model of the target blood vessel.
In some embodiments, the processing unit 172 is specifically configured to slice the initial three-dimensional point cloud model to obtain N layers of images; and performing morphological expansion processing on the region containing the target blood vessel in each layer of the N layers of images based on a preset morphological algorithm to obtain N template images.
In some embodiments, the processing unit 172 is specifically configured to perform a morphological filling operation and/or median filtering on the image after the dot product operation, so as to obtain a first type N layer image.
In some embodiments, the processing unit 172 is further configured to determine a region to be enhanced in the velocity field image for each direction in the N-layer slice image based on the user selection information; wherein at least part of the blood vessels of the target blood vessel are included in the region to be enhanced; based on a first neighborhood processing algorithm, neighborhood processing is carried out on a region to be enhanced in the speed field image in each direction to obtain a first class of N-layer images; based on a preset image segmentation algorithm, segmenting a target region containing the target blood vessel from each layer of image in the first class of N layers of images to obtain a second class of N layers of images;
correspondingly, the reconstructing unit 173 is further configured to merge the second type N layers of images based on the image sequence of the N layers of slice images to obtain a three-dimensional point cloud model of the region to be enhanced.
In some embodiments, the reconstructing unit 173 is further configured to combine the three-dimensional point cloud model of the region to be enhanced and the initial three-dimensional point cloud model to obtain an enhanced three-dimensional point cloud model of the target blood vessel; or combining the three-dimensional point cloud model of the region to be enhanced and the final three-dimensional point cloud model to obtain the enhanced three-dimensional point cloud model of the target blood vessel.
In some embodiments, the processing unit 172 is specifically configured to combine the M-directional velocity field images of each of the first-class N-layer images into one image, so as to obtain N-layer images to be segmented; determining the optimal threshold value of the N layers of images to be segmented based on the maximum inter-class variance method; and segmenting a target region containing the target blood vessel from each layer of image in the N layers of images to be segmented based on the optimal threshold value to obtain a second class of N layers of images.
By adopting the technical scheme, the N layers of slice images of the target blood vessel are subjected to neighborhood processing by utilizing at least one neighborhood processing algorithm, so that the interference of noise in the images can be effectively inhibited, the target blood vessel can be accurately positioned, and the accuracy of subsequent image segmentation operation can be ensured, thereby improving the extraction precision of the three-dimensional point cloud model of the target blood vessel and ensuring the quality of the three-dimensional reconstructed image of the target blood vessel.
Based on the hardware implementation of each unit in the blood vessel extraction device, the embodiment of the present application further provides another blood vessel extraction device, which includes: a processor and a memory configured to store a computer program operable on the processor;
wherein the processor is configured to execute the method steps in the preceding embodiments when running the computer program.
Of course, in practice, the various components of the blood vessel extraction device are coupled together by a bus system. It will be appreciated that a bus system is used to enable communications among the components. The bus system includes a power bus, a control bus, and a status signal bus in addition to a data bus.
In practical applications, the processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
The Memory may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD), or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor.
In an exemplary embodiment, the present application further provides a computer readable storage medium, such as a memory, comprising a computer program, which is executable by a processor in a blood vessel extraction device to perform the aforementioned method steps.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.