A method, device, and storage medium for calculating and analyzing the eccentricity of abdominal aortic aneurysms.
Patent Information
- Application Number
- CN202311455003.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-01
AI Technical Summary
[0003]目前,对腹主动脉瘤的偏心分析主要是对腹主动脉瘤中心线进行曲率分析与提取,然而这种方法收到中心线局部波折问题的影响,同时,中心线由于其几何构造特征面临着不易进行全局考虑测量的问题
[0052]1)提供了一种对二维腹主动脉瘤点集的偏心度计算与矩心偏移图的构造方法,解决了二维腹主动脉瘤偏心度稳定描述问题。
Smart Images

Figure CN117649932B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, device, and storage medium for calculating and analyzing the eccentricity of abdominal aortic aneurysms. Background Technology
[0002] Abdominal aortic aneurysm (AAA) is a common aortic aneurysm-like dilatation disease affecting the elderly. The mortality rate after rupture of an abdominal aortic aneurysm exceeds 70%, and the mechanism by which the degree of eccentric growth of the aneurysm affects the likelihood of rupture, postoperative recovery, and stent endoleak remains unclear. Therefore, finding and implementing a quantitative description of the degree of eccentricity of abdominal aortic aneurysms is crucial for studying eccentric growth and postoperative treatment of eccentric aneurysms.
[0003] Currently, eccentricity analysis of abdominal aortic aneurysms primarily involves curvature analysis and extraction of the aneurysm's centerline. However, this method is affected by local undulations in the centerline, and the centerline's geometric structure makes it difficult to measure globally. This results in an inability to quantitatively, accurately, and comprehensively describe abdominal aortic aneurysm eccentricity in clinical research. Furthermore, methods for describing abdominal aortic aneurysm eccentricity based on the centerline or curvature structure struggle to establish a reference metric for eccentricity that is invariant to translation, scaling, and rotation. Additionally, spatial eccentricity direction analysis only provides the magnitude of eccentricity, not the specific direction. Therefore, accurate and stable systems for describing the degree of abdominal aortic aneurysm eccentricity are urgently needed in clinical research. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and storage medium for calculating and analyzing the eccentricity of abdominal aortic aneurysm.
[0005] The objective of this invention is achieved through the following technical solution: The first aspect of this invention provides a method for calculating and analyzing the eccentricity of an abdominal aortic aneurysm, comprising the following steps:
[0006] S1: Initialization phase: Read the parameter file of the abdominal aortic aneurysm, including reading the two-dimensional abdominal aortic aneurysm shape point set file, obtaining the abdominal aortic aneurysm point set A, and reading the three-dimensional abdominal aortic aneurysm voxel file and the coordinates of the start and end sections of the analysis region;
[0007] S2: Calculation stage of eccentricity vector and eccentricity vector magnitude: Calculate the eccentricity vector and eccentricity vector magnitude of the abdominal aortic aneurysm, including calculating the eccentricity vector and eccentricity vector magnitude of point set A, obtaining the voxel coordinates of the analysis region through the region growing method, and calculating the eccentricity vector and eccentricity vector magnitude of the analysis region.
[0008] S3: Centroid offset map drawing stage: Calculate the eccentricity parameters and draw the centroid offset map, including calculating the centroids of each order of point set A, obtaining the centroid offset map B, drawing the shape of the eccentric region and displaying the eccentricity calculation parameters.
[0009] Preferably, in the S1 initialization phase, the two-dimensional point set file of the abdominal aortic aneurysm is read using the pandas library in Python to obtain the two-dimensional point set A of the abdominal aortic aneurysm, where: Pandas is a method library in Python used for data processing and analysis.
[0010] Preferably, the S2 stage, which calculates the eccentricity vector and the magnitude of the eccentricity vector, further includes the following sub-steps:
[0011] S211: The eccentricity vector vector_bias is determined by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set A;
[0012]
[0013] in
[0014]
[0015]
[0016] S212: The magnitude c of the two-dimensional eccentric vector and the eccentric components cx and cy are determined by the following formula:
[0017] c = |vector_bias|
[0018] c x =vector_bias x
[0019] c y =vector_bias y Where: Vector_bias represents the calculated eccentricity vector, subscript x represents the vector component on the x-axis, subscript y represents the vector component on the y-axis, c is the magnitude of the two-dimensional eccentricity vector, and c x In this context, x represents the x-axis component, and c represents the x-axis component. y In the diagram, y represents the y-axis component, matrix_n represents the nth moment vector of the system at the computation grid point, the subscript x represents the vector component on the x-axis, and the subscript y represents the vector component on the y-axis.
[0020] Preferably, the S3 stage: the drawing stage of the center-of-gravity offset diagram, includes the following steps:
[0021] S311: Determine the boundaries in the x and y directions of point set A using the numpy.max and numpy.min methods in Python, denoted as X_max, X_min, Y_max, and Y_min;
[0022] S312: Divide each side of the rectangle defined by X_max, X_min, Y_max, and Y_min into 1e3 equal parts and divide the grid accordingly to determine a test grid node set D of size 1e6;
[0023] S313: Traverse set D and calculate the magnitude of the nth moment of the system at each grid point. The magnitude of the nth moment, matirx_n, is determined by the following formula:
[0024]
[0025]
[0026] S314: Determine the grid point with the smallest matrix_n using numpy.min. If the matrix_n of the grid point is less than 1e-3, take the point as the nth order center of the point set A. If the matrix_n of the grid point is greater than 1e-3, double the equal fraction in step S3.2 and recalculate until the matrix_n is less than 1e-3.
[0027] S315: Taking a step size interval of 0.02, calculate the coordinates of the center of mass n from 0.02 to 5. Plot the center of mass offset diagram with n as the x-axis and the center of mass coordinate components as the y-axis. Where: NumPy is a Python library for matrix calculations; numpy.max is a method for selecting the maximum value in a matrix; numpy.min is a method for selecting the minimum value in a matrix; X_max is the maximum x-value in point set A; X_min is the minimum x-value in point set A; Y_max is the maximum y-value in point set A; Y_min is the minimum y-value in point set A; 1e3 = 1 × 10 3 1e6 = 1 × 10 6 1e-3=1×10 -3 .
[0028] Preferably, the S1 initialization stage involves reading the three-dimensional abdominal aortic aneurysm voxel file and the start and end section coordinates of the analysis region, including the following sub-steps:
[0029] S11: Read the abdominal aortic aneurysm voxel model file using the nii library in Python, and denote it as a three-dimensional array E;
[0030] S12: Obtain the center points F1 and F2 of the two cross sections and the corresponding cross section vector directions through the software interface;
[0031] S13: Let F3 be the midpoint of the line segment formed by F1 and F2, and select the voxel unit in E that is closest to F3 as the initial unit G;
[0032] S14: Establish an amplification queue H, which initially contains only the initial unit G. Analyze whether the voxel units surrounding the initial unit G are within the two cross sections determined in S12. If they exist, add them to queue H and delete the initial unit G. Repeat this process until the queue length is zero. Denote the set of voxels that have been added to queue H as the analysis point set I. Wherein: the nii library is a Python library for processing CT data files with the .Nii format extension.
[0033] Preferably, the S2 stage, which calculates the eccentricity vector and the magnitude of the eccentricity vector, includes the following sub-steps:
[0034] S221: The eccentricity vector and its magnitude of point set I are calculated by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set I;
[0035]
[0036] in
[0037]
[0038]
[0039] S222: The magnitude c of the three-dimensional eccentric vector and the eccentric components cx, cy, and cz are determined by the following formula:
[0040] c = |vector_bias|
[0041] c x =vector_bias x
[0042] c y =vector_bias y
[0043] c z =vector_bias z .
[0044] Preferably, the S3 stage: the drawing stage of the center-of-gravity offset diagram, includes the following steps:
[0045] S321: Draw the cross-sectional shape between the two cross sections using the VTK function library.
[0046] The second aspect of the present invention provides: an abdominal aortic aneurysm eccentricity calculation and analysis device, used to implement any of the above-mentioned abdominal aortic aneurysm eccentricity calculation and analysis methods, characterized in that: it includes...
[0047] Initialization module: capable of reading parameter files for abdominal aortic aneurysms;
[0048] Eccentricity vector and eccentricity vector magnitude calculation module: capable of calculating the eccentricity vector and eccentricity vector magnitude of abdominal aortic aneurysm;
[0049] The eccentricity offset plotting module can calculate the eccentricity parameter and plot the eccentricity offset plot.
[0050] A third aspect of the present invention provides a computer-readable storage medium, characterized in that: the computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement any of the above-mentioned methods for calculating and analyzing the eccentricity of abdominal aortic aneurysms.
[0051] The beneficial effects of this invention are:
[0052] 1) A method for calculating the eccentricity of a two-dimensional abdominal aortic aneurysm point set and constructing a center offset map is provided, which solves the problem of stable description of the eccentricity of two-dimensional abdominal aortic aneurysm.
[0053] 2) A three-dimensional abdominal aortic aneurysm eccentricity calculation method is provided, which can describe the direction of the eccentricity vector and construct an eccentricity reference quantity with translation, scaling and rotation invariance. Attached Figure Description
[0054] Figure 1 This is an example diagram of the rotation of a two-dimensional abdominal aortic aneurysm according to the present invention;
[0055] Figure 2 This is a schematic diagram showing the changes in parameters and components during the rotation process of the abdominal aortic aneurysm according to the present invention;
[0056] Figure 3 This is an example diagram illustrating the deviation of the aortic aneurysm center of gravity according to the present invention;
[0057] Figure 4 This is an example diagram of an eccentric aortic aneurysm in the present invention. Detailed Implementation
[0058] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] This invention designs a system for describing and analyzing the eccentricity of abdominal aortic aneurysms based on higher-order moments, which uses the moment center offset features of a spatial point set to describe the degree of eccentricity of abdominal aortic aneurysms.
[0060] See Figures 1-4 The present invention provides a technical solution: The first aspect of the present invention provides: a method for calculating and analyzing the eccentricity of abdominal aortic aneurysm, comprising the following steps:
[0061] S1: Initialization phase: Read the parameter file of the abdominal aortic aneurysm, including reading the two-dimensional abdominal aortic aneurysm shape point set file, obtaining the abdominal aortic aneurysm point set A, and reading the three-dimensional abdominal aortic aneurysm voxel file and the coordinates of the start and end sections of the analysis region;
[0062] S2: Calculation stage of eccentricity vector and eccentricity vector magnitude: Calculate the eccentricity vector and eccentricity vector magnitude of the abdominal aortic aneurysm, including calculating the eccentricity vector and eccentricity vector magnitude of point set A, obtaining the voxel coordinates of the analysis region through the region growing method, and calculating the eccentricity vector and eccentricity vector magnitude of the analysis region.
[0063] S3: Centroid offset map drawing stage: Calculate the eccentricity parameters and draw the centroid offset map, including calculating the centroids of each order of point set A, obtaining the centroid offset map B, drawing the shape of the eccentric region and displaying the eccentricity calculation parameters.
[0064] In some embodiments, S1: the initialization phase is to read the two-dimensional point set file of the abdominal aortic aneurysm using the pandas library in Python to obtain the two-dimensional point set A of the abdominal aortic aneurysm, where: Pandas is a method library in Python used for data processing and analysis.
[0065] In some embodiments, the S2: eccentricity vector and eccentricity vector magnitude calculation stage further includes the following sub-steps:
[0066] S211: The eccentricity vector vector_bias is determined by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set A;
[0067]
[0068] in
[0069]
[0070]
[0071] S212: The magnitude c of the two-dimensional eccentric vector and the eccentric components cx and cy are determined by the following formula:
[0072] c = |vector_bias|
[0073] c x =vector_bias x
[0074] cy =vector_bias y Where: Vector_bias represents the calculated eccentricity vector, subscript x represents the vector component on the x-axis, subscript y represents the vector component on the y-axis, c is the magnitude of the two-dimensional eccentricity vector, and c x In this context, x represents the x-axis component, and c represents the x-axis component. y In the diagram, y represents the y-axis component, matrix_n represents the nth moment vector of the system at the computation grid point, the subscript x represents the vector component on the x-axis, and the subscript y represents the vector component on the y-axis.
[0075] In some embodiments, the S3: center offset diagram drawing stage includes the following steps:
[0076] S311: Determine the boundaries in the x and y directions of point set A using the numpy.max and numpy.min methods in Python, denoted as X_max, X_min, Y_max, and Y_min;
[0077] S312: Divide each side of the rectangle defined by X_max, X_min, Y_max, and Y_min into 1e3 equal parts and divide the grid accordingly to determine a test grid node set D of size 1e6;
[0078] S313: Traverse set D and calculate the magnitude of the nth moment of the system at each grid point. The magnitude of the nth moment, matirx_n, is determined by the following formula:
[0079]
[0080]
[0081] S314: Determine the grid point with the smallest matrix_n using numpy.min. If the matrix_n of the grid point is less than 1e-3, take the point as the nth order center of the point set A. If the matrix_n of the grid point is greater than 1e-3, double the equal fraction in step S3.2 and recalculate until the matrix_n is less than 1e-3.
[0082] S315: Taking a step size interval of 0.02, calculate the coordinates of the center of mass n from 0.02 to 5, and plot the center of mass offset map with n as the abscissa and the center of mass coordinate components as the ordinate. The center of mass of the abdominal aorta is calculated using a two-dimensional abdominal aorta point set to complete the calculation of the abdominal aorta center of mass offset map. Where: NumPy is a Python library for matrix calculations; numpy.max is a method for selecting the maximum value in a matrix; numpy.min is a method for selecting the minimum value in a matrix; X_max is the maximum x value in point set A; X_min is the minimum x value in point set A; Y_max is the maximum y value in point set A; Y_min is the minimum y value in point set A; 1e3 = 1 × 10 3 1e6 = 1 × 10 6 1e-3=1×10 -3 .
[0083] In some embodiments, S1: the initialization phase involves reading the three-dimensional abdominal aortic aneurysm voxel file and the start and end section coordinates of the analysis region, including the following sub-steps:
[0084] S11: Read the abdominal aortic aneurysm voxel model file using the nii library in Python, and denote it as a three-dimensional array E;
[0085] S12: Obtain the center points F1 and F2 of the two cross sections and the corresponding cross section vector directions through the software interface;
[0086] S13: Let F3 be the midpoint of the line segment formed by F1 and F2, and select the voxel unit in E that is closest to F3 as the initial unit G;
[0087] S14: Establish an amplification queue H, which initially contains only the initial unit G. Analyze whether the voxel units surrounding the initial unit G are within the two cross sections determined in S12. If they exist, add them to queue H and delete the initial unit G. Repeat this process until the queue length is zero. Denote the set of voxels that have been added to queue H as the analysis point set I. Wherein: the nii library is a Python library for processing CT data files with the .Nii format extension.
[0088] In some embodiments, S2: the eccentricity vector and eccentricity vector magnitude calculation stage includes the following sub-steps:
[0089] S221: The eccentricity vector and its magnitude of point set I are calculated by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set I;
[0090]
[0091] in
[0092]
[0093]
[0094] S222: The magnitude c of the three-dimensional eccentric vector and the eccentric components cx, cy, and cz are determined by the following formula:
[0095] c = |vector_bias|
[0096] c x =vector_bias x
[0097] c y =vector_bias y
[0098] c z =vector_bias z .
[0099] In some embodiments, the S3: center offset diagram drawing stage includes the following steps:
[0100] S321: The shape of the cross-sectional system between the two sections is obtained by drawing the S12 section using the VTK function library. In this embodiment, the analysis region segmentation and eccentric vector analysis calculation are performed using a three-dimensional model of the abdominal aorta.
[0101] The second aspect of the present invention provides: an abdominal aortic aneurysm eccentricity calculation and analysis device, used to implement any of the above-mentioned abdominal aortic aneurysm eccentricity calculation and analysis methods, characterized in that: it includes...
[0102] Initialization module: capable of reading parameter files for abdominal aortic aneurysms;
[0103] Eccentricity vector and eccentricity vector magnitude calculation module: capable of calculating the eccentricity vector and eccentricity vector magnitude of abdominal aortic aneurysm;
[0104] The eccentricity offset plotting module can calculate the eccentricity parameter and plot the eccentricity offset plot.
[0105] A third aspect of the present invention provides a computer-readable storage medium, characterized in that: the computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement any of the above-mentioned methods for calculating and analyzing the eccentricity of abdominal aortic aneurysms.
[0106] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method for calculating and analyzing the eccentricity of abdominal aortic aneurysm, characterized in that: Includes the following steps: S1: Initialization phase: Read the parameter file of the abdominal aortic aneurysm, including reading the two-dimensional abdominal aortic aneurysm shape point set file, obtaining the abdominal aortic aneurysm point set A, and reading the three-dimensional abdominal aortic aneurysm voxel file and the coordinates of the start and end sections of the analysis region; S2: Calculation stage of eccentricity vector and eccentricity vector magnitude: Calculate the eccentricity vector and eccentricity vector magnitude of the abdominal aortic aneurysm, including calculating the eccentricity vector and eccentricity vector magnitude of point set A, obtaining the voxel coordinates of the analysis region through the region growing method, and calculating the eccentricity vector and eccentricity vector magnitude of the analysis region. S3: Centroid offset map drawing stage: Calculate the eccentricity parameters and draw the centroid offset map, including calculating the centroids of each order of point set A, obtaining the centroid offset map B, drawing the shape of the eccentric region and displaying the eccentricity calculation parameters; The S1 initialization phase described above uses the pandas library in Python to read the two-dimensional point set file of the abdominal aortic aneurysm and obtain the two-dimensional point set A of the abdominal aortic aneurysm. Here, Pandas is a method library in Python used for data processing and analysis. The S2 stage, which calculates the eccentricity vector and the magnitude of the eccentricity vector, also includes the following sub-steps: S211: The eccentricity vector vector_bias is determined by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set A; ; S212: Magnitude c and eccentricity component c of the two-dimensional eccentric vector x c y Determined by the following formula: Where: Vector_bias represents the calculated eccentricity vector, subscript x represents the vector component on the x-axis, subscript y represents the vector component on the y-axis, c is the magnitude of the two-dimensional eccentricity vector, and c x In this context, x represents the x-axis component, and c represents the x-axis component. y In the diagram, y represents the y-axis component, matrix_n represents the nth moment vector of the system at the computation grid point, the subscript x represents the vector component on the x-axis, and the subscript y represents the vector component on the y-axis.
2. The method for calculating and analyzing the eccentricity of abdominal aortic aneurysm according to claim 1, characterized in that: The S3 stage, the drawing stage of the center-of-gravity offset diagram, includes the following steps: S311: Determine the boundaries in the x and y directions of point set A using the numpy.max and numpy.min methods in Python, denoted as X_max, X_min, Y_max, and Y_min; S312: Divide each side of the rectangle defined by X_max, X_min, Y_max, and Y_min into 1e3 equal parts and divide the grid accordingly to determine a test grid node set D of size 1e6; S313: Traverse set D and calculate the magnitude of the nth moment of the system at each grid point. The magnitude of the nth moment, matirx_n, is determined by the following formula: ; S314: Determine the grid point with the smallest matrix_n using numpy.min. If the matrix_n of the grid point is less than 1e-3, take the point as the nth order center of the point set A. If the matrix_n of the grid point is greater than 1e-3, double the number of equal parts in step S312 and recalculate until the matrix_n is less than 1e-3. S315: Taking a step size interval of 0.02, calculate the coordinates of the center of mass n from 0.02 to 5, and plot the center of mass offset diagram with n as the x-axis and the center of mass coordinate components as the y-axis; where: NumPy is a Python library for matrix calculations, numpy.max is a method for selecting the maximum value in a matrix, numpy.min is a method for selecting the minimum value in a matrix, X_max is the maximum x-value in point set A, X_min is the minimum x-value in point set A, Y_max is the maximum y-value in point set A, Y_min is the minimum y-value in point set A, 1e3 = 1×10 3 1e6 = 1×10 6 1e-3 = 1×10 -3 .
3. The method for calculating and analyzing the eccentricity of abdominal aortic aneurysm according to claim 1, characterized in that: The S1 initialization phase involves reading the three-dimensional abdominal aortic aneurysm voxel file and the start and end section coordinates of the analysis region, including the following sub-steps: S11: Read the abdominal aortic aneurysm voxel model file using the nii library in Python, and denote it as a three-dimensional array E; S12: Obtain the center points F1 and F2 of the two cross sections and the corresponding cross section vector directions through the software interface; S13: Let F3 be the midpoint of the line segment formed by F1 and F2, and select the voxel unit in E that is closest to F3 as the initial unit G; S14: Establish an amplification queue H, which initially contains only the initial unit G. Analyze whether the voxel units surrounding the initial unit G are within the two cross sections determined in S12. If they exist, add them to queue H and delete the initial unit G. Repeat this process until the queue length is zero. Denote the set of voxels that have been added to queue H as the analysis point set I. Wherein: the nii library is a Python library for processing CT data files with the .Nii format extension.
4. The method for calculating and analyzing the eccentricity of abdominal aortic aneurysm according to claim 3, characterized in that: The S2 stage, which involves calculating the eccentricity vector and its magnitude, includes the following sub-steps: S221: The eccentricity vector and its magnitude of point set I are calculated by the following formula, where n is the order of eccentricity analysis and N is the number of coordinates in point set I; ; S222: Magnitude c and eccentricity component c of the three-dimensional eccentric vector x c y c z Determined by the following formula: 。 5. The method for calculating and analyzing the eccentricity of abdominal aortic aneurysm according to claim 3, characterized in that: The S3 stage, the drawing stage of the center-of-gravity offset diagram, includes the following steps: S321: Draw the cross-sectional shape between the two cross sections using the VTK function library.
6. An abdominal aortic aneurysm eccentricity calculation and analysis device, used to implement the abdominal aortic aneurysm eccentricity calculation and analysis method as described in any one of claims 1-5, characterized in that: include Initialization module: capable of reading parameter files for abdominal aortic aneurysms; Eccentricity vector and eccentricity vector magnitude calculation module: capable of calculating the eccentricity vector and eccentricity vector magnitude of abdominal aortic aneurysm; The eccentricity offset plotting module can calculate the eccentricity parameter and plot the eccentricity offset plot.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the abdominal aortic aneurysm eccentricity calculation and analysis method as described in any one of claims 1-5.
Citation Information
Patent Citations
Tumor clinical target volume invasiveness probability calculating method based on hidden Markov model
CN107480445A
System and method for semi-automatic aortic aneurysm analysis
JP2007289704A
