Automatic grid generation and optimization method and system for heart three-dimensional electrical conduction model
By combining CT/MRI voxel data and diffusion tensor fields to generate an initial cardiac surface mesh, and optimizing it using electrical activity curvature and fiber alignment, the ambiguity and accuracy-efficiency issues of mesh generation in cardiac electrophysiological simulation were resolved, achieving efficient and accurate cardiac electrical conduction simulation.
Patent Information
- Application Number
- CN202511215189.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-12-12
AI Technical Summary
In existing cardiac electrophysiology simulations, mesh generation methods suffer from problems such as topological ambiguity, insufficient fiber information fusion, difficulty in balancing efficiency and accuracy with static meshes, and insufficient coupling between simulation errors and mesh quality, which fail to meet the high requirements of personalized diagnosis and treatment.
Based on cardiac 3D CT/MRI voxel data and diffusion tensor field, a physically consistent initial cardiac surface mesh is generated. Regions are divided by electrical activity curvature. Combined with fiber mesh alignment assessment and multi-objective optimization, the local error field is calculated for local refinement, and mesh quality and alignment are monitored in real time for local recalibration.
It achieves efficient and accurate generation and optimization of cardiac electrical conduction meshes, improves simulation efficiency and robustness, ensures fiber alignment and accuracy of simulation results, and is suitable for long-term or multi-cycle simulations.
Smart Images

Figure CN121120986A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cardiac electrophysiology, and in particular to an automated mesh generation and optimization method and system for a three-dimensional cardiac electrical conduction model. Background Technology
[0002] Cardiac electrophysiological simulation relies on high-quality 3D meshes to accurately characterize the anatomical structure and fiber anisotropy of the myocardium. Currently, most mainstream automated mesh generation methods are based on Marching Cubes (MC) surface reconstruction, Delaunay tetrahedral subdivision, or advancing wavefront methods to generate hexahedrons, and then stitching together elements from different regions. However, these techniques each have the following shortcomings:
[0003] (1) Complex handling of ambiguity. Traditional MC algorithm will have topological ambiguity when reconstructing isosurfaces, resulting in discontinuities, holes or false faces in the reconstructed surface, which requires manual intervention or post-processing algorithm repair, increasing the complexity of the process and the risk of human error.
[0004] (2) Insufficient fiber information fusion. Most methods generate meshes based only on geometric or anatomical features, failing to integrate the fiber orientation depth of DTMRI into mesh generation and optimization, making it difficult to guarantee the physical consistency of preferential propagation along fibers during electrical conduction simulation.
[0005] (3) Static meshes are difficult to balance efficiency and accuracy. Tetrahedral meshes can adapt to complex geometries but have a large number of elements and low solution efficiency; hexahedral meshes have superior computational performance but are difficult to fit sharp anatomical structures. A single mesh type is difficult to balance accuracy and efficiency in different regions.
[0006] (4) Insufficient coupling between simulation error and mesh quality. Most current mesh generation processes are completed "once" and lack a post-hoc refinement mechanism for simulation errors; mesh quality is difficult to maintain online during the simulation process, resulting in the decay of accuracy of simulation results over a long period or multiple cycles.
[0007] Furthermore, with the rapid growth in demand for personalized diagnosis and treatment of cardiac electrical conduction, higher requirements are being placed on the automation, processing speed, simulation accuracy, and reliability of the mesh generation process. The market and clinical research urgently need a highly efficient, integrated mesh generation and optimization technology that can seamlessly integrate imaging and fiber anisotropy information, automatically eliminate reconstruction ambiguity, intelligently refine and densify the mesh under simulation error-driven conditions, and possess online quality self-correction capabilities. Summary of the Invention
[0008] In view of this, the purpose of this invention is to provide an automated mesh generation and optimization method and system for a three-dimensional cardiac electrical conduction model, which can achieve high-efficiency, high-precision, and high-robust integrated cardiac electrical conduction mesh generation and maintenance.
[0009] An automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model, comprising:
[0010] Based on three-dimensional CT / MRI voxel data of the heart, and combined with fiber orientation information extracted from the diffusion tensor field, an initial cardiac surface mesh M with physical consistency is generated. s .
[0011] Calculate the electrical activity curvature, and then apply the initial cardiac surface mesh M based on the electrical activity curvature. s Divide into sub-regions and generate hybrid mesh M h .
[0012] The fiber mesh alignment is evaluated based on a continuous fiber field, and the optimized standard body mesh M′ is obtained through multi-objective optimization.
[0013] Calculate the local error field, mark the high error region based on the local error field, refine the local mesh of the high error region to obtain the error optimization mesh M″.
[0014] The mesh quality and alignment metrics are monitored in real time. If the mesh quality or alignment is found to be below a preset threshold, local recalibration is performed to obtain the locally recalibrated mesh M. u .
[0015] In a preferred embodiment of the present invention, in the above-described automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model, the initial cardiac surface mesh M with physical consistency is generated based on three-dimensional cardiac CT / MRI voxel data and fiber orientation information extracted from the diffusion tensor field. s include:
[0016] Acquire three-dimensional CT / MRI voxel data of the heart. For each voxel position (x, y, z), calculate the fiber orientation field of each voxel from the diffusion tensor field D(x, y, z). in, Let be a test vector of length 1, ‖‖·‖‖ be the Euclidean norm, and T be the three-dimensional diffusion tensor of each voxel.
[0017] Calculate the consistency coefficient field used to evaluate the local consistency between grayscale changes and fiber orientation in CT / MRI images. C g ∈[-1,1], where · is the vector dot product. For each voxel, the CT / MRI grayscale gradient, C g The closer it is to 1, the more parallel the grayscale variation surface is to the fiber direction.
[0018] According to the consistency coefficient field C gThe size is determined, and a triangular patch connection method is selected. A set of triangular patches is generated and stitched together at each cubic element to obtain an initial heart surface mesh M with physical consistency. s The cubic voxel is a cubic unit composed of 8 adjacent voxels.
[0019] Its technical advantages lie in: automatically selecting the connection method of triangular facets within voxels using fiber-gradient consistency coefficients, avoiding holes and artifacts in conventional MC algorithms. Facets preferentially extend along the main fiber direction extracted by DTMRI, thus solidifying the electrical anisotropy information in the reconstructed surface. High-quality surface meshes are generated one-click from CT / MRI voxels and diffusion tensors without manual intervention or post-processing, significantly improving efficiency and robustness.
[0020] In a preferred embodiment of the present invention, the method for obtaining the three-dimensional CT / MRI voxel data of the heart in the above-mentioned automated mesh generation and optimization method for the cardiac three-dimensional electrical conduction model includes:
[0021] By transferring the nnU-net model, a HU-net deep learning model for cardiac 3D reconstruction is constructed.
[0022] The initial cardiac chamber structure is obtained by reconstructing from cardiac CT / MRI images using the HU-net cardiac 3D reconstruction deep learning model.
[0023] The HU-net deep learning model for cardiac 3D reconstruction is trained based on the initial cardiac cavity structure to obtain the 3D anatomical structure of the cardiac cavity.
[0024] Three-dimensional CT / MRI voxel data of the heart were obtained from the three-dimensional anatomical structure of the heart chamber.
[0025] In a preferred embodiment of the present invention, in the above-described automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart, the step of generating and optimizing the mesh based on the consistency coefficient field C... g The size and selection of triangular facet connection methods include:
[0026] Set the volume element threshold τ g .
[0027] If C g >τ g Then, a connection aligned with the fiber direction is used.
[0028] If C g ≤τ g Then, use the standard template connection.
[0029] In a preferred embodiment of the present invention, in the above-described automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model, the step of calculating the electrical activity curvature and dividing the initial cardiac surface mesh into sub-regions based on the electrical activity curvature to generate a hybrid mesh M... h include:
[0030] According to the initial cardiac surface grid M s Estimate the electric potential field φ(x,y,z).
[0031] The electric activity curvature is calculated using the Laplace operator for the electric potential field φ(x,y,z). Among them, κ e (p) represents the initial cardiac surface grid M s The curvature of electric activity at point p on the surface, For the Laplace operator.
[0032] Set curvature threshold κ th For the initial cardiac surface mesh M s The center point of each facet on the surface, if κ e (q)<κ th Then the facet is marked as a hexahedral priority region R. hex Otherwise, it is marked as a tetrahedral preference region R. tet .
[0033] In the hexahedral priority region R respectively hex and the tetrahedral priority region R tet Generate the corresponding volume units, maintaining consistency with the initial cardiac surface mesh M. s Rigid docking yields a hexahedral element set E. hex and tetrahedral unit set E tet .
[0034] In the hexahedral unit set E hex and the tetrahedral unit set E tet At the boundary, an intermediate bonding surface is generated, and the hexahedral unit set E is formed. hex The boundary nodes are projected onto the tetrahedral unit set E through the intermediate mating surface. tet At the corresponding positions, generate the stitched hybrid mesh M. h ={E hex}∪{E tet}
[0035] Its technical advantages lie in: retaining the efficient solution advantage of hexahedral regions for smooth electric fields, while employing tetrahedral partitioning in areas with drastic electric field changes or complex structures, and ensuring the potential continuity of each interval through the Mortar method. The hybrid mesh M... hThis will serve as input for fiber sensing optimization, further improving alignment with fiber direction and overall quality.
[0036] In a preferred embodiment of the present invention, in the above-described automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart, the step of generating and optimizing the mesh in the hexahedral priority region R... hex and the tetrahedral priority region R tet Generating the corresponding volume units includes:
[0037] Using the advancing wavefront method, from the hexahedral priority region R hex The boundary triangular facets are sequentially advanced inward, inserting regular hexahedral elements. During advancement, the element size is dynamically adjusted to match the facet resolution, resulting in a hexahedral element set E. hex .
[0038] The constraint boundary method is used to define the tetrahedral priority region R. tet The corresponding surface boundary is subjected to Delaunay 3D subdivision to obtain tetrahedral element set E. tet .
[0039] In a preferred embodiment of the present invention, the automated mesh generation and optimization method for the above-mentioned three-dimensional cardiac electrical conduction model, wherein the step of evaluating fiber mesh alignment based on a continuous fiber field and obtaining an optimized standard body mesh M′ through multi-objective optimization includes:
[0040] For the hybrid mesh M h For each cell e in the array, take all edges of the cell and calculate the unit direction vector for each edge. At the unit center point c e Obtain the corresponding fiber orientation Calculate the alignment contribution of the unit. Where, n e Let e be the number of sides of cell e. Let q be the unit direction vector of the i-th edge, · be the vector dot product, and q be the vector direction vector. f (e)∈[0,1], the larger the value, the more aligned the unit edge is with the fiber direction.
[0041] The alignment contribution q of all units f (e) Average to obtain global fiber alignment. Where, N e For the hybrid mesh M h The number of units in the array.
[0042] Constructing a multi-objective optimization function The preliminary optimized mesh M′ is obtained by solving, where J(M′) is the comprehensive index to be minimized. For geometric mass, This is the loss term for fiber alignment. α is the complexity term, and β and γ are weighting terms.
[0043] The technical effect is as follows: Iterative optimization of node positions and cell topology is performed using methods such as improved gradient descent or Pareto front-based genetic algorithms. For the gradient of J(M′), the coordinates of inner nodes are fine-tuned to improve quality and alignment. Attempts are made to flip or redraw cell edges and faces to reduce J(M′). The process stops when J(M′) converges to a predefined threshold or reaches the maximum number of iterations. This results in a preliminary optimized mesh M′ with adjusted nodes and topology and a significant decrease in overall J(M′).
[0044] In a preferred embodiment of the present invention, in the above-mentioned automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart, the step of calculating the local error field, marking high error regions based on the local error field, and refining the local mesh of the high error regions to obtain the error-optimized mesh M″ includes:
[0045] Perform electrical conduction simulations on the optimized standard body mesh M′ to obtain the potential solution φ. sim (x,y,z).
[0046] According to the potential solution φ sim (x,y,z), at the center point p' of each element e' in the optimized standard body mesh M', calculate the local error field ke(p')=|φ sim (p′)-φ ref (p′)|,(p′)≥0, where φ sim (p′) represents the potential value at point p′ in the fast simulation, φ ref (p′) represents the electric potential of the reference solution at point p′.
[0047] Set error threshold For each element e′ in the optimized standard body mesh M′, the local error field is compared at the center point p′. and error threshold like Then the corresponding element e′ is marked as a high-error region. Then, keep the corresponding unit e′ in its original state, and form the marked units e′ into a high-error unit set E. refine .
[0048] For each labeled unit e∈E refine Select first-order neighbors to form an extended set E ext For the extended set E ext The tetrahedral units in the set E undergo a 1→4 split, for the extended set E ext The hexahedral unit in the middle is divided into eight smaller hexahedrons or converted into five tetrahedrons and then refined.
[0049] Update the topology between the refined region and the surrounding unrefined region, insert additional triangular facets to add nodes, perform Laplacian smoothing on the added nodes, and re-align the fiber orientation field. Projecting the newly added node's position yields the error-optimized grid M″.
[0050] Its technical advantages are as follows: guided by the simulation error field, the mesh is refined only in high-error regions and their neighborhoods, effectively reducing numerical errors in key areas, avoiding the explosive increase in elements caused by global refinement, significantly reducing computational overhead, and maintaining a controllable global mesh size. After refinement, topological stitching and Laplacian smoothing are used to ensure the geometric quality of newly added elements, and the fiber orientation is reprojected in real time to maintain overall fiber alignment.
[0051] In a preferred embodiment of the present invention, in the above-described automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart, the real-time monitoring of mesh quality and alignment indicators, if the mesh quality or alignment is found to be below a preset threshold, performs local recalibration to obtain a locally recalibrated mesh M. u include:
[0052] Calculate the global geometric mass ratio Where, N e Q represents the total number of grid cells. r (e) represents the radius-to-side-length ratio of element e, where Q is the radius-to-side-length ratio. r (e) The closer to the ideal value This indicates better geometric quality.
[0053] Calculate global fiber alignment Where is the local alignment degree of unit e.
[0054] After every K simulation time steps, the global geometric mass ratio Q is recalculated. r and the global fiber alignment Q f .
[0055] Set the upper limit of the mass ratio Q r,max Alignment lower limit Q f,min For all elements e, find the element that satisfies Q. r (e)>Q r,max Or Q f (e) < Q f,min Failure Element Set E fail The set of failure units E fail Extending the neighborhood to first-order adjacent cells forms a local failure region E. corr .
[0056] For the local failure region E corrThen, perform multi-objective optimization again. For cells that still fail to meet the criteria after multi-objective optimization, refine the local mesh again.
[0057] The updated local recalibrated mesh M is obtained u .
[0058] Its technical effect lies in ensuring that the mesh always meets the preset geometric quality and fiber alignment requirements through online monitoring and automatic triggering of local or global recalibration. The locally recalibrated mesh M... u It can be directly used for multi-cycle simulations of arbitrary length to achieve high stability and high precision in cardiac electrical conduction simulation.
[0059] An automated mesh generation and optimization system for a three-dimensional cardiac electrical conduction model, comprising:
[0060] The initial mesh generation module is used to generate a physically consistent initial cardiac surface mesh M based on cardiac 3D CT / MRI voxel data and fiber orientation information extracted from the diffusion tensor field. s .
[0061] The region partitioning module is used to calculate the electrical activity curvature and, based on the electrical activity curvature, partition the initial cardiac surface mesh M. s Divide into sub-regions and generate hybrid mesh M h .
[0062] The multi-objective optimization module is used to evaluate the alignment of fiber meshes based on a continuous fiber field. Through multi-objective optimization, the optimized standard body mesh M′ is obtained.
[0063] The local mesh refinement module is used to calculate the local error field, mark high error regions based on the local error field, and refine the local mesh of the high error regions to obtain the error-optimized mesh M″.
[0064] The local recalibration module is used to monitor mesh quality and alignment indices in real time. If the mesh quality or alignment is found to be below a preset threshold, local recalibration is performed to obtain the locally recalibrated mesh M. u .
[0065] The beneficial effects of the embodiments of the present invention are:
[0066] This invention combines the principal fiber orientation extracted from the DTMRI diffusion tensor with CT / MRI gradient information for ambiguity elimination in the MarchingCubes algorithm, selecting a triangular facet connection method at the voxel level that better conforms to the orientation of myocardial fibers. This avoids the holes and pseudo-facets that easily occur in the traditional MC algorithm, resulting in a geometrically smoother and physically consistent initial surface mesh. The reconstructed surface preferentially extends along the fiber direction, providing a natural advantage for the subsequent electrical conduction simulation along the fiber propagation in the voxel mesh. No manual intervention or complex post-processing is required; the entire surface reconstruction process is entirely driven by thresholds and consistency coefficients.
[0067] This invention automatically divides the surface mesh into smooth and complex regions based on the electric activity curvature calculated using the potential Laplacian operator. These regions are subdivided using regular hexahedrons and Delaunay tetrahedrons, respectively, and the interfaces are stitched together using the Mortar method. Hexahedrons are used in smooth electric field regions to ensure solution efficiency, while tetrahedrons are used in complex regions to ensure geometric fit; the advantages of both methods are complementary. Mortar projection ensures potential continuity at the interfaces of different element types, eliminating interface flickering errors. Regions with drastic electric field changes are automatically subdivided, ensuring local accuracy while avoiding computational waste caused by excessive global refinement.
[0068] This invention introduces a fiber mesh alignment index and a traditional geometric quality index to construct a multi-objective optimization function. Combined with gradient descent or Pareto-based genetic algorithms, it maximizes fiber alignment while preserving mesh quality. Furthermore, a machine learning model is used to intelligently fold or subdivide and repair substandard cells. This approach balances geometric quality and fiber alignment, ensuring that bulk elements neither degenerate nor deviate from the fiber orientation. Machine learning-assisted substandard cell repair operates only at necessary locations, avoiding global recalculation and significantly reducing optimization overhead. The optimized mesh can more accurately reproduce the dynamic characteristics of electromagnetic wave propagation along fibers in electrical conduction simulations.
[0069] This invention generates an error field by comparing a rapid simulation with a high-precision reference solution, and performs targeted refinement, topological stitching, and smoothing only on regions where the error exceeds the threshold and their neighborhoods. By locally refining the mesh in high-error regions, the numerical error in those regions is effectively reduced, improving simulation reliability. Only necessary regions are refined, avoiding the exponential increase in cells caused by global refinement. Neighborhood expansion and smoothing operations ensure a natural transition between old and new meshes, without abrupt deformation changes.
[0070] In long-duration or multi-period simulations, this invention monitors the global quality ratio and alignment in real time. When the indicators exceed a threshold, it automatically triggers local or full mesh re-optimization and performs a complete recalibration at set intervals. Regardless of the simulation duration, the mesh always maintains the preset quality and alignment standards. The online monitoring and self-calibration mechanism enables the mesh to adapt to various boundary conditions and long-term simulations. No manual inspection, interruption, or intervention is required, significantly improving the reliability and efficiency of the overall simulation process. Attached Figure Description
[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 This is a flowchart of the automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart according to the present invention;
[0073] Figure 2 This is a schematic diagram of the HU-net network structure in the automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart of the present invention. Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0075] Please refer to Figures 1 to 2 The first embodiment of the present invention provides an automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model, comprising: generating an initial cardiac surface mesh M with physical consistency based on three-dimensional cardiac CT / MRI voxel data and fiber orientation information extracted from a diffusion tensor field. s ; Calculate the electrical activity curvature, and based on the electrical activity curvature, adjust the initial cardiac surface mesh M s Divide into sub-regions and generate hybrid mesh M h The fiber mesh alignment is evaluated based on a continuous fiber field. Through multi-objective optimization, an optimized standard body mesh M′ is obtained. A local error field is calculated, and high-error regions are marked according to this field. Local mesh refinement is then performed on these high-error regions to obtain an error-optimized mesh M″. Mesh quality and alignment indices are monitored in real time. If the mesh quality or alignment is found to be below a preset threshold, local recalibration is performed to obtain a locally recalibrated mesh M. u .
[0076] Specifically, the initial cardiac surface mesh M with physical consistency is generated based on the three-dimensional CT / MRI voxel data of the heart and the fiber orientation information extracted from the diffusion tensor field. sThis includes: acquiring 3D CT / MRI voxel data of the heart, and calculating the fiber orientation field of each voxel from the diffusion tensor field D(x,y,z) for each voxel location (x,y,z). in, Let be a test vector of length 1, ‖‖·‖‖ be the Euclidean norm, and T be the three-dimensional diffusion tensor for each voxel; calculate the consistency coefficient field used to evaluate the local consistency of grayscale changes and fiber orientation in CT / MRI images. C g ∈[-1,1], where · is the vector dot product. For each voxel, the CT / MRI grayscale gradient, C g The closer the value is to 1, the more parallel the grayscale variation surface is to the fiber direction; according to the consistency coefficient field C... g The size is determined, and a triangular patch connection method is selected. A set of triangular patches is generated and stitched together at each cubic element to obtain an initial heart surface mesh M with physical consistency. s The cubic voxel is a cubic unit composed of 8 adjacent voxels.
[0077] Its technical advantages lie in: automatically selecting the connection method of triangular facets within voxels using fiber-gradient consistency coefficients, avoiding holes and artifacts in conventional MC algorithms. Facets preferentially extend along the main fiber direction extracted by DTMRI, thus solidifying the electrical anisotropy information in the reconstructed surface. High-quality surface meshes are generated one-click from CT / MRI voxels and diffusion tensors without manual intervention or post-processing, significantly improving efficiency and robustness.
[0078] like Figure 2 As shown, the method for obtaining the cardiac three-dimensional CT / MRI voxel data includes: constructing a HU-net (Hybrid U-net) cardiac three-dimensional reconstruction deep learning model by transferring the nnU-net (No novel U-net) model; reconstructing the initial cardiac chamber structure from cardiac CT / MRI images using the HU-net cardiac three-dimensional reconstruction deep learning model; training the HU-net cardiac three-dimensional reconstruction deep learning model based on the initial cardiac chamber structure to obtain the cardiac chamber three-dimensional anatomical structure; and obtaining cardiac three-dimensional CT / MRI voxel data from the cardiac chamber three-dimensional anatomical structure.
[0079] Specifically, by transferring the nnU-net model, a novel deep learning model for cardiac 3D reconstruction, named HU-net, was constructed to automatically and rapidly reconstruct the cardiac chamber structure from cardiac CT / MRI images. A schematic diagram of the HU-net structure is shown below. Figure 2As shown, HU-net further refines the initial reconstruction results of nnU-net, resulting in more detailed target boundaries and accurate segmentation. During HU-net training, the nnU-net network was first pre-trained using the Totalsegmentator public dataset. Then, the pre-trained nnU-net was retrained on 500 private cardiac CT / MRI images, which served as the gold standard. Finally, the fully trained HU-net can quickly reconstruct the three-dimensional anatomical structure of the heart chambers from cardiac CT / MRI images.
[0080] Wherein, according to the consistency coefficient field C g The size and selection of triangular patch connection methods include: setting the volume element threshold τ. g If C g >τ g Then a connection aligned with the fiber direction is used; if C g ≤τ g Then, use the standard template connection.
[0081] Specifically, the calculation of electrical activity curvature involves dividing the initial cardiac surface mesh into sub-regions based on the electrical activity curvature to generate a hybrid mesh M. h Includes: based on the initial cardiac surface grid M s Estimate the electric potential field φ(x,y,z); for the electric potential field φ(x,y,z), calculate the electric activity curvature using the Laplace operator. Among them, κ e (p) represents the initial cardiac surface grid M s The curvature of electric activity at point p on the surface, For the Laplacian operator; set the curvature threshold κ. th For the initial cardiac surface mesh M s The center point of each facet on the surface, if κ e (q)<κ th Then the facet is marked as a hexahedral priority region R. hex Otherwise, it is marked as a tetrahedral preference region R. tet ; respectively in the hexahedral priority region R hex and the tetrahedral priority region R tet Generate the corresponding volume units, maintaining consistency with the initial cardiac surface mesh M. s Rigid docking yields a hexahedral element set E. hex and tetrahedral unit set E tet ; in the hexahedral unit set E hex and the tetrahedral unit set E tet At the boundary, an intermediate bonding surface, namely the Mortar surface, is generated, which combines the hexahedral unit set E.hex The boundary nodes are projected onto the tetrahedral unit set E through the intermediate mating surface. tet At the corresponding positions, generate the stitched hybrid mesh M. h ={E hex}∪{E tet It has strict potential continuity at the regional interface.
[0082] Its technical advantages lie in: retaining the efficient solution advantage of hexahedral regions for smooth electric fields, while employing tetrahedral partitioning in areas with drastic electric field changes or complex structures, and ensuring the potential continuity of each interval through the Mortar method. The hybrid mesh M... h This will serve as input for fiber sensing optimization, further improving alignment with fiber direction and overall quality.
[0083] Wherein, respectively in the hexahedral priority region R hex and the tetrahedral priority region R tet Generating the corresponding volume elements includes: using the advancing wavefront method, from the hexahedral priority region R hex The boundary triangular facets are sequentially advanced inward, inserting regular hexahedral elements. During advancement, the element size is dynamically adjusted to match the facet resolution, resulting in a hexahedral element set E. hex The constraint boundary method is used to define the tetrahedral priority region R. tet The corresponding surface boundary is subjected to Delaunay 3D subdivision to obtain tetrahedral element set E. tet .
[0084] The step of evaluating fiber mesh alignment based on a continuous fiber field and obtaining an optimized standard volumetric mesh M′ through multi-objective optimization includes: evaluating the hybrid volumetric mesh M′. h For each cell e in the array, take all edges of the cell and calculate the unit direction vector for each edge. At the unit center point c e Obtain the corresponding fiber orientation Calculate the alignment contribution of the unit. Where, n e Let e be the number of sides of element e; for a tetrahedron, it is 6, and for a hexahedron, it is 12. Let q be the unit direction vector of the i-th edge, · be the vector dot product, and q be the vector direction vector. f (e)∈[0,1], the larger the value, the more aligned the element edge is with the fiber direction; contribute q to the alignment of all elements. f (e) Average to obtain global fiber alignment. Where, N e For the hybrid mesh M h The number of units in the array; constructing a multi-objective optimization function. The preliminary optimized mesh M′ is obtained by solving, where J(M′) is the comprehensive index to be minimized. This is the geometric mass term; the closer it is to 1, the better the mass. This is the loss term for fiber alignment. For complexity terms, a small number of units are encouraged, and α, β, and γ are weighted terms.
[0085] The technical effect is as follows: Iterative optimization of node positions and cell topology is performed using methods such as improved gradient descent or Pareto front-based genetic algorithms. For the gradient of J(M′), the coordinates of inner nodes are fine-tuned to improve quality and alignment. Attempts are made to flip or redraw cell edges and faces to reduce J(M′). The process stops when J(M′) converges to a predefined threshold or reaches the maximum number of iterations. This results in a preliminary optimized mesh M′ with adjusted nodes and topology and a significant decrease in overall J(M′).
[0086] The calculation of the local error field, which involves marking high-error regions based on the local error field and refining the local mesh in the high-error regions to obtain the error-optimized mesh M″, includes: performing electrical conduction simulation on the optimized standard body mesh M′ to obtain the potential solution φ. sim (x,y,z); according to the potential solution φ sim (x,y,z), calculate the local error field at the center point p' of each element e' in the optimized standard body mesh M'. (p′)≥0, a scalar field defined at the centers of all elements, used to locate high-error regions, where φ sim (p′) represents the potential value at point p′ in the fast simulation, φ ref (p′) represents the potential value of the reference solution at point p′; an error threshold is set. For each element e′ in the optimized standard body mesh M′, the local error field is compared at the center point p′. and error threshold like Then the corresponding element e′ is marked as a high-error region. Then, keep the corresponding unit e′ in its original state, and form the marked units e′ into a high-error unit set E. refine For each labeled unit e∈E refine Select first-order neighbor shared nodes or faces to form an extended set E ext To avoid abrupt changes between the old and new grids, for the extended set E ext The tetrahedral elements in the set are split from 1 to 4, with new nodes inserted at the center of each face and the sub-elements reconstructed. For the extended set E, extThe hexahedral elements are divided into eight smaller hexahedrons or converted into five tetrahedrons for further refinement; the topology between the refined region and the surrounding unrefined region is updated; additional triangular facets are inserted to add nodes to maintain the manifold; Laplacian smoothing is performed on the added nodes to improve the quality of local elements; and the fiber orientation field is re-aligned. Projecting onto the location of the newly added node yields an error-optimized mesh M″, which is a locally refined mesh with finer resolution in the high-error region while maintaining overall quality and fiber alignment.
[0087] Its technical advantages are as follows: guided by the simulation error field, the mesh is refined only in high-error regions and their neighborhoods, effectively reducing numerical errors in key areas, avoiding the explosive increase in elements caused by global refinement, significantly reducing computational overhead, and maintaining a controllable global mesh size. After refinement, topological stitching and Laplacian smoothing are used to ensure the geometric quality of newly added elements, and the fiber orientation is reprojected in real time to maintain overall fiber alignment.
[0088] Specifically, the real-time monitoring of mesh quality and alignment indicators involves performing local recalibration if the mesh quality or alignment is detected to be below a preset threshold, resulting in a locally recalibrated mesh M. u Includes: Calculating the global geometric mass ratio Where, N e Q represents the total number of grid cells. r (e) represents the radius-to-side-length ratio of element e, where Q is the radius-to-side-length ratio. r (e) The closer to the ideal value The better the geometric quality, the better; calculate the global fiber alignment. Where is the local alignment degree of element e; after every K simulation time steps, the global geometric mass ratio Q is recalculated. r and the global fiber alignment Q f K is set by the user or the system based on computing resources and accuracy requirements; Q sets the upper limit of the quality ratio. r,max Alignment lower limit Q f,min For all elements e, find the element that satisfies Q. r (e)>Q r,max Or Q f (e) < Q f,min Failure Element Set E fail The set of failure units E fail Extending the neighborhood to first-order adjacent cells forms a local failure region E. corr To avoid abrupt mesh changes after correction; for the local failure region E corr The multi-objective optimization is then performed again. For elements that still fail to meet the targets after multi-objective optimization, the local mesh is refined again, resulting in the updated local recalibrated mesh M.u .
[0089] Its technical effect lies in ensuring that the mesh always meets the preset geometric quality and fiber alignment requirements through online monitoring and automatic triggering of local or global recalibration. The locally recalibrated mesh M... u It can be directly used for multi-cycle simulations of arbitrary length to achieve high stability and high precision in cardiac electrical conduction simulation.
[0090] A second embodiment of the present invention provides an automated mesh generation and optimization system for a three-dimensional cardiac electrical conduction model, comprising: an initial mesh generation module, used to generate a physically consistent initial cardiac surface mesh M based on three-dimensional cardiac CT / MRI voxel data and fiber orientation information extracted from a diffusion tensor field. s The region partitioning module is used to calculate the electrical activity curvature and, based on the electrical activity curvature, partition the initial cardiac surface mesh M. s Divide into sub-regions and generate hybrid mesh M h The multi-objective optimization module is used to evaluate fiber mesh alignment based on a continuous fiber field, and obtains an optimized standard body mesh M′ through multi-objective optimization. The local mesh refinement module is used to calculate the local error field, mark high-error regions based on the local error field, and refine the local mesh in the high-error regions to obtain an error-optimized mesh M″. The local recalibration module is used to monitor mesh quality and alignment indices in real time. If the monitored mesh quality or alignment is below a preset threshold, local recalibration is performed to obtain a locally recalibrated mesh M. u .
[0091] The computer program product of the automated mesh generation and optimization method and apparatus for a three-dimensional electrical conduction model of the heart provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0092] Specifically, the storage medium can be a general-purpose storage medium, such as a portable disk or hard disk. When the computer program on the storage medium is run, it can execute the above-mentioned automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart. This solves the technical problems in traditional mesh generation and maintenance, such as ambiguity, insufficient fiber fusion, accuracy-efficiency contradiction, and long-term simulation quality degradation, and significantly improves the accuracy, stability and automation level of cardiac electrical conduction simulation.
[0093] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An automated mesh generation and optimization method for a three-dimensional electrical conduction model of the heart, characterized in that, include: Based on three-dimensional CT / MRI voxel data of the heart, and combined with fiber orientation information extracted from the diffusion tensor field, an initial cardiac surface mesh M with physical consistency is generated. s ; Calculate the electrical activity curvature, and then apply the initial cardiac surface mesh M based on the electrical activity curvature. s Divide into sub-regions and generate hybrid mesh M h ; The fiber mesh alignment is evaluated based on a continuous fiber field, and the optimized standard body mesh M′ is obtained through multi-objective optimization. Calculate the local error field, mark the high error region based on the local error field, refine the local mesh of the high error region to obtain the error optimization mesh M″; The mesh quality and alignment metrics are monitored in real time. If the mesh quality or alignment is found to be below a preset threshold, local recalibration is performed to obtain the locally recalibrated mesh M. u .
2. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 1, characterized in that, The initial cardiac surface mesh M with physical consistency is generated based on the cardiac 3D CT / MRI voxel data and the fiber orientation information extracted from the diffusion tensor field. s include: Acquire three-dimensional CT / MRI voxel data of the heart. For each voxel position (x, y, z), calculate the fiber orientation field of each voxel from the diffusion tensor field D(x, y, z). in, Let be a test vector of length 1, ‖‖·‖‖ be the Euclidean norm, and T be the three-dimensional diffusion tensor of each voxel; Calculate the consistency coefficient field used to evaluate the local consistency between grayscale changes and fiber orientation in CT / MRI images. Where · represents the vector dot product, For each voxel, the CT / MRI grayscale gradient, C g The closer it is to 1, the more parallel the grayscale variation surface is to the fiber direction; According to the consistency coefficient field C g The size of the triangle is determined, and the triangular patch connection method is selected. A set of generated triangular patches is then stitched together at each cubic element to obtain an initial heart surface mesh M with physical consistency. s The cubic voxel is a cubic unit composed of 8 adjacent voxels.
3. The automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart according to claim 2, characterized in that, The method for obtaining the cardiac three-dimensional CT / MRI voxel data includes: By transferring the nnU-net model, a HU-net deep learning model for cardiac 3D reconstruction is constructed. The initial cardiac chamber structure is obtained by reconstructing cardiac 3D reconstruction from cardiac CT / MRI images using the HU-net cardiac 3D reconstruction deep learning model. The HU-net deep learning model for cardiac 3D reconstruction is trained based on the initial cardiac cavity structure to obtain the 3D anatomical structure of the cardiac cavity; Three-dimensional CT / MRI voxel data of the heart were obtained from the three-dimensional anatomical structure of the heart chamber.
4. The automated mesh generation and optimization method for the three-dimensional electrical conduction model of the heart according to claim 2, characterized in that, The consistency coefficient field C g The size and selection of triangular facet connection methods include: Set the volume element threshold τ g ; If C g >τ g Then, a connection aligned with the fiber direction is used; If C g ≤τ g Then, a standard template connection is used.
5. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 1, characterized in that, The calculation of electrical activity curvature is used to divide the initial cardiac surface mesh into sub-regions based on the electrical activity curvature, generating a hybrid mesh M. h include: According to the initial cardiac surface grid M s Estimate the electric potential field φ(x,y,z); The electric activity curvature is calculated using the Laplace operator for the electric potential field φ(x,y,z). Among them, κ e (p) represents the initial cardiac surface grid M s The curvature of electric activity at point p on the surface, ▽ 2 For the Laplace operator; Set curvature threshold κ th For the initial cardiac surface mesh M s The center point of each facet on the surface, if κ e (q)<κ th Then the facet is marked as a hexahedral priority region R. hex Otherwise, it is marked as a tetrahedral preference region R. tet ; In the hexahedral priority region R respectively hex and the tetrahedral priority region R tet Generate the corresponding volume units, maintaining consistency with the initial cardiac surface mesh M. s Rigid docking yields a hexahedral element set E. hex and tetrahedral unit set E tet ; In the hexahedral unit set E hex and the tetrahedral unit set E tet At the junction, an intermediate bonding surface is generated, and the hexahedral unit set E is formed. hex The boundary nodes are projected onto the tetrahedral unit set E through the intermediate mating surface. tet At the corresponding positions, generate the stitched hybrid mesh M. h ={E hex }∪{E tet } 6. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 5, characterized in that, The respective hexahedral priority regions R hex and the tetrahedral priority region R tet Generating the corresponding volume units includes: Using the advancing wavefront method, from the hexahedral priority region R hex The boundary triangular facets are sequentially advanced inward, inserting regular hexahedral elements. During advancement, the element size is dynamically adjusted to match the facet resolution, resulting in a hexahedral element set E. hex ; The constraint boundary method is used to define the tetrahedral priority region R. tet The corresponding surface boundary is subjected to Delaunay 3D subdivision to obtain tetrahedral element set E. tet .
7. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 2, characterized in that, The fiber mesh alignment evaluation based on a continuous fiber field, and the resulting optimized standard volumetric mesh M′ through multi-objective optimization, includes: For the hybrid mesh M h For each cell e in the array, take all edges of the cell and calculate the unit direction vector for each edge. At the unit center point c e Obtain the corresponding fiber orientation Calculate the alignment contribution of the unit. Where, n e Let e be the number of sides of cell e. Let q be the unit direction vector of the i-th edge, · be the vector dot product, and q be the vector direction vector. f (e)∈[0,1], the larger the value, the more aligned the unit edge is with the fiber direction; The alignment contribution q of all units f (e) Average to obtain global fiber alignment. Where, N e For the hybrid mesh M h The number of units in; Constructing a multi-objective optimization function The preliminary optimized mesh M′ is obtained by solving, where J(M′) is the comprehensive index to be minimized. For geometric mass, This is the loss term for fiber alignment. α is the complexity term, and β and γ are weighting terms.
8. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 2, characterized in that, The calculation of the local error field, marking high-error regions based on the local error field, and refining the local mesh in the high-error regions to obtain the error-optimized mesh M″ includes: Perform electrical conduction simulations on the optimized standard body mesh M′ to obtain the potential solution φ. sim (x,y,z); According to the potential solution φ sim (x,y,z), calculate the local error field at the center point p' of each element e' in the optimized standard body mesh M'. Where, φ sim (p′) represents the potential value at point p′ in the fast simulation, φ ref (p′) represents the electric potential of the reference solution at point p′; Set error threshold th For each cell e′ in the optimized standard body mesh M′, the local error field ò(p′) and the error threshold ò are compared at the center point p′. th If ò(p′)>ò th Then the corresponding unit e′ is marked as a high error region if ò(p′)≤ò th Then, keep the corresponding unit e′ in its original state, and form the marked units e′ into a high-error unit set E. refine ; For each labeled unit e∈E refine Select first-order neighbors to form an extended set E ext For the extended set E ext The tetrahedral units in the set E undergo a 1→4 split, for the extended set E ext The hexahedral unit in the middle is divided into eight smaller hexahedrons or converted into five tetrahedrons and then refined; Update the topology between the refined region and the surrounding unrefined region, insert additional triangular facets to add nodes, perform Laplacian smoothing on the added nodes, and re-align the fiber orientation field. Projecting the newly added node's position yields the error-optimized grid M″.
9. The automated mesh generation and optimization method for a three-dimensional cardiac electrical conduction model according to claim 1, characterized in that, The real-time monitoring of grid quality and alignment indicators, if the detected grid quality or alignment is below a preset threshold, performs local recalibration to obtain a locally recalibrated grid M. u include: Calculate the global geometric mass ratio Where, N e Q represents the total number of grid cells. r (e) represents the radius-to-side-length ratio of element e, where Q is the radius-to-side-length ratio. r (e) The closer to the ideal value The better the geometric quality; Calculate global fiber alignment Where is the local alignment degree of unit e; After every K simulation time steps, the global geometric mass ratio Q is recalculated. r and the global fiber alignment Q f ; Set the upper limit of the mass ratio Q r,max Alignment lower limit Q f,min For all elements e, find the element that satisfies Q. r (e)>Q r,max Or Q f (e) < Q f,min Failure Element Set E fail The set of failure units E fail Extending the neighborhood to first-order adjacent cells forms a local failure region E. corr ; For the local failure region E corr Then, perform multi-objective optimization again. For cells that still fail to meet the criteria after multi-objective optimization, refine the local mesh again. The updated local recalibrated mesh M is obtained u .
10. An automated mesh generation and optimization system for a three-dimensional electrical conduction model of the heart, characterized in that, include: The initial mesh generation module is used to generate a physically consistent initial cardiac surface mesh M based on cardiac 3D CT / MRI voxel data and fiber orientation information extracted from the diffusion tensor field. s ; The region partitioning module is used to calculate the electrical activity curvature and, based on the electrical activity curvature, partition the initial cardiac surface mesh M. s Divide into sub-regions and generate hybrid mesh M h ; The multi-objective optimization module is used to evaluate the fiber mesh alignment based on a continuous fiber field. Through multi-objective optimization, the optimized standard body mesh M′ is obtained. The local mesh refinement module is used to calculate the local error field, mark high error regions based on the local error field, refine the local mesh of the high error regions, and obtain the error optimization mesh M″. The local recalibration module is used to monitor mesh quality and alignment indices in real time. If the mesh quality or alignment is found to be below a preset threshold, local recalibration is performed to obtain the locally recalibrated mesh M. u .