This application claims foreign priority benefits under 35 U.S.C. § 119 (a)-(d) to Chinese patent application No. 202311292822.7, filed on Sep. 28, 2023, the disclosure of which is hereby incorporated herein by reference in its entirety.
The present disclosure relates to the technical field of medical image processing, and in particular, to a method and system for automatically estimating a mammary gland volume based on a mammary gland magnetic resonance imaging (MRI) image.
In recent years, the incidence of female breast cancer is becoming increasingly high, which makes breast cancer become one of the most common malignant tumors in women. As a treatment method, mastectomy with a nipple and an areola preserved can not only achieve safety of tumor resection, but also achieve an aesthetic appearance of a breast. In order to achieve symmetry of breasts reconstructed by prostheses, it is very important to choose a prosthesis with a suitable size during an operation, so measurement of a breast related volume before the operation is of great guiding significance for breast reconstruction. There are many methods currently used for measuring a breast volume, such as a formula method, an Archimedes method, a mammary gland X-ray method, a three-dimensional scanning method, and an MRI method. Compared with other methods, the MRI method is the most accurate method to measure a breast volume.
At present, a mainstream method for measuring a breast-related volume by using an MRI image includes the following steps: 1) performing, by a doctor, MRI examination on a patient's chest before an operation, and importing an obtained image into image processing software in a digital imaging and communications in medicine (DICOM) medical image format; 2) parsing the DICOM format by the software, and performing three-dimensional reconstruction on a breast; 3) manually marking, by the doctor, a contour of a mammary gland part in the breast, or manually adjusting upper and lower nuclear magnetic signal thresholds to extract the contour of the mammary gland part; and 4) automatically calculating, by the software, a volume of a mammary gland region according to the obtained mammary gland contour, which is an estimated volume of a breast prosthesis. From this process, it can be seen that the mainstream method relies on manual marking of the mammary gland region, which is time-consuming and laborious in an actual operation, and is prone to an error due to a slice direction problem.
Against the disadvantages of the prior art, the present disclosure provides a method and system for automatically estimating a mammary gland volume based on a mammary gland MRI image, to automatically extract a mammary gland region from a three-dimensional chest MRI image by means of morphological prior knowledge of a breast MRI image and a computer image processing technology, and estimate a mammary gland volume.
To achieve the above objective, the present disclosure provides a method for automatically estimating a mammary gland volume based on a mammary gland MRI image, including the following steps:
Moreover, in step 1, data of “t1_f13d_tra_dynaVIEWS_spair_1+6” in a chest MRI image set is read, the data stores three-dimensional images formed by MRI signals in a form of a three-dimensional array, each array element represents one voxel, which is converted into a python array format for storage, and a spacing between voxels in three directions is recorded, where the X-axis is directed from the front to the back of a body, the Y-axis is directed from a left arm to a right arm, and the Z-axis is directed from the top of a head to soles of feet.
Moreover, in step 2, according to prior knowledge on approximate positions of left and right chests in a chest MRI image, the three-dimensional MRI image is cut to extract the left chest region and the right chest region, the right chest region is horizontally flipped according to symmetry of breasts, signals of other organs unrelated to the breasts in the image are cut out to obtain a complete mammary gland region, and the Gaussian blur processing is performed on each three-dimensional image of the left and right breasts obtained through cutting, to eliminate an influence of MRI noise.
Moreover, in step 3.1, samples are taken at intervals in a YZ plane for a three-dimensional image of a single breast subjected to the Gaussian blur processing; for each group of Y and Z, a value of X traverses voxel values one by one in an ascending order, which is equivalent to extending out a probe from the front to the back of the body, and a first voxel point whose voxel value exceeds a preset threshold δ is marked and recorded, thus obtaining a two-dimensional array in the YZ plane, a first X coordinate of a position of each element that exceeds the threshold δ is recorded, and the marked voxel points are points on the edge surface of the breast skin.
Moreover, in step 3.2, partial derivative three-dimensional images dx, dy, and dz in the X-axis direction, the Y-axis direction, and the Z-axis direction are first obtained by means of the difference operator from the three-dimensional image of a single breast subjected to the Gaussian blur processing, and then a gradient numerical three-dimensional image is calculated from the three partial derivative images. The difference operator is set as a three-dimensional matrix in which three neighboring voxels in a corresponding direction are −1, 0, and 1, respectively, and the rest values are all 0, and the difference operator of the X-axis, the Y-axis and the Z-axis is expressed as follows:
the gradient numerical three-dimensional image is calculated from the three partial derivative images, and a gradient Gradi,j,k of a point at a coordinate (i,j,k) is calculated as follows:
where A represents a three-dimensional array of the MRI image, i, j, and k represent coordinates, and dx, dy, and dz represent three partial derivative three-dimensional arrays obtained by allowing the difference operator to act on A.
A vector that normalizes three partial derivatives is a direction unit vector of the gradient, and a gradient direction of a position of each voxel marks a direction in which signals increase and decrease fastest, and is orthogonal to a signal equipotential surface of the voxel.
Moreover, in step 3.3, a thickness of the breast skin region is set to K, and the mask map is made based on the points on the edge surface of the breast skin to mark the breast skin region to be eliminated, with a mask calculation formula as follows:
where y is a calculated signal value of the mask map, and d represents a distance from a point to the edge surface of the breast skin.
In the mask map, y corresponding to the points on the edge surface of the breast skin is 1, and points at other positions linearly attenuate to 0 with the distance d.
Moreover, in step 3.4, the gradient image of the breast is multiplied by an elimination coefficient β to remove the breast skin region in the three-dimensional image.
The elimination coefficient is calculated as follows:
where y is a signal value in the mask map.
Moreover, in step 4, the optimized three-dimensional non-maximum suppression algorithm is calculated by using the following method:
where N0 to N7 represent voxel values corresponding to 8 octants, dx, dy, and dz are partial derivatives in three directions, and U0 to U7 represent intermediate variables.
A first interpolation R1 is calculated according to the voxel point gradient obtained in step 3.2, then the gradient direction is reversed to select 7 nearest neighboring voxels, a second interpolation R2 is calculated according to formulas (7)-(15), and if the gradient value of the voxel point No is greater than R1 and R2, the voxel point is kept, otherwise the voxel value of the voxel point is set to 0.
Moreover, in step 5, a probe extends in the positive direction of the Y-axis to take samples at intervals in an XZ plane; for each group of X and Z, a value of Y traverses voxel values one by one in an ascending order, which is equivalent to extending out the probe from a left arm to a right arm, and a first voxel point whose voxel value exceeds a preset threshold γ is marked and recorded, thus obtaining a two-dimensional array in the XZ plane, and a first Y coordinate at a position of each element that exceeds the threshold γ is recorded. Operations of extending out the probe in five directions including the positive and negative directions of the X-axis, the negative direction of the Y-axis, and the positive and negative direction of the Z-axis are similar to the above operation, edge points detected in all directions are recorded to obtain the complete three-dimensional contour of the mammary gland, the mammary gland region is filled according to the contour of the mammary gland, and the total number of voxels occupied by the filling is calculated to obtain the voxel volume of the mammary gland structure.
The present disclosure further provides a system for automatically estimating a mammary gland volume based on a mammary gland MRI image, which is configured to implement the method for automatically estimating a mammary gland volume based on a mammary gland MRI image described above.
Moreover, the system includes a processor and a memory, where the memory is configured to store program instructions, and the processor is configured to invoke the program instructions in the memory to perform the method for automatically estimating a mammary gland volume based on a mammary gland MRI image described above.
Compared with the prior art, the present disclosure has the following advantages:
1) According to the present disclosure, a computer algorithm is use to process a three-dimensional chest MRI image to automatically obtain an estimated volume of a mammary gland region, which can greatly improve efficiency of a doctor compared with conventional practice that a breast region is manually framed and then a volume is calculated by software.
2) Based on a conventional computer image processing algorithm, the present disclosure can be quickly applied by adjusting model parameters only based on basic prior knowledge such as an MRI image format and a breast position, without the need for any marked samples or any machine learning training.
3) A conventional slice segmentation method is implemented based on a breast slice image, which is likely to cause wrong cutting on upper and lower parts of the breast. According to the present disclosure, the breast image is segmented based on a three-dimensional structure of a breast, which is more suitable for an actual cutting region of a breast surgery, has a smaller system error of mammary gland region segmentation and a larger optimization space, and has more reference value for subsequent breast prosthesis customization.
To describe the technical solutions in the present disclosure or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show some embodiments of the present disclosure, and those skilled in the art may still derive other drawings from these accompanying drawings without creative efforts.
To make the objectives, technical solutions and advantages of the present disclosure clearer, the following clearly and completely describes the technical solutions in the present disclosure with reference to the accompanying drawings and embodiments in the present disclosure. Apparently, the described embodiments are some but not all of the embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
As shown in
Step 1: Read a three-dimensional chest MRI image in DICOM format.
Data of “t1_fl3d_tra_dyna VIEWS_spair_1+6” in a chest MRI image set is read, and the data stores three-dimensional images formed by MRI signals in a form of a three-dimensional array. Each array element represents one voxel, which is converted into a python array format for storage, and a spacing between voxels in three directions is recorded, where the X-axis is directed from the front to the back of a body, the Y-axis is directed from a left arm to a right arm, and the Z-axis is directed from the top of a head to soles of feet.
Step 2: Cut the three-dimensional chest MRI image according to prior knowledge to extract a left chest region and a right chest region, and perform Gaussian blur processing on a three-dimensional image of a single breast.
According to a convention of photographing an MRI image, the range of positions of left and right chest slices is shown in Table 1. According to prior knowledge on approximate positions of left and right chests in a chest MRI image, the obtained three-dimensional image is cut to extract the left chest region and the right chest region, the right chest region is horizontally flipped according to symmetry of breasts, so that regions and main line slopes of the left and right breasts in the image are approximately the same, and signals of other organs unrelated to the breasts in the image are cut out to obtain a complete mammary gland region. The cut three-dimensional image of the right breast is shown in
Gaussian blur processing is performed on each three-dimensional image of the left and right breasts, to eliminate an influence of MRI noise. In this embodiment, a mean value of a Gaussian convolution kernel is 5, and a variance value is 1.5. A result of Gaussian blur processing is shown in
Step 3: Remove a breast skin region in the three-dimensional image of the breast by means of an image processing algorithm.
Step 3.1: Mark points on an edge of breast skin by means of a probe algorithm.
Samples are taken at intervals in a YZ plane for a three-dimensional image of a single breast subjected to the Gaussian blur processing; for each group of Y and Z, a value of X traverses voxel values one by one in an ascending order (which is equivalent to extending out a probe from the front to the back of the body), and a first voxel point whose voxel value exceeds a preset threshold δ is marked and recorded. Therefore, a two-dimensional array in the YZ plane can be obtained, and a first X coordinate of a position of each element that exceeds the threshold δ is recorded. The marked voxel points are points on the edge surface of the breast skin. In this embodiment, according to practical experience, the threshold δ is set to 25, a sampling interval in the YZ plane is 0, and an identified breast skin edge is shown in
Step 3.2: Calculate partial derivatives of each three-dimensional image of left and right breasts in an X-axis direction, a Y-axis direction, and a Z-axis direction by means of a difference operator, and obtain a gradient magnitude and direction of a position of each voxel in the three-dimensional image.
Partial derivative three-dimensional images dx, dy, and dz in the X-axis direction, the Y-axis direction, and the Z-axis direction are first obtained by means of the difference operator from the three-dimensional image of a single breast subjected to the Gaussian blur processing, and then a gradient numerical three-dimensional image is calculated from the three partial derivative images. The difference operator is set as a three-dimensional matrix in which three neighboring voxels in a corresponding direction are −1, 0, and 1, respectively, and the rest values are all 0, and the difference operator of the X-axis, the Y-axis and the Z-axis may be expressed as follows:
the gradient numerical three-dimensional image is calculated from the three partial derivative images, and a gradient Gradi,j,k of a point at a coordinate (i,j,k) is calculated as follows:
where A represents a three-dimensional array of the MRI image, i, j, and k represent coordinates, and dx, dy, and dz represent three partial derivative three-dimensional arrays obtained by allowing the difference operator to act on A.
A vector that normalizes three partial derivatives is a direction unit vector of the gradient, and a gradient direction of a position of each voxel marks a direction in which signals increase and decrease fastest, and is orthogonal to a signal equipotential surface of the voxel. A final gradient image of the right breast is shown in
Step 3.3: Make a mask map based on the points on an edge surface of the breast skin detected in step 3.1, and mark the breast skin region to be eliminated.
As shown in
A thickness of the breast skin region is set to K, and the mask map is made based on the points on the edge surface of the breast skin to mark the breast skin region to be eliminated, with a mask calculation formula as follows:
where y is a calculated signal value of the mask map, and d represents a distance from a point to the edge surface of the breast skin.
As shown in
Step 3.4: Remove the breast skin region in the three-dimensional image by means of the mask map obtained in step 3.3.
The gradient image of the breast is multiplied by an elimination coefficient to remove the breast skin region in the three-dimensional image. The elimination coefficient is calculated as follows:
where y is a signal value in the mask map.
Step 4: Process, by means of an optimized three-dimensional non-maximum suppression algorithm, the three-dimensional image with the breast skin region removed, so as to make a contour of a mammary gland tissue clearer.
Given one voxel point and one gradient direction, the voxel point is denoted as N0, and 7 nearest neighboring voxels (N1 to N7) pointed by the gradient direction form a 2×2×2 matrix. As shown in
where N0 to N7 represent voxel values corresponding to 8 octants, dx, dy, and dz are partial derivatives in three directions, and U0 to U7 represent intermediate variables.
A first interpolation R1 is calculated according to the voxel point gradient obtained in step 3.2, then the gradient direction is reversed to select 7 nearest neighboring voxels, a second interpolation R2 is calculated according to formulas (7)-(15), and if the gradient value of the voxel point is greater than R1 and R2, the voxel point is kept, otherwise the voxel value of the voxel point is set to 0. As shown in
Step 5: Implement, in six directions including positive and negative directions of an X-axis, positive and negative directions of a Y-axis, and positive and negative directions of a Z-axis, the probe algorithm on the three-dimensional image subjected to non-maximum suppression, record all detected edge points to obtain a complete three-dimensional contour of the mammary gland, fill the mammary gland region according to the contour of the mammary gland, and calculate a total number of voxels occupied by the filling to obtain a voxel volume of the mammary gland structure.
In an example in which a probe extends in the positive direction of the Y-axis, samples are taken at intervals in an XZ plane. For each group of X and Z, a value of Y traverses voxel values one by one in an ascending order (which is equivalent to extending out the probe from a left arm to a right arm), and a first voxel point whose voxel value exceeds a preset threshold γ is marked and recorded. Therefore, a two-dimensional array in the XZ plane can be obtained, and a first Y coordinate of a position of each element that exceeds the threshold γ is recorded. The probe extends out in five directions including the positive and negative directions of the X-axis, the negative direction of the Y-axis, and the positive and negative direction of the Z-axis in the same operation method, and all detected edge points are recorded to obtain the complete three-dimensional contour of the mammary gland. In this embodiment, the value of Y is 20, and a sampling interval in the YZ, XZ and XY planes is 0 The mammary gland region is filled according to the contour of the mammary gland, and the total number of voxels occupied by the filling is calculated to obtain the voxel volume of the mammary gland structure.
Step 6: Calculate a final mammary gland volume according to the voxel volume calculated in step 5 and a voxel spacing in DICOM data.
Based on the same inventive concept, the present disclosure further provides a system for automatically estimating a mammary gland volume based on a mammary gland MRI image, including a processor and a memory, where the memory is configured to store program instructions, and the processor is configured to invoke the program instructions in the memory to perform the method for automatically estimating a mammary gland volume based on a mammary gland MRI image described above.
During specific implementation, the method proposed in the technical solutions of the present disclosure can be automatically run by those skilled in the art by using a computer software technology, and system apparatuses for implementing the method, such as a computer-readable storage medium for storing corresponding computer programs of the technical solutions of the present disclosure and a computer device for running the corresponding computer programs, should also fall within the protection scope of the present disclosure.
The specific embodiments described herein are merely intended to illustrate the spirit of the present disclosure by way of example. A person skilled in the technical field to which the present disclosure belongs may make various modifications or supplements on the described specific embodiments or substitute them in a similar way, without departing from the spirit of the present disclosure or exceeding the scope defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
202311292822.7 | Sep 2023 | CN | national |