Heart analysis method and device for medical image, computer equipment and storage medium
By acquiring the three-dimensional mask image of the heart in medical images and performing principal component analysis, the main axis direction of the heart region is determined, and the problem of inaccurate central heart analysis in the prior art is solved, achieving higher analysis accuracy and intelligence.
Patent Information
- Application Number
- CN202311368328.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art has problems with inaccurate cardiac analysis in medical images, which are mainly due to the need for manual calibration of professional knowledge and experience, which are prone to misoperation.
By obtaining a three-dimensional mask image of the heart, principal component analysis is performed to determine the spindle direction of the heart region and adjust the medical scan image according to that direction for more accurate cardiac analysis.
This method can more accurately describe the morphology and structure of the heart region, reduce manual operation, and enhance the intelligence and accuracy of cardiac analysis.
Smart Images

Figure CN119863418A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for cardiac analysis of medical images. Background Art
[0002] Heart disease is a major health problem worldwide, so accurate assessment of heart function and structure is very important. Currently, medical imaging technologies are widely used for heart analysis, including echocardiography, magnetic resonance imaging, and computed tomography.
[0003] Cardiac analysis of medical images requires cardiac structural analysis. However, in related technologies, experienced doctors or technicians often manually calibrate important structures in the cardiac region of medical images. This method requires professional knowledge and experience, and is prone to doctor misoperation, which is not conducive to accurate cardiac analysis of medical images.
[0004] Therefore, the related art has the problem of insufficient accuracy when performing cardiac analysis in medical images. Summary of the invention
[0005] Based on this, it is necessary to provide a cardiac analysis method, apparatus, computer device, computer-readable storage medium and computer program product for medical images that can more accurately perform cardiac analysis in medical images in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for analyzing a heart in a medical image, comprising:
[0007] Acquire a three-dimensional heart mask image; the three-dimensional heart mask image represents a heart region in a medical scan image;
[0008] Performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region;
[0009] The medical scan image is adjusted according to the main axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the heart area.
[0010] In one embodiment, performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region includes:
[0011] constructing a three-dimensional cardiac mask image matrix according to the three-dimensional coordinates of non-zero positions in the three-dimensional cardiac mask image;
[0012] The main axis direction of the heart region is determined according to the heart three-dimensional mask image matrix.
[0013] In one embodiment, forming a cardiac three-dimensional mask image matrix according to the three-dimensional coordinates of non-zero positions in the cardiac three-dimensional mask image includes:
[0014] Determine the position of the non-zero element in the three-dimensional mask image of the heart to obtain the non-zero position in the three-dimensional mask image of the heart;
[0015] Obtaining each matrix row vector according to the three-dimensional coordinates corresponding to each non-zero position;
[0016] The heart three-dimensional mask image matrix is constructed according to each of the matrix row vectors.
[0017] In one embodiment, determining the main axis direction of the heart region according to the heart three-dimensional mask image matrix includes:
[0018] Determining a covariance matrix corresponding to the cardiac three-dimensional mask image matrix;
[0019] The main axis direction of the heart region is determined according to the eigenvalues of the covariance matrix and the corresponding eigenvectors.
[0020] In one embodiment, the three-dimensional cardiac mask image matrix is composed of matrix row vectors; and determining the covariance matrix corresponding to the three-dimensional cardiac mask image matrix includes:
[0021] Determine the mean value of each matrix row vector in the cardiac three-dimensional mask image matrix;
[0022] Subtracting the corresponding mean values from all the matrix row vectors in the three-dimensional cardiac mask image matrix to obtain a three-dimensional cardiac mask image matrix after removing the mean value;
[0023] The covariance matrix of the heart three-dimensional mask image matrix after the average value is removed is determined to obtain the covariance matrix corresponding to the heart three-dimensional mask image matrix.
[0024] In one embodiment, determining the principal axis direction of the heart region according to the eigenvalues and corresponding eigenvectors of the covariance matrix includes:
[0025] Determining the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue;
[0026] The main axis direction is obtained according to the long axis vector.
[0027] In one embodiment, adjusting the medical scan image according to the main axis direction to obtain an adjusted medical scan image includes:
[0028] Determining, according to the main axis direction, a rotation angle of the medical scan image relative to the main axis direction;
[0029] Rotate the medical scan image according to the rotation angle to obtain a rotated medical scan image in the same direction as the main axis direction;
[0030] The rotated medical scan image is used as the adjusted medical scan image.
[0031] In a second aspect, the present application also provides a cardiac analysis device for medical images, comprising:
[0032] An acquisition module, used for acquiring a three-dimensional heart mask image; the three-dimensional heart mask image represents a heart region in a medical scan image;
[0033] An analysis module, used for performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region;
[0034] The adjustment module is used to adjust the medical scan image according to the main axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the heart area.
[0035] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0037] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0038] The above-mentioned cardiac analysis method, device, computer equipment, storage medium and computer program product of medical images are obtained by acquiring a cardiac three-dimensional mask image; the cardiac three-dimensional mask image represents the cardiac region in the medical scan image; principal component analysis is performed on the cardiac three-dimensional mask image to determine the principal axis direction of the cardiac region; the medical scan image is adjusted according to the principal axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the cardiac region. In this way, by performing principal component analysis on the cardiac three-dimensional mask image representing the cardiac region in the medical scan image, the most representative features can be extracted from the cardiac three-dimensional mask image, and these features can better describe the morphology and structure of the cardiac region, which is conducive to accurately determining the principal axis direction of the cardiac region, so that the medical scan image can be adjusted based on the principal axis direction, and the cardiac three-dimensional mask image of the normalized direction and the adjusted medical scan image can be obtained, which is conducive to more accurate cardiac region analysis in the medical scan image, reducing manual operations and enhancing the intelligence and accuracy of the cardiac analysis function. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a schematic flow chart of a cardiac analysis method of a medical image in one embodiment;
[0041] Figure 2 A schematic diagram of the details of a principal component analysis of a three-dimensional mask image of a heart in one embodiment;
[0042] Figure 3 is a flow chart of another cardiac analysis method of a medical image in one embodiment;
[0043] Figure 4 is a schematic flow chart of a cardiac analysis method of a medical image in another embodiment;
[0044] Figure 5 is a structural block diagram of a cardiac analysis device for medical images in one embodiment;
[0045] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] In one embodiment, Figure 1 As shown, a method for analyzing the heart of a medical image is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0049] Step S110, acquiring a three-dimensional mask image of the heart.
[0050] The three-dimensional heart mask image may be a three-dimensional mask image for the heart region in the medical scan image, so as to achieve characterization of the heart region in the medical scan image through the three-dimensional heart mask image.
[0051] The medical scanned image may be an image obtained by scanning the scanned object using a medical imaging system, wherein the scanning range of the scanned object should include the heart.
[0052] The medical imaging system may include, but is not limited to, a PET (Positron Emission Tomography) system, a CT (Computed Tomography) system, an MRI (Magnetic Resonance Imaging) system, a PET / CT system, a PET / MRI system, etc. This application is described by taking a PET image as an example of a medical scanning image.
[0053] The medical scan image can be pre-stored in the memory of the terminal, and the terminal can directly obtain it from the memory when needed. This embodiment does not limit the specific method of obtaining the medical scan image, as long as its function can be achieved.
[0054] In a specific implementation, the computer device can obtain a three-dimensional mask image (3D MASK) for representing the heart area in the medical scan image, that is, obtain a three-dimensional mask image of the heart. In some embodiments, the three-dimensional mask image of the heart corresponding to the medical scan image can be pre-stored in the memory of the terminal, and the terminal can directly obtain it from the memory when needed.
[0055] In other embodiments, the terminal may first acquire a medical scan image, identify a heart region in the medical scan image, and convert the medical scan image into a mask image according to the identified heart region to obtain a heart 3D mask image representing the heart region in the medical scan image. This embodiment does not limit the specific method of acquiring a heart 3D mask image, as long as its function can be achieved.
[0056] In practical applications, the heart 3D mask image can have the same size as the medical scan image. Specifically, the heart 3D mask image can be a binary image with the same size as the medical scan image, and the voxels with a voxel value of 1 in the heart 3D mask image belong to the heart region.
[0057] Step S120 , performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region.
[0058] Among them, in the heart shape analysis, the direction with the largest data change is usually concerned, that is, the most important shape change direction in the data set, which can represent the most important shape feature of the heart. Therefore, the main axis direction of the heart region can be the direction with the largest shape change of the heart. In other words, the shape change of the heart mainly occurs in the main axis direction (such as the long axis direction).
[0059] In a specific implementation, the terminal can perform principal component analysis on the heart three-dimensional mask image to extract features of the heart region, and the terminal can determine the main axis direction of the heart region based on the extracted features. Specifically, the terminal can determine the main axis direction of the heart region based on the most representative features among the extracted features.
[0060] Step S130, adjusting the medical scan image according to the main axis direction to obtain an adjusted medical scan image.
[0061] Among them, the adjusted medical scan images are used to analyze the heart area.
[0062] In a specific implementation, the terminal can rotate and adjust the medical scan image according to the main axis direction (automatically), so that the adjusted medical scan image and the main axis direction of the heart region are in the same direction. That is, the terminal can obtain a normalized three-dimensional mask image of the heart and the adjusted medical scan image, so that the heart region can be analyzed based on the adjusted medical scan image, such as realizing a bull's eye diagram.
[0063] In the above-mentioned cardiac analysis method of medical images, a cardiac three-dimensional mask image is obtained; the cardiac three-dimensional mask image represents the cardiac region in the medical scan image; principal component analysis is performed on the cardiac three-dimensional mask image to determine the principal axis direction of the cardiac region; the medical scan image is adjusted according to the principal axis direction to obtain an adjusted medical scan image; and the adjusted medical scan image is used to analyze the cardiac region. In this way, by performing principal component analysis on the cardiac three-dimensional mask image representing the cardiac region in the medical scan image, the most representative features can be extracted from the cardiac three-dimensional mask image, and these features can better describe the morphology and structure of the cardiac region, which is conducive to accurately determining the principal axis direction of the cardiac region, so that the medical scan image can be adjusted based on the principal axis direction, and the cardiac three-dimensional mask image of the normalized direction and the adjusted medical scan image can be obtained, which is conducive to more accurate cardiac region analysis in the medical scan image, reducing manual operations and enhancing the intelligence and accuracy of the cardiac analysis function.
[0064] In one embodiment, principal component analysis is performed on a three-dimensional cardiac mask image to determine the principal axis direction of the cardiac region, including: constructing a three-dimensional cardiac mask image matrix based on the three-dimensional coordinates of non-zero positions in the three-dimensional cardiac mask image; and determining the principal axis direction of the cardiac region based on the three-dimensional cardiac mask image matrix.
[0065] In a specific implementation, when the terminal performs principal component analysis on the three-dimensional heart mask image to determine the principal axis direction of the heart region, the terminal can determine the voxels in the three-dimensional heart mask image belonging to the heart region, and construct a three-dimensional heart mask image matrix based on the three-dimensional coordinates corresponding to the voxels in the three-dimensional heart mask image belonging to the heart region.
[0066] Specifically, the three-dimensional coordinates corresponding to the voxels belonging to the heart region in the heart three-dimensional mask image may be the three-dimensional coordinates of the non-zero position in the heart three-dimensional mask image. Among them, the non-zero position in the heart three-dimensional mask image may refer to the position of the non-zero element in the heart three-dimensional mask image. Since the heart three-dimensional mask image may be a binary image with the same size as the medical scan image, the non-zero element in the heart three-dimensional mask image may be an element belonging to the heart region in the heart three-dimensional mask image (i.e., a voxel belonging to the heart region in the heart three-dimensional mask image). In this way, the terminal may determine the three-dimensional coordinates corresponding to the voxels belonging to the heart region in the heart three-dimensional mask image according to the three-dimensional coordinates of the non-zero position in the heart three-dimensional mask image, so that the matrix formed according to the three-dimensional coordinates of the non-zero position in the heart three-dimensional mask image is a matrix formed by the three-dimensional coordinates corresponding to the voxels belonging to the heart region in the heart three-dimensional mask image. Thus, the data analysis of the heart region may be performed more accurately through the matrix, so as to obtain the characteristic information of the heart region more comprehensively and accurately according to the data analysis results. Among them, the matrix may be named the heart three-dimensional mask image matrix.
[0067] Thus, after determining the heart 3D mask image matrix, the terminal can determine the main axis direction of the heart region according to the heart 3D mask image matrix. Specifically, the terminal can determine the main axis direction of the heart region according to the eigenvalues and eigenvectors corresponding to the heart 3D mask image matrix.
[0068] The technical solution of this embodiment is to form a cardiac three-dimensional mask image matrix according to the three-dimensional coordinates of non-zero positions in the cardiac three-dimensional mask image; and to determine the main axis direction of the cardiac region according to the cardiac three-dimensional mask image matrix. In this way, according to the three-dimensional coordinates of non-zero positions in the cardiac three-dimensional mask image, the three-dimensional coordinates corresponding to the voxels belonging to the cardiac region in the cardiac three-dimensional mask image can be determined. Thus, a cardiac three-dimensional mask image matrix composed of the three-dimensional coordinates corresponding to the voxels belonging to the cardiac region can be obtained. Furthermore, the cardiac three-dimensional mask image matrix can be used to more accurately perform data analysis on the cardiac region.
[0069] In one embodiment, a cardiac three-dimensional mask image matrix is constructed based on the three-dimensional coordinates of non-zero positions in the cardiac three-dimensional mask image, including: determining the positions of non-zero elements in the cardiac three-dimensional mask image to obtain the non-zero positions in the cardiac three-dimensional mask image; obtaining each matrix row vector based on the three-dimensional coordinates corresponding to each non-zero position; and constructing the cardiac three-dimensional mask image matrix based on each matrix row vector.
[0070] In a specific implementation, in the process of forming a cardiac three-dimensional mask image matrix according to the three-dimensional coordinates of the non-zero positions in the cardiac three-dimensional mask image, the terminal can determine the positions of the non-zero elements in the cardiac three-dimensional mask image to obtain the non-zero positions in the cardiac three-dimensional mask image. In some embodiments, since the cardiac three-dimensional mask image can be a binary image with the same size as the medical scan image, the voxels with a voxel value of 1 in the cardiac three-dimensional mask image belong to the cardiac region, and the voxels with a voxel value of 0 in the cardiac three-dimensional mask image do not belong to the cardiac region, therefore, the voxels with a voxel value of not 0 in the cardiac three-dimensional mask image can be the non-zero elements in the cardiac three-dimensional mask image, and the terminal can obtain the non-zero positions in the cardiac three-dimensional mask image by determining the voxels with a voxel value of not 0 in the cardiac three-dimensional mask image.
[0071] In this way, the terminal can obtain the row vectors matching the three-dimensional coordinates corresponding to each non-zero position in the three-dimensional heart mask image as the row vectors of each matrix. The terminal can construct the three-dimensional heart mask image matrix according to the row vectors of each matrix.
[0072] In some embodiments, the terminal may perform the following steps in the process of forming a cardiac three-dimensional mask image matrix: 1. Traverse each voxel of the cardiac three-dimensional mask image; 2. If the voxel value of the voxel is not zero, add its corresponding three-dimensional coordinates (x, y, z) to the matrix X; 3. Repeat steps 1 and 2 until the complete cardiac three-dimensional mask image is traversed; 4. The size of the resulting matrix X is (m, 3), which can be used as the cardiac three-dimensional mask image matrix. Where m represents the number of non-zero elements (i.e., voxels with non-zero voxel values) in the cardiac three-dimensional mask image, each row represents the three-dimensional coordinates (x, y, z) corresponding to a non-zero position, and each row is a matrix row vector.
[0073] The technical solution of this embodiment is to obtain the non-zero positions in the heart three-dimensional mask image by determining the positions of the non-zero elements in the heart three-dimensional mask image; obtain the row vectors of each matrix according to the three-dimensional coordinates corresponding to each non-zero position; and construct the heart three-dimensional mask image matrix according to the row vectors of each matrix. In this way, by determining the non-zero positions in the heart three-dimensional mask image, the voxels belonging to the heart region in the heart three-dimensional mask image can be determined, so that the row vectors of each matrix can be obtained according to the three-dimensional coordinates corresponding to each non-zero position, so that the heart three-dimensional mask image matrix composed of the three-dimensional coordinates corresponding to the voxels belonging to the heart region in the heart three-dimensional mask image can be accurately obtained based on the row vectors of each matrix, and then the morphology and structure of the heart region can be analyzed more comprehensively and accurately according to the heart three-dimensional mask image matrix, which is conducive to improving the accuracy of heart analysis.
[0074] In one embodiment, determining the principal axis direction of the heart region according to the three-dimensional heart mask image matrix includes: determining the covariance matrix corresponding to the three-dimensional heart mask image matrix; and determining the principal axis direction of the heart region according to the eigenvalues and corresponding eigenvectors of the covariance matrix.
[0075] In a specific implementation, when the terminal determines the main axis direction of the heart region according to the eigenvalues and eigenvectors corresponding to the heart three-dimensional mask image matrix, the terminal can determine the covariance matrix corresponding to the heart three-dimensional mask image matrix, and determine the eigenvalues of the covariance matrix corresponding to the heart three-dimensional mask image matrix, and the eigenvectors corresponding to the eigenvalues. In this way, the terminal can determine the main axis direction of the heart region according to the eigenvalues of the covariance matrix and the corresponding eigenvectors.
[0076] The technical solution of this embodiment is to determine the covariance matrix corresponding to the cardiac three-dimensional mask image matrix; and determine the principal axis direction of the cardiac region according to the eigenvalues of the covariance matrix and the corresponding eigenvectors. In this way, the elements of the covariance matrix can represent the correlation between different features, the eigenvalues of the covariance matrix can represent the importance of the principal component, and the eigenvector can represent the direction of the principal component. Therefore, based on the eigenvalues of the covariance matrix and the corresponding eigenvectors, the most important principal component in the covariance matrix can be determined to determine the direction in which the cardiac region data changes the most, so that the principal axis direction of the cardiac region can be determined more accurately according to the direction in which the data changes the most.
[0077] In one embodiment, a cardiac three-dimensional mask image matrix is composed of matrix row vectors; determining a covariance matrix corresponding to the cardiac three-dimensional mask image matrix includes: determining a mean value of each matrix row vector in the cardiac three-dimensional mask image matrix; subtracting the corresponding mean values from all matrix row vectors in the cardiac three-dimensional mask image matrix to obtain a cardiac three-dimensional mask image matrix after averaging; determining a covariance matrix of the cardiac three-dimensional mask image matrix after averaging to obtain a covariance matrix corresponding to the cardiac three-dimensional mask image matrix.
[0078] In a specific implementation, when the terminal determines the covariance matrix corresponding to the cardiac three-dimensional mask image matrix, the terminal can determine the mean (average value) of each matrix row vector in the cardiac three-dimensional mask image matrix, and subtract the corresponding mean from all matrix row vectors in the cardiac three-dimensional mask image matrix to obtain the cardiac three-dimensional mask image matrix after the average value is removed. Then, the terminal can determine the covariance matrix of the cardiac three-dimensional mask image matrix after the average value is removed, and use the covariance matrix as the covariance matrix corresponding to the cardiac three-dimensional mask image matrix.
[0079] Further, the cardiac three-dimensional mask image matrix is X, and the size of X is (m, 3) as an example. According to the mean of each matrix row vector in the cardiac three-dimensional mask image matrix, a mean vector μ can be obtained, and the cardiac three-dimensional mask image matrix after removing the average value can be represented by (X-μ). In this way, the covariance matrix of the cardiac three-dimensional mask image matrix after removing the average value can be determined by the following formula:
[0080] D=1 / m*(X-μ)(X-μ)T
[0081] Where D is the covariance matrix.
[0082] The technical solution of this embodiment is to determine the mean of each matrix row vector in the cardiac three-dimensional mask image matrix; subtract the corresponding mean from all matrix row vectors in the cardiac three-dimensional mask image matrix to obtain the cardiac three-dimensional mask image matrix after averaging; determine the covariance matrix of the cardiac three-dimensional mask image matrix after averaging to obtain the covariance matrix corresponding to the cardiac three-dimensional mask image matrix. In this way, all matrix row vectors in the cardiac three-dimensional mask image matrix are subtracted from the corresponding mean to obtain the cardiac three-dimensional mask image matrix after averaging. The cardiac three-dimensional mask image matrix after averaging is a centralized data matrix, so that the covariance matrix can be accurately calculated based on the centralized data matrix.
[0083] In one embodiment, the main axis direction of the heart region is determined according to the eigenvalues and corresponding eigenvectors of the covariance matrix, including: determining the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue; and obtaining the main axis direction according to the long axis vector.
[0084] In a specific implementation, when the terminal determines the main axis direction of the heart region according to the eigenvalues of the covariance matrix and the corresponding eigenvectors, the terminal can use the eigenvector corresponding to the maximum eigenvalue as the long axis vector of the heart region among the eigenvalues of the covariance matrix and the corresponding eigenvectors corresponding to the heart three-dimensional mask image matrix, and use the direction determined based on the long axis vector as the main axis direction of the heart region.
[0085] Specifically, the terminal may sort the eigenvalues of the covariance matrix corresponding to the heart three-dimensional mask image matrix, and extract the eigenvector corresponding to the largest eigenvalue as the long axis vector of the heart region.
[0086] Furthermore, the eigenvector can represent the direction of data change. In the covariance matrix corresponding to the heart three-dimensional mask image matrix, the eigenvector can represent the change in heart shape. In heart shape analysis, the focus is usually on the direction in which the data changes the most, which can represent the most important shape feature of the heart, and in heart shape analysis, this direction usually corresponds to the long axis of the heart. Therefore, it is necessary to obtain the eigenvector corresponding to the maximum eigenvalue to perform long and short axis analysis of the heart area in order to more accurately determine the long and short axes of the heart area. Among them, the long and short axis vectors are the two main directions that describe the heart area in the heart three-dimensional mask image. The direction corresponding to the long axis vector can be used as the main axis direction, and the direction corresponding to the short axis vector can be used as the secondary direction perpendicular to the main axis.
[0087] In actual applications, when the terminal determines the long axis vector and the short axis vector, the heart three-dimensional mask image matrix is X, and the size of X is (m, 3). After determining the eigenvalue and eigenvector of the covariance matrix, the eigenvalue dimension is 3*1, and the eigenvector dimension is 3*3. For example, the eigenvalue of 3*1 is If the maximum eigenvalue is a, because a corresponds to the first dimension, the eigenvector corresponding to the maximum eigenvalue is the 1*3 vector (k1, q1, v1) of the first dimension, which is the long axis vector representing the long axis direction. Then, the short axis vector representing the short axis direction can be (-1 / q1, 1 / k1, 0), which is perpendicular to the long axis. Determining the long and short axes of the heart region through eigenvectors can provide important information about the shape and structure of the heart. By determining the long and short axis vectors, the overall shape of the heart can be better understood and described, which is conducive to more accurate heart analysis.
[0088] In practical applications, the major axis vector can be named the major axis direction vector; the minor axis vector can be named the minor axis direction vector.
[0089] As described in the above embodiment, Figure 2 A detailed schematic diagram of principal component analysis of a three-dimensional mask image of the heart is provided. Figure 2 As shown, by performing principal component analysis on the heart three-dimensional mask image (heart 3D MASK), the long-axis direction vector and the short-axis direction vector of the heart region can be obtained.
[0090] The technical solution of this embodiment determines the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue; and obtains the main axis direction according to the long axis vector. In this way, since the eigenvector of the covariance matrix can represent the direction of data change, in the covariance matrix corresponding to the three-dimensional mask image matrix of the heart, the eigenvector can represent the change in the shape of the heart. In the heart shape analysis, the focus is usually on the direction with the largest data change, which can represent the most important shape feature of the heart. In the heart shape analysis, this direction usually corresponds to the long axis of the heart. Therefore, by obtaining the eigenvector corresponding to the maximum eigenvalue, the long axis vector of the heart region can be determined more accurately, so as to obtain the main axis direction of the heart region based on the long axis vector.
[0091] In one embodiment, a medical scan image is adjusted according to a main axis direction to obtain an adjusted medical scan image, including: determining a rotation angle of the medical scan image relative to the main axis direction according to the main axis direction; rotating the medical scan image according to the rotation angle to obtain a rotated medical scan image in the same direction as the main axis direction; and using the rotated medical scan image as the adjusted medical scan image.
[0092] The rotation angles include rotation angles corresponding to the x-axis, y-axis, and z-axis, respectively.
[0093] In the specific implementation, because the heart analysis requires the image of the heart part, and it is hoped that the images of the heart area can be in a unified direction, which is convenient for the subsequent realization of the heart analysis function, after obtaining the main axis direction of the heart area in the heart three-dimensional mask image, the medical scan image needs to be rotated to a unified direction.
[0094] In some embodiments, the terminal can determine the rotation angle of the medical scan image relative to the main axis direction according to the main axis direction. Specifically, it can include the rotation angles corresponding to the x-axis, y-axis and z-axis. Continuing with the above example, taking the long axis vector as (k1, q1, v1) as an example, the z-axis rotation angle r=arctan(k1 / q1), the y-axis rotation angle s=arctan(k1 / v1), and the x-axis rotation angle u=arctan(v1 / q1) are obtained respectively.
[0095] In this way, the terminal can rotate the medical scan image by corresponding rotation angles on the z, y, and x axes respectively, and obtain a rotated medical scan image with the same direction as the main axis direction of the heart region, and the rotated medical scan image can be used as the adjusted medical scan image. Thus, a normalized heart three-dimensional mask image and an adjusted medical scan image can be obtained.
[0096] The technical solution of this embodiment determines the rotation angle of the medical scan image relative to the main axis direction according to the main axis direction; rotates the medical scan image according to the rotation angle to obtain a rotated medical scan image with the same direction as the main axis direction; and uses the rotated medical scan image as the adjusted medical scan image. In this way, the rotation angle of the medical scan image relative to the main axis direction is determined according to the main axis direction; and the medical scan image is rotated according to the rotation angle, so that the adjusted medical scan image with the same direction as the main axis direction of the heart region can be accurately obtained, which is conducive to more accurate heart region analysis, reduces manual operations, and enhances the intelligence and accuracy of the heart analysis function.
[0097] For the convenience of those skilled in the art, Figure 3 A flowchart of another method for analyzing the heart of a medical image is provided. Taking a medical scan image as a PET image as an example, Figure 3 As shown, the terminal can perform principal component analysis on the heart three-dimensional mask image (heart 3DMASK) to obtain the main axis direction of the heart region, and rotate the PET image based on the main axis direction. Manually check whether the rotation angle is correct. If correct, end this process; otherwise, manually operate the PET image to rotate.
[0098] In another embodiment, Figure 4 As shown, a cardiac analysis method of a medical image is provided, and the method is applied to a terminal as an example for explanation, and includes the following steps:
[0099] Step S402: Acquire a three-dimensional mask image of the heart.
[0100] Step S404, determining the positions of non-zero elements in the three-dimensional mask image of the heart, and obtaining the non-zero positions in the three-dimensional mask image of the heart.
[0101] Step S406, obtaining each matrix row vector according to the three-dimensional coordinates corresponding to each non-zero position.
[0102] Step S408: construct a three-dimensional heart mask image matrix according to the row vectors of each matrix.
[0103] Step S410, determining the covariance matrix corresponding to the three-dimensional heart mask image matrix.
[0104] Step S412, determining the eigenvalues and corresponding eigenvectors of the covariance matrix, and determining the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue.
[0105] Step S414, obtaining the main axis direction of the heart region according to the long axis vector.
[0106] Step S416: determining the rotation angle of the medical scan image relative to the main axis direction according to the main axis direction.
[0107] Step S418, rotating the medical scan image according to the rotation angle to obtain a rotated medical scan image with the same direction as the main axis direction.
[0108] Step S420: Using the rotated medical scan image as the adjusted medical scan image.
[0109] It should be noted that the specific definition of the above steps can refer to the specific definition of a cardiac analysis method of a medical image mentioned above.
[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a medical image cardiac analysis device for implementing the above-mentioned medical image cardiac analysis method. The implementation solution provided by the device is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more medical image cardiac analysis devices provided below can refer to the limitations of the medical image cardiac analysis method above, and will not be repeated here.
[0112] In an exemplary embodiment, Figure 5 As shown, a cardiac analysis device for medical images is provided, comprising: an acquisition module 510, an analysis module 520 and an adjustment module 530, wherein:
[0113] The acquisition module 510 is used to acquire a three-dimensional heart mask image; the three-dimensional heart mask image represents the heart region in the medical scan image.
[0114] The analysis module 520 is used to perform principal component analysis on the three-dimensional heart mask image to determine the principal axis direction of the heart region.
[0115] The adjustment module 530 is used to adjust the medical scan image according to the main axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the heart area.
[0116] In one embodiment, the analysis module 520 is specifically used to construct a three-dimensional cardiac mask image matrix based on the three-dimensional coordinates of non-zero positions in the three-dimensional cardiac mask image; and determine the main axis direction of the cardiac region based on the three-dimensional cardiac mask image matrix.
[0117] In one embodiment, the analysis module 520 is specifically used to determine the positions of non-zero elements in the three-dimensional mask image of the heart to obtain the non-zero positions in the three-dimensional mask image of the heart; obtain each matrix row vector according to the three-dimensional coordinates corresponding to each of the non-zero positions; and construct the three-dimensional mask image matrix of the heart according to each of the matrix row vectors.
[0118] In one embodiment, the analysis module 520 is specifically used to determine the covariance matrix corresponding to the cardiac three-dimensional mask image matrix; and determine the principal axis direction of the cardiac region according to the eigenvalues and corresponding eigenvectors of the covariance matrix.
[0119] In one embodiment, the cardiac three-dimensional mask image matrix is composed of matrix row vectors; the analysis module 520 is specifically used to determine the mean of each matrix row vector in the cardiac three-dimensional mask image matrix; subtract the corresponding mean from all the matrix row vectors in the cardiac three-dimensional mask image matrix to obtain the cardiac three-dimensional mask image matrix after averaging; determine the covariance matrix of the cardiac three-dimensional mask image matrix after averaging to obtain the covariance matrix corresponding to the cardiac three-dimensional mask image matrix.
[0120] In one embodiment, the analysis module 520 is specifically used to determine the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue; and obtain the main axis direction according to the long axis vector.
[0121] In one embodiment, the adjustment module 530 is specifically used to determine the rotation angle of the medical scan image relative to the main axis direction according to the main axis direction; rotate the medical scan image according to the rotation angle to obtain a rotated medical scan image with the same direction as the main axis direction; and use the rotated medical scan image as the adjusted medical scan image.
[0122] Each module in the above-mentioned cardiac analysis device of medical images can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0123] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cardiac analysis method of a medical image is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0124] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0130] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A cardiac analysis method for medical images, characterized in that: The method comprises: Acquire a three-dimensional heart mask image; the three-dimensional heart mask image represents a heart region in a medical scan image; Performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region; The medical scan image is adjusted according to the main axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the heart area.
2. The method according to claim 1, characterized in that The performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region includes: constructing a three-dimensional cardiac mask image matrix according to the three-dimensional coordinates of non-zero positions in the three-dimensional cardiac mask image; The main axis direction of the heart region is determined according to the heart three-dimensional mask image matrix.
3. The method according to claim 2, characterized in that The forming of a cardiac three-dimensional mask image matrix according to the three-dimensional coordinates of non-zero positions in the cardiac three-dimensional mask image comprises: Determine the position of the non-zero element in the three-dimensional mask image of the heart to obtain the non-zero position in the three-dimensional mask image of the heart; Obtaining each matrix row vector according to the three-dimensional coordinates corresponding to each non-zero position; The heart three-dimensional mask image matrix is constructed according to each of the matrix row vectors.
4. The method according to claim 2, characterized in that: Determining the principal axis direction of the heart region according to the heart three-dimensional mask image matrix includes: Determining a covariance matrix corresponding to the cardiac three-dimensional mask image matrix; The main axis direction of the heart region is determined according to the eigenvalues of the covariance matrix and the corresponding eigenvectors.
5. The method according to claim 4, characterized in that The three-dimensional cardiac mask image matrix is composed of matrix row vectors; the step of determining a covariance matrix corresponding to the three-dimensional cardiac mask image matrix includes: Determine the mean value of each matrix row vector in the cardiac three-dimensional mask image matrix; Subtracting the corresponding mean values from all the matrix row vectors in the three-dimensional cardiac mask image matrix to obtain a three-dimensional cardiac mask image matrix after removing the mean value; The covariance matrix of the heart three-dimensional mask image matrix after the average value is removed is determined to obtain the covariance matrix corresponding to the heart three-dimensional mask image matrix.
6. The method according to claim 4, characterized in that Determining the principal axis direction of the heart region according to the eigenvalues of the covariance matrix and the corresponding eigenvectors includes: Determining the long axis vector of the heart region according to the eigenvector corresponding to the maximum eigenvalue; The main axis direction is obtained according to the long axis vector.
7. The method according to claim 1, characterized in that The step of adjusting the medical scan image according to the main axis direction to obtain an adjusted medical scan image includes: Determining, according to the main axis direction, a rotation angle of the medical scan image relative to the main axis direction; Rotate the medical scan image according to the rotation angle to obtain a rotated medical scan image in the same direction as the main axis direction; The rotated medical scan image is used as the adjusted medical scan image.
8. A cardiac analysis device for medical images, characterized in that: The device comprises: An acquisition module, used for acquiring a three-dimensional heart mask image; the three-dimensional heart mask image represents a heart region in a medical scan image; An analysis module, used for performing principal component analysis on the three-dimensional mask image of the heart to determine the principal axis direction of the heart region; The adjustment module is used to adjust the medical scan image according to the main axis direction to obtain an adjusted medical scan image; the adjusted medical scan image is used to analyze the heart area.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Heart valve regurgitation detection method and system and medium
CN120938489A