A data processing method and system for ventricular flow field data
Patent Information
- Application Number
- CN202310405329.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-04-17
AI Technical Summary
[0006]本发明的目的是针对现有技术中的不足,提供一种用于心室流场数据的数据处理方法、系统、计算机设备及计算机可读存储介质,以解决相关技术中存在的难以将核磁共振数据进行流体动力学模拟等问题
[0087]本发明的一种用于心室流场数据的数据处理方法、系统、计算机设备及计算机可读存储介质,通过对心室流场数据集进行旋转处理、均匀化处理以及插值处理,以获得可以形成均匀网格平面的网格数据集,便于根据网格数据集计算得到流场力学数据,以模拟心室流场结构,便于供医生进行心脏健康诊断。
Smart Images

Figure CN116416335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical technology, and in particular to a data processing method, system, computer device, and computer-readable storage medium for ventricular flow field data. Background Technology
[0002] Magnetic resonance imaging (MRI), also known as nuclear magnetic resonance imaging (NMRI) or spin imaging, is a diagnostic technique that utilizes the nuclear magnetic resonance phenomenon of certain atomic nuclei in human tissues. The resulting radio frequency signals are processed by a computer to reconstruct an image of a specific layer of the human body. It has advantages such as (1) non-invasiveness, (2) fast response speed, and (3) no artifacts.
[0003] Magnetic resonance imaging (MRI) can produce much clearer images than CT scans in certain areas (such as the heart), making it one of the primary methods for detecting modern heart diseases. Currently used MRI processing programs are closed programs developed in the United States and designed to work with MRI equipment. These programs can only output traditional clinical indicators, such as ejection fraction. However, traditional clinical indicators have many limitations in the timely diagnosis of heart failure; for example, the left ventricular ejection fraction remains unchanged in diastolic heart failure.
[0004] Recent research has found that left ventricular fluid dynamics can serve as an indicator of cardiac health. However, MRI data is cluttered, forming an unknown three-dimensional plane that makes fluid dynamics simulation impossible.
[0005] Currently, no effective solution has been proposed for the problems existing in related technologies, such as the difficulty in performing fluid dynamics simulations of nuclear magnetic resonance data. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing a data processing method, system, computer device, and computer-readable storage medium for ventricular flow field data, thereby solving problems such as the difficulty in performing fluid dynamics simulations on nuclear magnetic resonance data in related technologies.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, the present invention provides a data processing method for ventricular flow field data, wherein the ventricular flow field data is obtained through nuclear magnetic resonance imaging, comprising:
[0009] A ventricular flow field dataset is obtained, wherein the ventricular flow field dataset includes a plurality of first data points, each of which includes an X coordinate value, a Y coordinate value, a Z coordinate value, an X-direction velocity value, a Y-direction velocity value, and a Z-direction velocity value;
[0010] The ventricular flow field dataset is transformed to obtain a grid dataset;
[0011] The ventricular flow field dataset is transformed to obtain a grid dataset;
[0012] Based on the grid dataset, the hydrodynamic data of the intracardiac ejection vortex ring are calculated, wherein the hydrodynamic data includes vorticity, circulation, and average kinetic energy per unit volume.
[0013] In some embodiments, obtaining the ventricular flow field dataset includes:
[0014] Obtain the VTK file;
[0015] Read the VTK file to obtain N first data points, where N is a positive integer;
[0016] All the first data points are stored in an N×6 matrix to form a ventricular flow field dataset.
[0017] In some embodiments, the ventricular flow field dataset is transformed to obtain a grid dataset, including:
[0018] The first data point of the ventricular flow field dataset is rotated to obtain the second data point, wherein the second data point corresponds one-to-one with the first data point;
[0019] The Z-coordinate value of the second data point is homogenized to obtain the third data point;
[0020] All the third data points are aggregated to form a first grid plane, wherein the first grid plane is located in the XOY plane and is a non-uniform grid plane;
[0021] The first grid plane is interpolated to form a second grid plane, wherein the second grid plane is a uniform grid plane.
[0022] In some embodiments, the rotation process includes:
[0023] Two sets of first data points are randomly selected from the ventricular flow field dataset, each set including three non-collinear first data points;
[0024] Calculate the normal vectors of the two sets of first data points to obtain the first normal vector and the second normal vector;
[0025] Determine whether the second normal vector is parallel to the first normal vector;
[0026] When the second normal vector is parallel to the first normal vector, the first normal vector is used as the plane normal vector of the ventricular flow field dataset;
[0027] Calculate the rotation matrix based on the plane normal vector and the XOY plane normal vector;
[0028] Multiply all the first data points of the ventricular flow field dataset by the rotation matrix to obtain the second data points.
[0029] In some embodiments, the homogenization process includes:
[0030] Compare the Z coordinate value of the second data point with Subtract to obtain the Z' coordinate value, where, The mean of the Z coordinate values of all the second data points;
[0031] Determine whether the Z' coordinate value is greater than a preset Z coordinate value, wherein the preset Z coordinate value = a × Z max Coordinate values, a∈(0,1), Z max The coordinate value is the maximum Z-coordinate of all the second data points;
[0032] If the Z' coordinate value is less than or equal to the preset Z coordinate value, the second data point is converted into a third data point.
[0033] In some embodiments, the interpolation process includes:
[0034] Obtain the distance between the third data point and the grid point;
[0035] Obtain the number of the third data points whose distance is less than the grid spacing, where the grid spacing = b × D. min b∈(0,1),D min The minimum distance between two adjacent third data points;
[0036] When the number of the third data points is 0, the velocity value of the grid point is 0;
[0037] When the number of the third data points is 1, the velocity value of the grid point is the velocity value of the third data point;
[0038] When the number of the third data points is 2 or 3, the velocity value of the grid point is obtained by linearly interpolating the velocity values in the X and Y directions in segments, and then summing and averaging the interpolation results in the X and Y directions.
[0039] When the number of the third data points is greater than or equal to 4, the velocity value of the grid point is the velocity value obtained by bilinear interpolation of the velocity values in the X direction and the Y direction.
[0040] In some embodiments, determining whether the second normal vector is parallel to the first normal vector includes:
[0041] Obtain the error between the second normal vector and the first normal vector;
[0042] Determine whether the error meets the preset error;
[0043] When the error satisfies the preset error, the second normal vector is parallel to the first normal vector;
[0044] If the error does not meet the preset error, the second normal vector is not parallel to the first normal vector.
[0045] In some embodiments, calculating the rotation matrix based on the plane normal vector and the XOY plane normal vector includes:
[0046] Calculate the rotation angle β according to formula (1):
[0047]
[0048] Where a is the normal vector of the XOY plane, and b is the normal vector of the plane after normalization.
[0049] Calculate the axis of rotation C according to formula (II):
[0050]
[0051] Calculate the rotation matrix R according to formula (iii):
[0052]
[0053] In some of these embodiments, calculating vorticity includes:
[0054] Select four grid points: the top, bottom, left, and right of the grid point whose vorticity is to be calculated;
[0055] Perform double interpolation of the velocity along the X and Y directions;
[0056] Calculate the partial derivative based on the interpolation results, and then calculate the vorticity according to formula (iv).
[0057]
[0058] In some of these embodiments, calculating the circulation includes:
[0059] With each grid point as the center, set an L×L square, and calculate the circulation according to formula (5), where L is the grid spacing;
[0060] Γ=∫ωds≈∑ω×ΔS (5)
[0061] Where ΔS is the area of the square, and ω is the value of the center grid point.
[0062] In some of these embodiments, calculating the average kinetic energy per unit volume includes:
[0063] Calculate the average kinetic energy per unit volume according to formula (vi);
[0064]
[0065] in, Let V be the mean of all grid points.
[0066] In a second aspect, a data processing system for ventricular flow field data is provided, applicable to the data processing method described in the first aspect, comprising:
[0067] An initial data acquisition unit is used to acquire a ventricular flow field dataset, wherein the ventricular flow field dataset includes a plurality of first data points, each of which includes an X coordinate value, a Y coordinate value, a Z coordinate value, an X-direction velocity value, a Y-direction velocity value, and a Z-direction velocity value;
[0068] The ventricular flow field dataset is transformed to obtain a grid dataset;
[0069] The transformation unit is used to transform the ventricular flow field dataset to obtain a grid dataset;
[0070] The computing unit is used to calculate the hydrodynamic data of the intracardiac ejection vortex ring based on the grid dataset.
[0071] In some embodiments, the initial data acquisition unit includes:
[0072] The acquisition module is used to acquire VTK files;
[0073] The reading module is used to read the VTK file to obtain N first data points, where N is a positive integer;
[0074] The storage module is used to store all the first data points in an N×6 matrix to form a ventricular flow field dataset.
[0075] In some embodiments, the conversion unit includes:
[0076] A rotation processing module is used to rotate the first data point of the ventricular flow field dataset to obtain a second data point, wherein the second data point corresponds one-to-one with the first data point;
[0077] The homogenization processing module is used to homogenize the Z coordinate value of the second data point to obtain the third data point;
[0078] A summary processing module is used to summarize all the third data points to form a first grid plane, wherein the first grid plane is located in the XOY plane and is a non-uniform grid plane;
[0079] An interpolation processing module is used to perform interpolation processing on the first grid plane to form a second grid plane, wherein the second grid plane is a uniform grid plane.
[0080] In some embodiments, the computing unit includes:
[0081] The first calculation module is used to calculate vorticity based on the grid dataset;
[0082] The second calculation module is used to calculate the circulation based on the grid dataset;
[0083] The third calculation module is used to calculate the average kinetic energy per unit volume based on the grid dataset.
[0084] Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data processing method described in the first aspect above.
[0085] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data processing method described above.
[0086] The present invention adopts the above technical solution and has the following technical effects compared with the prior art:
[0087] The present invention provides a data processing method, system, computer device, and computer-readable storage medium for ventricular flow field data. By performing rotation, homogenization, and interpolation processing on the ventricular flow field dataset, a grid dataset that can form a uniform grid plane is obtained. This facilitates the calculation of flow field mechanics data based on the grid dataset to simulate the ventricular flow field structure, making it convenient for doctors to diagnose cardiac health. Attached Figure Description
[0088] Figure 1 This is a flowchart (a) of a data processing method according to an embodiment of the present invention;
[0089] Figure 2 This is a flowchart (II) of a data processing method according to an embodiment of the present invention;
[0090] Figure 3 This is a flowchart (III) of a data processing method according to an embodiment of the present invention;
[0091] Figure 4 This is a flowchart (IV) of a data processing method according to an embodiment of the present invention;
[0092] Figure 5 This is a framework diagram of a data processing system according to an embodiment of the present invention;
[0093] Figure 6 This is a schematic diagram of the interface of a data processing system according to an embodiment of the present invention;
[0094] Figure 7 This is a vortex distribution diagram according to an embodiment of the present invention;
[0095] Figure 8 This is a velocity vector distribution diagram according to an embodiment of the present invention;
[0096] Figure 9 This is a time-varying graph of the average volumetric kinetic energy, negative circulation, and positive circulation according to an embodiment of the present invention.
[0097] Figure 10 This is a schematic diagram of a research report according to an embodiment of the present invention.
[0098] The reference numerals in the attached figures are as follows: 500, data processing system; 510, initial data acquisition unit; 520, conversion unit; 530, calculation unit; 540, output unit. Detailed Implementation
[0099] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0100] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0101] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0102] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units (elements) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or apparatus. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0103] Example 1
[0104] This embodiment is an illustrative example of the present invention.
[0105] Figure 1This is a flowchart (a) of a data processing method according to an embodiment of the present invention. Figure 1 As shown, a data processing method for ventricular flow field data, which is obtained through nuclear magnetic resonance imaging, includes:
[0106] Step S102: Obtain the ventricular flow field dataset, wherein the ventricular flow field dataset includes several first data points, and each first data point includes X coordinate value, Y coordinate value, Z coordinate value, X-direction velocity value, Y-direction velocity value and Z-direction velocity value;
[0107] Step S104: Transform the ventricular flow field dataset to obtain a grid dataset;
[0108] Step S106: Based on the grid dataset, calculate and obtain the hydrodynamic data of the intracardiac ejection vortex ring, wherein the hydrodynamic data includes vorticity, circulation, and average kinetic energy per unit volume.
[0109] In step S102, all the first data points of the ventricular flow field dataset form a three-dimensional plane.
[0110] In step S102, the X-direction velocity value refers to the velocity component in the X direction, the Y-direction velocity value refers to the velocity component in the Y direction, and the Z-direction velocity value refers to the velocity component in the Z direction.
[0111] In step S104, the transformation process includes rotation processing, homogenization processing, and interpolation processing, which are used to transform the first data point from three-dimensional data into two-dimensional data.
[0112] In step S104, all data points of the grid dataset form a two-dimensional grid plane, and the two-dimensional grid plane is the XOY plane, that is, the Z coordinate value is 0 (including equal to 0 or approximately 0) and the Z direction velocity value is 0.
[0113] Furthermore, after step S106, the method further includes:
[0114] Step S108: Output fluid dynamics data.
[0115] In step S108, the output fluid dynamics data includes outputting fluid dynamics data at a single moment and outputting fluid dynamics data of the cardiac cycle.
[0116] Specifically, the output of fluid dynamics data at a single moment includes a velocity vector distribution diagram, a vorticity distribution diagram, and a TXT file. The TXT file includes the positive and negative circulation of the ejection vortex rings, the average kinetic energy per unit volume, the coordinates and size of the maximum vorticity point, and the coordinates and size of the minimum vorticity point.
[0117] Specifically, the output of cardiac cycle fluid dynamics data includes outputting fluid dynamics data at several single moments, positive and negative circulation time variation diagrams, average unit volume kinetic energy time variation diagrams, A peak, E peak, and a research report on the structure of the blood ejection vortex ring flow field.
[0118] The cardiac cycle is a complete cardiac cycle.
[0119] Through the above steps, the difficult-to-read three-dimensional data output by the MRI equipment is transformed into easily read two-dimensional data, thereby simulating the ventricular flow field structure and facilitating doctors' diagnosis of heart health.
[0120] Figure 2 This is a flowchart (II) of a data processing method according to an embodiment of the present invention. Figure 2 The acquisition of the ventricular flow field dataset includes:
[0121] Step S202: Obtain the VTK file;
[0122] Step S204: Read the VTK file to obtain N first data points, where N is a positive integer;
[0123] Step S206: Save all the first data points in an N×6 matrix to form a ventricular flow field dataset.
[0124] In step S202, the VTK file is a file output by the nuclear magnetic resonance device.
[0125] In step S206, each row of the matrix stores the X coordinate value, Y coordinate value, Z coordinate value, X-direction velocity value, Y-direction velocity value, and Z-direction velocity value of the first data point.
[0126] Through the above steps, the VTK data points are organized into a ventricular flow field dataset, which facilitates subsequent transformation and processing steps.
[0127] Figure 3 This is a flowchart (III) of a data processing method according to an embodiment of the present invention. Figure 3 As shown, the ventricular flow field dataset is transformed to obtain grid data, including:
[0128] Step S302: Rotate the first data point of the ventricular flow field dataset to obtain the second data point, wherein the second data point corresponds one-to-one with the first data point;
[0129] Step S304: The Z coordinate value of the second data point is homogenized to obtain the third data point;
[0130] Step S306: Summarize all third data points to form a first grid plane, wherein the first grid plane is located in the XOY plane and is a non-uniform grid plane;
[0131] Step S308: Interpolate the first grid plane to form a second grid plane, wherein the second grid plane is a uniform grid plane.
[0132] The data points (grid points) of the second grid plane constitute the grid dataset.
[0133] In step S302, the purpose of rotating the first data point is to make the plane formed by the second data point of the ventricular flow field dataset parallel to the XOY plane.
[0134] The XOY plane refers to a two-dimensional plane where the Z coordinate value is 0 and the Z-direction velocity value is 0.
[0135] Specifically, the rotation process includes:
[0136] Step S3021: Randomly select two sets of first data points from the ventricular flow field dataset, each set including three non-collinear first data points;
[0137] Step S3022: Calculate the normal vectors of the two sets of first data points to obtain the first normal vector and the second normal vector;
[0138] Step S3023: Determine whether the second normal vector is parallel to the first normal vector;
[0139] Step S3024: When the second normal vector is parallel to the first normal vector, the first normal vector is used as the plane normal vector of the ventricular flow field dataset.
[0140] Step S3025: Calculate the rotation matrix based on the plane normal vector and the XOY plane normal vector;
[0141] Step S3026: Multiply all the first data points of the ventricular flow field dataset by the rotation matrix to obtain the second data points.
[0142] In step S3023, determining whether the second normal vector is parallel to the first normal vector includes:
[0143] Step S30231: Obtain the error between the second normal vector and the first normal vector;
[0144] Step S30232: Determine whether the error meets the preset error;
[0145] Step S30233: When the error meets the preset error, the second normal vector is parallel to the first normal vector;
[0146] Step S30234: If the error does not meet the preset error, the second normal vector is not parallel to the first normal vector.
[0147] Among them, steps S30233 and S30234 are parallel steps.
[0148] In step S30231, the method for obtaining the error is as follows: calculate the angle between the two vectors. When the angle is less than 0.001°, it is considered to meet the preset error. When it is greater than 0.001°, it is considered not to meet the preset error.
[0149] In step S30232, determining whether the error meets the preset error means determining whether the error is less than or equal to the preset error.
[0150] In some of these embodiments, the preset error is 1×10⁻⁶. -5 .
[0151] In step S30233, the error satisfies the preset error, which means that the error is less than or equal to the preset error.
[0152] In step S30234, the error does not meet the preset error means that the error is greater than the preset error.
[0153] Following step S3023, the method further includes:
[0154] Step S3027: If the second normal vector is not parallel to the first normal vector, repeat the above steps.
[0155] Steps S3027 and S3024 are parallel steps.
[0156] Specifically, repeat steps S3021-S3023 until the second normal vector is parallel to the first normal vector.
[0157] In step S3025, calculating the rotation matrix based on the plane normal vector and the normal vector of the XOY plane includes:
[0158] Step S30251: Calculate the rotation angle β according to formula (I):
[0159]
[0160] Where a is the normal vector of the XOY plane, and b is the normal vector after normalizing the plane normal vector;
[0161] Step S30252: Calculate the rotation axis C according to formula (II):
[0162]
[0163] Step S30253: Calculate the rotation matrix R according to formula (III):
[0164]
[0165] In step S30251, a is (0, 0, 1).
[0166] In step S304, the purpose of homogenizing the second data point is to translate the plane formed by the third data point of the ventricular flow field dataset to the XOY plane.
[0167] Specifically, the homogenization process includes:
[0168] Step S3041: Compare the Z coordinate value of the second data point with... Subtract to obtain the Z' coordinate value, where, The mean of the Z-coordinate values of all second data points;
[0169] Step S3042: Determine whether the Z' coordinate value is greater than the preset Z coordinate value, where the preset Z coordinate value = a × Z max Coordinate values, a∈(0,1), Z max The coordinate value is the maximum Z-coordinate of all second data points;
[0170] Step S3043: If the Z' coordinate value is less than or equal to the preset Z coordinate value, the second data point is converted into the third data point.
[0171] In step S3041, the purpose is to bring the second data point closer to the XOY plane.
[0172] In step S3042, the purpose is to remove extreme values.
[0173] In some of these embodiments, a∈(0, 0.5). Preferably, a∈(0, 0.3). More preferably, a∈(0, 0.25). More preferably, a∈(0, 0.2). More preferably, a∈(0, 0.1).
[0174] Following step S3042, the method further includes:
[0175] Step S3044: If the Z' coordinate value is greater than the preset Z coordinate value, delete the second data point.
[0176] Through steps S3041 to S3044, the Z coordinate value of the third data point can be regarded as 0, thereby making the third data point located in the XOY plane.
[0177] In steps S306 to S308, the purpose of interpolating the first grid plane formed by the third data point is to transform the non-uniform grid plane into a uniform grid plane, which facilitates subsequent mechanical data calculations and the generation of corresponding distribution and variation maps.
[0178] Specifically, the interpolation process includes:
[0179] Step S3081: Obtain the distance between the third data point and the grid point;
[0180] Step S3082: Obtain the number of third data points whose distance is less than the grid spacing, where the grid spacing = b × D min b∈(0,1),D min The minimum distance between two adjacent third data points;
[0181] Step S3083: When the number of third data points is 0, the velocity value of the grid point is 0;
[0182] Step S3084: When the number of third data points is 1, the velocity value of the grid point is the velocity value of the third data point;
[0183] Step S3085: When the number of third data points is 2 or 3, the velocity value of the grid point is obtained by linearly interpolating the velocity values in the X and Y directions in segments, and then summing and averaging the interpolation results in the X and Y directions.
[0184] Step S3086: When the number of third data points is greater than or equal to 4, the velocity value of the grid point is the velocity value obtained by bilinear interpolation of the velocity values in the X direction and the Y direction.
[0185] Among them, steps S3083 to S3086 are either parallel steps or progressive steps.
[0186] Specifically, after step S3082, the following is also included:
[0187] Determine if the quantity meets the preset quantity;
[0188] If the quantity meets the first preset quantity, proceed to step S3083;
[0189] If the quantity meets the second preset quantity, proceed to step S3084;
[0190] If the quantity meets the third preset quantity, proceed to step S3085;
[0191] If the quantity meets the fourth preset quantity, proceed to step S3086.
[0192] In step S3082, the distance between all adjacent third data points is obtained, and the minimum distance is selected.
[0193] In step S3082, b ∈ (0, 0.8). Preferably, b ∈ (0, 0.6). More preferably, b ∈ (0.2, 0.6). More preferably, b ∈ (0.4, 0.6). More preferably, b = 0.5.
[0194] In step S3083, a velocity value of 0 for a grid point means that the velocity value of the grid point in the X direction is 0 and the velocity value in the Y direction is 0.
[0195] Through steps S3081 to S3086, the non-uniform grid plane is transformed into a uniform grid plane, thereby making the ventricular flow field data distribution more uniform and facilitating the output of distribution maps and dynamic maps.
[0196] Figure 4 This is a flowchart (four) of a data processing method according to an embodiment of the present invention. Figure 4 As shown, the hydrodynamic data obtained from the intracardiac ejection vortex rings include:
[0197] Step S402: Calculate the vorticity based on the grid dataset;
[0198] Step S404: Calculate the circulation based on the grid dataset;
[0199] Step S406: Calculate the average kinetic energy per unit volume based on the grid dataset.
[0200] In step S402, the calculation of vorticity includes:
[0201] Select four grid points: the top, bottom, left, and right of the grid point whose vorticity is to be calculated;
[0202] Perform double interpolation of the velocity along the X and Y directions;
[0203] Calculate the partial derivative based on the interpolation results, and then calculate the vorticity according to formula (iv).
[0204]
[0205] In step S404, calculating the circulation includes:
[0206] With each grid point as the center, set an L×L square, and calculate the circulation according to formula (5), where L is the grid spacing;
[0207] Γ=∫ωds≈∑ω×ΔS (5)
[0208] Where ΔS is the area of the square, and ω is the value of the center grid point.
[0209] Where L = b × D min .
[0210] In step S406, calculating the average kinetic energy per unit volume includes:
[0211] Calculate the average kinetic energy per unit volume according to formula (vi);
[0212]
[0213] in, Let V be the mean of all grid points.
[0214] Where V is the velocity value of the grid point.
[0215] Steps S402 to S406 can quickly generate relevant hydrodynamic data of the ventricular flow field, facilitating subsequent image generation and report analysis.
[0216] Figure 5 This is a framework diagram of a data processing system according to an embodiment of the present invention. Figure 5 As shown, a data processing system 500 for ventricular flow field data includes an initial data acquisition unit 510, a conversion unit 520, and a calculation unit 530. The initial data acquisition unit 510 acquires a ventricular flow field dataset; the conversion unit 520 converts the ventricular flow field dataset to obtain grid data; and the calculation unit 530 calculates the hydrodynamic data of the intraventricular ejection vortex ring based on the grid data.
[0217] Furthermore, the data processing system 500 also includes an output unit 540. The output unit 540 is used to output fluid dynamics data.
[0218] Furthermore, the initial data acquisition unit 510 includes an acquisition module, a reading module, and a saving module. The acquisition module acquires the VTK file; the reading module reads the VTK file to obtain N first data points, where N is a positive integer; and the saving module saves all the first data points in an N×6 matrix to form a ventricular flow field dataset.
[0219] Furthermore, the transformation unit 520 includes a rotation processing module, a homogenization processing module, a summarization processing module, and an interpolation processing module. The rotation processing module rotates the first data points of the ventricular flow field dataset to obtain second data points, where each second data point corresponds one-to-one with the first data point. The homogenization processing module homogenizes the Z-coordinate values of the second data points to obtain third data points. The summarization processing module sums all the third data points to form a first grid plane, which is located in the XOY plane and is a non-uniform grid plane. The interpolation processing module interpolates the first grid plane to form a second grid plane, which is a uniform grid plane.
[0220] Furthermore, the calculation unit 530 includes a first calculation module, a second calculation module, and a third calculation module. The first calculation module is used to calculate vorticity based on grid data; the second calculation module is used to calculate circulation based on grid data; and the third calculation module is used to calculate average kinetic energy per unit volume based on grid data.
[0221] Furthermore, the data processing method of this application embodiment can be implemented by a computer device. Components of the computer device may include, but are not limited to, a processor and a memory storing computer program instructions.
[0222] In some embodiments, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0223] In some embodiments, the memory may include a mass storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to a data processing device. In a particular embodiment, the memory is non-volatile memory. In a particular embodiment, the memory includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0224] Memory can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor.
[0225] The processor implements any of the QR code access methods described in the above embodiments by reading and executing computer program instructions stored in the memory.
[0226] In some embodiments, the computer device may further include a communication interface and a bus. The processor, memory, and communication interface are connected via the bus and communicate with each other.
[0227] The communication interface is used to enable communication between the various units, devices, and / or equipment in the embodiments of this application. The communication interface can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0228] A bus, including hardware, software, or both, couples components of a computer device together. Buses include, but are not limited to, at least one of the following: Data Bus, Address Bus, Control Bus, Expansion Bus, and Local Bus. For example, and not as a limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, a bus may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0229] The computer device can execute the data processing methods described in the embodiments of this application.
[0230] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the data processing methods in the above embodiments.
[0231] Example 2
[0232] This embodiment is a specific implementation of the present invention.
[0233] like Figure 6 As shown, the interface of the data processing software (corresponding to the data processing method and system) can directly display key data after nuclear magnetic resonance data processing, such as maximum vorticity, minimum vorticity, average kinetic energy per unit volume, average positive circulation, and average negative circulation.
[0234] When "Calculate a single data point" (i.e., a single moment) is selected, it will... Figure 6 The display shows the maximum vorticity, minimum vorticity, average kinetic energy per unit volume, average positive circulation, and average negative circulation, and outputs the data. Figure 7 The vorticity distribution diagram shown Figure 8 The velocity vector distribution diagram and the TXT file containing the key data are shown.
[0235] When "Calculate multiple data points" (i.e., cardiac cycles) is selected, Figure 6 The display shows the maximum vorticity, minimum vorticity, average kinetic energy per unit volume, average positive circulation, and average negative circulation, and outputs the data. Figure 7 The vorticity distribution diagram shown Figure 8 The velocity vector distribution diagram shown Figure 9 The time variation graphs of each component shown are as follows: Figure 10 The report diagram shown includes a TXT file containing key data.
[0236] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A data processing method for ventricular flow field data, wherein the ventricular flow field data is obtained through nuclear magnetic resonance, characterized in that, include: A ventricular flow field dataset is obtained, wherein the ventricular flow field dataset includes a plurality of first data points, each of which includes an X coordinate value, a Y coordinate value, a Z coordinate value, an X-direction velocity value, a Y-direction velocity value, and a Z-direction velocity value; The ventricular flow field dataset is transformed to obtain a grid dataset; Based on the grid dataset, the hydrodynamic data of the intracardiac ejection vortex ring are calculated, wherein the hydrodynamic data includes vorticity, circulation, and average kinetic energy per unit volume. The acquisition of the ventricular flow field dataset includes: Obtain the VTK file; Read the VTK file to obtain N first data points, where N is a positive integer; All the first data points are stored in an N×6 matrix to form a ventricular flow field dataset; The transformation process performed on the ventricular flow field dataset to obtain a grid dataset includes: The first data point of the ventricular flow field dataset is rotated to obtain the second data point, wherein the second data point corresponds one-to-one with the first data point; The Z-coordinate value of the second data point is homogenized to obtain the third data point; All the third data points are aggregated to form a first grid plane, wherein the first grid plane is located in the XOY plane and is a non-uniform grid plane; The first grid plane is interpolated to form a second grid plane, wherein the second grid plane is a uniform grid plane; The rotation process includes: Two sets of first data points are randomly selected from the ventricular flow field dataset, each set including three non-collinear first data points; Calculate the normal vectors of the two sets of first data points to obtain the first normal vector and the second normal vector; Determine whether the second normal vector is parallel to the first normal vector; When the second normal vector is parallel to the first normal vector, the first normal vector is used as the plane normal vector of the ventricular flow field dataset; Calculate the rotation matrix based on the plane normal vector and the XOY plane normal vector; Multiply all the first data points of the ventricular flow field dataset by the rotation matrix to obtain the second data points; The homogenization process includes: Compare the Z coordinate value of the second data point with Subtract to obtain the Z' coordinate value, where, The mean of the Z coordinate values of all the second data points; Determine whether the Z' coordinate value is greater than a preset Z coordinate value, wherein the preset Z coordinate value = a × Z max Coordinates, a∈(0,1), Z max The coordinate value is the maximum Z-coordinate of all the second data points; If the Z' coordinate value is less than or equal to the preset Z coordinate value, the second data point is converted into a third data point; The interpolation process includes: Obtain the distance between the third data point and the grid point; Obtain the number of the third data points whose distance is less than the grid spacing, where the grid spacing = b × D. min b∈(0,1),D min The minimum distance between two adjacent third data points; When the number of the third data points is 0, the velocity value of the grid point is 0; When the number of the third data points is 1, the velocity value of the grid point is the velocity value of the third data point; When the number of the third data points is 2 or 3, the velocity value of the grid point is obtained by linearly interpolating the velocity values in the X and Y directions in segments, and then summing and averaging the interpolation results in the X and Y directions. When the number of the third data points is greater than or equal to 4, the velocity value of the grid point is the velocity value obtained by bilinear interpolation of the velocity values in the X direction and the Y direction. The calculation of vorticity includes: Select four grid points: the top, bottom, left, and right of the grid point whose vorticity is to be calculated; Perform double interpolation of the velocity along the X and Y directions; Calculate the partial derivative based on the interpolation results, and then calculate the vorticity according to formula (iv). (Four); The calculation of circulation includes: Centered on each grid point, set an L×L square and calculate the circulation according to formula (5), where L is the grid spacing; (five) Where ΔS is the area of the square, and ω is the value of the center grid point; The calculation of average kinetic energy per unit volume includes: Calculate the average kinetic energy per unit volume according to formula (vi); (six) in, Let V be the mean of all grid points.
2. The data processing method according to claim 1, characterized in that, Determining whether the second normal vector is parallel to the first normal vector includes: Obtain the error between the second normal vector and the first normal vector; Determine whether the error meets the preset error; When the error satisfies the preset error, the second normal vector is parallel to the first normal vector; If the error does not meet the preset error, the second normal vector is not parallel to the first normal vector; The calculation of the rotation matrix based on the plane normal vector and the XOY plane normal vector includes: Calculate the rotation angle β according to formula (1): (one) Where a is the normal vector of the XOY plane, and b is the normal vector of the plane after normalization. Calculate the axis of rotation C according to formula (II): (two); Calculate the rotation matrix R according to formula (iii): (three).
3. A data processing system for ventricular flow field data, used to execute the data processing method as described in any one of claims 1 to 2, characterized in that, include: An initial data acquisition unit is used to acquire a ventricular flow field dataset, wherein the ventricular flow field dataset includes a plurality of first data points, each of which includes an X coordinate value, a Y coordinate value, a Z coordinate value, an X-direction velocity value, a Y-direction velocity value, and a Z-direction velocity value; The transformation unit is used to transform the ventricular flow field dataset to obtain a grid dataset; The computing unit is used to calculate the hydrodynamic data of the intracardiac ejection vortex ring based on the grid dataset.
4. The data processing system according to claim 3, characterized in that, The initial data acquisition unit includes: The acquisition module is used to acquire VTK files; The reading module is used to read the VTK file to obtain N first data points, where N is a positive integer; A storage module is used to store all the first data points in an N×6 matrix to form a ventricular flow field dataset; The conversion unit includes: A rotation processing module is used to rotate the first data point of the ventricular flow field dataset to obtain a second data point, wherein the second data point corresponds one-to-one with the first data point; The homogenization processing module is used to homogenize the Z coordinate value of the second data point to obtain the third data point; A summary processing module is used to summarize all the third data points to form a first grid plane, wherein the first grid plane is located in the XOY plane and is a non-uniform grid plane; An interpolation processing module is used to perform interpolation processing on the first grid plane to form a second grid plane, wherein the second grid plane is a uniform grid plane; The computing unit includes: The first calculation module is used to calculate vorticity based on the grid dataset; The second calculation module is used to calculate the circulation based on the grid dataset; The third calculation module is used to calculate the average kinetic energy per unit volume based on the grid dataset.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data processing method as described in any one of claims 1 to 2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data processing method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Heart left ventricle flow field domain numerical simulation method, computer and computer program
CN108257214A
Flow field vortex region detection method based on extreme learning machine
CN111651930A