Method and system for constructing heart three-dimensional model in real time

Two-dimensional images are acquired through cardiac ultrasound, and the atrial and ventricular area images are generated by segmentation processing. Combined with three-dimensional reconstruction and motion simulation technology, physiological feature data are collected and multi-layer rendering is performed, which solves the problem of building a high-precision three-dimensional cardiac model in real time and improves the accuracy and visualization of the model.

CN120451388AInactive Publication Date: 2025-08-08JINING KESHUN BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510522289.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to build a high-precision three-dimensional cardiac model in real time in medical applications, and the high demand for computing resources and processing time, resulting in excessive rendering pressure and affecting the accuracy of the model.

Method used

The two-dimensional image set was acquired through cardiac ultrasound, and the image area segmentation was performed to generate atrial and ventricular area images, which were converted into voxel data sets. The internal structure was constructed using three-dimensional reconstruction technology, and the muscle movement status was analyzed in combination with the heart motion simulation formula, and the user's physiological characteristic data was collected for external structure construction, and multi-layer rendering was performed through the real-time flow rendering mechanism to generate a realistic three-dimensional heart model.

Benefits of technology

It realizes the rapid generation of high-precision 3D cardiac models in real-time operations, improves the accuracy of model construction and reduces rendering pressure, and provides detailed cardiac structure and functional analysis capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451388A_ABST
    Figure CN120451388A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent image modeling, in particular to a method and system for constructing a heart three-dimensional model in real time. The method comprises the following steps: acquiring a heart two-dimensional image set through cardiac ultrasound; performing image region segmentation processing on the heart two-dimensional image according to the heart composition structure to generate an atrium region image and a ventricle region image; performing high-dimensional conversion on the atrial region image and the ventricular region image to generate an atrial voxel data set and a ventricular voxel data set; performing internal structure three-dimensional construction on the atrium voxel data set and the ventricle voxel data set by using a three-dimensional reconstruction technology to generate an internal three-dimensional structure; performing image superposition on the heart two-dimensional image set to generate a heart two-dimensional superposed image set; according to the method, hierarchical model construction is carried out on the heart structure, and multi-layer rendering is carried out through a real-time flow direction rendering mechanism, so that real-time construction of the heart three-dimensional model is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent image modeling, and in particular to a method and system for constructing a three-dimensional heart model in real time. Background Art

[0002] With the development of technology, by constructing a three-dimensional model of the heart, doctors can perform detailed planning and simulation before performing complex cardiac surgery or interventional treatments. By observing and operating the three-dimensional model, doctors can better understand the complexity and individual differences of the heart structure, and thus formulate the best treatment strategy. Medical imaging technologies such as computed tomography (CT), magnetic resonance imaging (MRI), and echocardiography provide a way to obtain information on the structure and function of the heart. These imaging technologies can generate high-resolution image data, providing basic data for the construction of a three-dimensional model of the heart. However, obtaining high-quality and high-resolution cardiac images remains a challenge. In some cases, the patient's heart image may be interfered with by motion artifacts, artifacts, or noise, which will lead to inaccuracies in the three-dimensional model. At the same time, building a real-time three-dimensional heart model requires a lot of computing resources and processing time, especially in medical applications, where the demand for real-time performance is very high. Excessive pressure on the system rendering leads to a loss of overall rendering accuracy of the model. Summary of the Invention

[0003] Based on this, it is necessary to provide a method and system for constructing a three-dimensional heart model in real time to solve at least one of the above technical problems.

[0004] To achieve the above object, a method for constructing a three-dimensional heart model in real time is provided, the method comprising the following steps:

[0005] Step S1: Acquire a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image;

[0006] Step S2: performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; performing three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure;

[0007] Step S3: performing image overlap on the two-dimensional cardiac image set to generate a two-dimensional overlapped cardiac image set; performing image edge analysis on the two-dimensional overlapped cardiac image set using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image;

[0008] Step S4: Acquire user physiological characteristic data; determine the heart area change data based on the muscle contraction state image and the muscle relaxation state image; construct the external structure in three dimensions using the user physiological characteristic data and the heart area change data to generate an external three-dimensional structure; and generate a three-dimensional initial heart model by structurally combining the internal three-dimensional structure and the external three-dimensional structure.

[0009] Step S5: Performing initial 3D rendering on the initial 3D model of the heart using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart; performing secondary rendering on the 3D rendered model of the heart according to a preset shadow determination area to obtain a 3D rendered model of the heart.

[0010] The present invention can obtain a two-dimensional image sequence of the heart in real time through cardiac ultrasound, providing real-time data support for subsequent image processing and model construction. By segmenting the image region, the atrial and ventricular regions can be accurately segmented, which can better distinguish and analyze the different components and structures of the heart. Generating atrial region images and ventricular region images is a key step in generating a three-dimensional model of the heart. Through these region images, the atria and ventricles can be converted into geometric models, and a complete three-dimensional model of the heart can be further constructed; the atrial region images and ventricular region images are converted into voxel data sets, that is, the two-dimensional image information is converted into a three-dimensional voxel representation. Voxels are the distances in three-dimensional space. Scattered image elements contain information such as spatial position and grayscale value. Through high-dimensional transformation, the shape and internal structure of the atria and ventricles can be more comprehensively and accurately represented. Using 3D reconstruction technology, the internal structure of the atrial voxel dataset and the ventricular voxel dataset can be constructed in 3D, which includes restoring the geometric shape, spatial position and internal tissue structure of the atria and ventricles. Through 3D reconstruction, more specific heart shape information can be obtained and the internal anatomical structure of the heart can be revealed. Through the 3D construction of the internal structure, a 3D heart model with real anatomical features can be generated. This model can include important structures such as the heart's cavities and myocardium, and can provide more detailed After the morphological and structural information is generated and the internal three-dimensional structure is generated, the heart model can be visualized and analyzed. Through the visualization of the three-dimensional model, doctors and researchers can observe and analyze the structure and function of the heart more intuitively; overlapping the two-dimensional image set of the heart means aligning and superimposing multiple images. By overlapping the images, the displacement and distortion between the images can be eliminated, and the quality and accuracy of the images can be improved. The overlapped image set can better show the morphological and structural changes of the heart. The heart motion simulation formula can be used to perform image edge analysis on the two-dimensional overlapped image set of the heart. The heart motion simulation formula is a mathematical formula established according to the physiological movement law of the heart. The model can simulate the contraction and relaxation process of the heart. By performing edge analysis on the image, the muscle movement state of the heart at different times can be determined. The muscle contraction state image reflects the state of the heart muscle during the contraction process. By performing image edge analysis, the degree of contraction and the shape of the muscle during heart contraction can be determined. The muscle contraction state image can provide information about the heart's contraction function and the thickness of the heart wall. The muscle relaxation state image reflects the state of the heart muscle during the relaxation process. By performing image edge analysis, the degree of relaxation and the shape of the muscle during heart relaxation can be determined. The muscle relaxation state image can provide information about the heart's relaxation function and the thickness of the heart wall.By collecting the user's physiological characteristic data, such as height, weight, age and other information, we can understand the user's individual differences and physiological status, which is helpful for the construction of personalized heart models. Through muscle contraction state images and muscle relaxation state images, we can determine the area changes of the heart in different states. These data reflect the volume changes of the heart cavity during the contraction and relaxation of the heart, which can be used as important parameters for building a heart model. Using the user's physiological characteristic data and heart area change data, we can perform three-dimensional construction of the external structure, which includes generating an external surface model of the heart according to the morphological characteristics and volume changes of the heart. The three-dimensional construction of the external structure can provide the overall shape and external characteristics of the heart, laying the foundation for subsequent model construction; the real-time flow rendering mechanism is used to perform three-dimensional initial rendering of the three-dimensional initial model of the heart. A preliminary rendered model of the heart can be generated in real time. This rendering method can simulate the flow of light and the lighting effects on the surface of an object, making the heart surface present realistic light and shadow effects. Through real-time flow rendering, the generated preliminary rendered model of the heart can provide the heart's surface texture, color, and lighting effects, making the heart more realistic and three-dimensional during visualization. Based on the preset shadow determination area, the three-dimensional heart rendering model is re-rendered. This process can further adjust and optimize the shadow effects of the heart rendering model, making the contrast between the heart's outline, details, and shadows clearer and more accurate. Through the second rendering, the resulting three-dimensional heart rendering model has better shadow effects and presents a more realistic and lifelike heart appearance, which can enhance professionals' understanding and analysis of heart structure and function. Therefore, the present invention improves the accuracy of model construction and reduces rendering pressure by constructing a hierarchical model of the heart structure and performing multi-layer rendering through a real-time flow rendering mechanism.

[0011] The beneficial effect of the present invention is that by performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel data set and a ventricular voxel data set, and then using three-dimensional reconstruction technology to perform three-dimensional construction of the internal structure of these data sets to generate an internal three-dimensional structure, such comprehensive data processing provides a comprehensive presentation of the heart structure, and the two-dimensional image set of the heart is overlapped to generate a two-dimensional overlapped image set of the heart, and the overlapped image set is analyzed for image edges using a cardiac motion simulation formula to determine muscle motion state images, including muscle contraction state images and muscle relaxation state images. By analyzing the motion state of the heart, the function of the heart can be better understood and simulated, and the user's physiological characteristic data is obtained and the heart area change data is determined based on the muscle contraction state images and muscle relaxation state images. According to the user's physiological characteristic data and heart area change data, the external structure is constructed in three dimensions to generate an external three-dimensional structure. In this way, a heart model with personalized characteristics can be constructed according to the individual differences of the user. The initial three-dimensional model of the heart is initially rendered using the real-time flow rendering mechanism to generate a preliminary rendering model. Then, the rendering model is rendered again according to the preset shadow judgment area to obtain a more realistic and lifelike three-dimensional rendering model of the heart. Such rendering optimization makes the model present a better visual effect. The method can obtain cardiac ultrasound images in real time and quickly generate atrial region images and ventricular region images through image processing and segmentation technology. This enables the construction of the three-dimensional heart model to be carried out in real-time operation, providing doctors and researchers with fast heart modeling results. Therefore, the present invention improves the accuracy of model construction and reduces rendering pressure by constructing a hierarchical model of the heart structure and performing multi-layer rendering through the real-time flow rendering mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of the steps of a method for constructing a three-dimensional heart model in real time;

[0013] Figure 2 for Figure 1 Detailed implementation steps of step S3 in FIG.

[0014] Figure 3 for Figure 1 Detailed implementation steps of step S5;

[0015] Figure 4 for Figure 1 Detailed implementation steps of step S52 are shown in the flowchart;

[0016] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0017] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative work are within the scope of protection of the present invention.

[0018] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.

[0019] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.

[0020] To achieve this, please refer to Figures 1 to 4 A method for constructing a three-dimensional heart model in real time, the method comprising the following steps:

[0021] Step S1: Acquire a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image;

[0022] Step S2: performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; performing three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure;

[0023] Step S3: performing image overlap on the two-dimensional cardiac image set to generate a two-dimensional overlapped cardiac image set; performing image edge analysis on the two-dimensional overlapped cardiac image set using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image;

[0024] Step S4: Acquire user physiological characteristic data; determine the heart area change data based on the muscle contraction state image and the muscle relaxation state image; construct the external structure in three dimensions using the user physiological characteristic data and the heart area change data to generate an external three-dimensional structure; and generate a three-dimensional initial heart model by structurally combining the internal three-dimensional structure and the external three-dimensional structure.

[0025] Step S5: Performing initial 3D rendering on the initial 3D model of the heart using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart; performing secondary rendering on the 3D rendered model of the heart according to a preset shadow determination area to obtain a 3D rendered model of the heart.

[0026] The present invention can obtain a two-dimensional image sequence of the heart in real time through cardiac ultrasound, providing real-time data support for subsequent image processing and model construction. By segmenting the image region, the atrial and ventricular regions can be accurately segmented, which can better distinguish and analyze the different components and structures of the heart. Generating atrial region images and ventricular region images is a key step in generating a three-dimensional model of the heart. Through these region images, the atria and ventricles can be converted into geometric models, and a complete three-dimensional model of the heart can be further constructed; the atrial region images and ventricular region images are converted into voxel data sets, that is, the two-dimensional image information is converted into a three-dimensional voxel representation. Voxels are the distances in three-dimensional space. Scattered image elements contain information such as spatial position and grayscale value. Through high-dimensional transformation, the shape and internal structure of the atria and ventricles can be more comprehensively and accurately represented. Using 3D reconstruction technology, the internal structure of the atrial voxel dataset and the ventricular voxel dataset can be constructed in 3D, which includes restoring the geometric shape, spatial position and internal tissue structure of the atria and ventricles. Through 3D reconstruction, more specific heart shape information can be obtained and the internal anatomical structure of the heart can be revealed. Through the 3D construction of the internal structure, a 3D heart model with real anatomical features can be generated. This model can include important structures such as the heart's cavities and myocardium, and can provide more detailed After the morphological and structural information is generated and the internal three-dimensional structure is generated, the heart model can be visualized and analyzed. Through the visualization of the three-dimensional model, doctors and researchers can observe and analyze the structure and function of the heart more intuitively; overlapping the two-dimensional image set of the heart means aligning and superimposing multiple images. By overlapping the images, the displacement and distortion between the images can be eliminated, and the quality and accuracy of the images can be improved. The overlapped image set can better show the morphological and structural changes of the heart. The heart motion simulation formula can be used to perform image edge analysis on the two-dimensional overlapped image set of the heart. The heart motion simulation formula is a mathematical formula established according to the physiological movement law of the heart. The model can simulate the contraction and relaxation process of the heart. By performing edge analysis on the image, the muscle movement state of the heart at different times can be determined. The muscle contraction state image reflects the state of the heart muscle during the contraction process. By performing image edge analysis, the degree of contraction and the shape of the muscle during heart contraction can be determined. The muscle contraction state image can provide information about the heart's contraction function and the thickness of the heart wall. The muscle relaxation state image reflects the state of the heart muscle during the relaxation process. By performing image edge analysis, the degree of relaxation and the shape of the muscle during heart relaxation can be determined. The muscle relaxation state image can provide information about the heart's relaxation function and the thickness of the heart wall.By collecting the user's physiological characteristic data, such as height, weight, age and other information, we can understand the user's individual differences and physiological status, which is helpful for the construction of personalized heart models. Through muscle contraction state images and muscle relaxation state images, we can determine the area changes of the heart in different states. These data reflect the volume changes of the heart cavity during the contraction and relaxation of the heart, which can be used as important parameters for building a heart model. Using the user's physiological characteristic data and heart area change data, we can perform three-dimensional construction of the external structure, which includes generating an external surface model of the heart according to the morphological characteristics and volume changes of the heart. The three-dimensional construction of the external structure can provide the overall shape and external characteristics of the heart, laying the foundation for subsequent model construction; the real-time flow rendering mechanism is used to perform three-dimensional initial rendering of the three-dimensional initial model of the heart. A preliminary rendered model of the heart can be generated in real time. This rendering method can simulate the flow of light and the lighting effects on the surface of an object, making the heart surface present realistic light and shadow effects. Through real-time flow rendering, the generated preliminary rendered model of the heart can provide the heart's surface texture, color, and lighting effects, making the heart more realistic and three-dimensional during visualization. Based on the preset shadow determination area, the three-dimensional heart rendering model is re-rendered. This process can further adjust and optimize the shadow effects of the heart rendering model, making the contrast between the heart's outline, details, and shadows clearer and more accurate. Through the second rendering, the resulting three-dimensional heart rendering model has better shadow effects and presents a more realistic and lifelike heart appearance, which can enhance professionals' understanding and analysis of heart structure and function. Therefore, the present invention improves the accuracy of model construction and reduces rendering pressure by constructing a hierarchical model of the heart structure and performing multi-layer rendering through a real-time flow rendering mechanism.

[0027] In the embodiment of the present invention, reference Figure 1 The above is a schematic flow chart of the steps of a method for constructing a three-dimensional heart model in real time according to the present invention. In this example, the method for constructing a three-dimensional heart model in real time includes the following steps:

[0028] Step S1: Acquire a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image;

[0029] In an embodiment of the present invention, an ultrasound examination is performed on a patient using a cardiac ultrasound device, and a two-dimensional image set of the heart is obtained through the echo signal of the ultrasound. The ultrasound examination can provide the ability to observe the structure and function of the heart in real time. The image region segmentation processing is performed on the two-dimensional image set of the heart to extract the atrial and ventricular regions, wherein the image region segmentation steps are: preprocessing the two-dimensional heart image, including removing noise, enhancing contrast, etc.; using an edge detection algorithm, such as the Canny algorithm or the Sobel algorithm, to detect the boundaries of the atria and ventricles in the image; based on the boundary information, using methods such as region growing, watershed algorithm, threshold segmentation, etc., to segment the atrial and ventricular regions from the image, generating an atrial region image and a ventricular region image, thereby obtaining an atrial region image and a ventricular region image in the two-dimensional heart image.

[0030] Step S2: performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; performing three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure;

[0031] In an embodiment of the present invention, the atrial region image and the ventricular region image are converted into an atrial voxel dataset and a ventricular voxel dataset. The high-dimensional conversion here refers to converting a two-dimensional image into a three-dimensional data representation. Specifically, the spatial coordinate system of the heart can be determined, usually with the center of gravity of the heart or a specific structural point as the origin, and the direction of the coordinate axis is determined. The atrial region image and the ventricular region image are spatially sampled in the spatial coordinate system, and the pixel value of each sampling point is used as the voxel value of its corresponding position. According to the sampled coordinates and pixel values, the atrial region image and the ventricular region image are converted into an atrial voxel dataset and a ventricular voxel dataset. The voxel dataset is a three-dimensional array, in which each element represents a voxel in a three-dimensional space and contains position and intensity information. The three-dimensional reconstruction technology is used to construct the internal structure of the atrial voxel dataset and the ventricular voxel dataset in three dimensions to generate the internal three-dimensional structure. Specifically, the atrial voxel dataset and the ventricular voxel dataset can be interpolated to fill the missing voxels to obtain the complete internal structure. The three-dimensional reconstruction algorithm, such as voxelization, mesh reconstruction, surface reconstruction, etc., is used to convert the interpolated voxel dataset into an internal structure with a real three-dimensional shape. Through the three-dimensional reconstruction algorithm, the atrial voxel dataset and the ventricular voxel dataset are converted into an internal three-dimensional structure with a spatial position and shape, which can be used to observe the internal structure of the heart and analyze cardiac function.

[0032] Step S3: performing image overlap on the two-dimensional cardiac image set to generate a two-dimensional overlapped cardiac image set; performing image edge analysis on the two-dimensional overlapped cardiac image set using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image;

[0033] In an embodiment of the present invention, a two-dimensional cardiac overlapped image set is generated by performing image overlap on a two-dimensional cardiac image set. This step aims to align and superimpose multiple two-dimensional cardiac images to form an overall overlapped image. Specifically, the two-dimensional cardiac image set can be preprocessed, including operations such as image grayscale adjustment, noise removal, and edge enhancement, to improve the subsequent image overlap quality. An image registration algorithm, such as a method based on feature point matching or a method based on an image transformation model, is used to align the two-dimensional cardiac images so that they are aligned in space. The registered two-dimensional cardiac images are superimposed to generate a two-dimensional cardiac overlapped image set. Image superposition can be performed using methods such as weighted averaging or a hybrid mode. The heart motion simulation formula is used to perform image edge analysis on the two-dimensional overlapping image set of the heart, so as to determine the muscle motion state image. The motion state of the heart can be achieved by simulating the periodic contraction and relaxation process of the heart. Specifically, an appropriate heart motion simulation formula can be selected, such as a traditional heart motion model or a physical simulation-based method. These models are usually based on the anatomical structure and physiological characteristics of the heart, as well as known heart motion data, to simulate the contraction and relaxation process of the heart. The edge detection and analysis of the two-dimensional overlapping image set of the heart are performed to extract the change information of the heart boundary. The edge detection algorithm, such as the Canny algorithm or the Sobel algorithm, can be used to obtain the position information of the heart edge. According to the change information of the heart boundary, the muscle motion state image is determined, including the muscle contraction state image and the muscle relaxation state image. These images reflect the motion state of the heart at different time points and can be used to analyze the heart motion state.

[0034] Step S4: Acquire user physiological characteristic data; determine the heart area change data based on the muscle contraction state image and the muscle relaxation state image; construct the external structure in three dimensions using the user physiological characteristic data and the heart area change data to generate an external three-dimensional structure; and generate a three-dimensional initial heart model by structurally combining the internal three-dimensional structure and the external three-dimensional structure.

[0035] In an embodiment of the present invention, by collecting the user's physiological characteristic data, such as height, weight, age, etc., these data can be used to construct a personalized three-dimensional heart model to reflect the user's actual situation. Based on the muscle contraction state image and the muscle relaxation state image, the area change data of the heart during the contraction and relaxation process are determined through image processing and analysis. These data reflect the deformation of the heart and play an important role in the subsequent three-dimensional model construction. The user's physiological characteristic data and the heart area change data are used to construct the three-dimensional external structure. This step can use computer graphics and modeling technology to generate a three-dimensional structural model reflecting the external morphology of the heart according to the changes in the heart shape and the user's physiological characteristics. Surface Reconstruction algorithms, deformation models or image registration methods are used to construct the external geometric shape of the heart based on image data and physiological feature data, and obtain three-dimensional data of the internal structure, such as the heart's vascular network and cardiac cavity layout. This can be achieved through medical imaging technologies such as magnetic resonance imaging (MRI) or computed tomography (CT scan) to obtain anatomical information inside the heart. Using this data, three-dimensional construction of the internal structure is performed to generate a three-dimensional model reflecting the internal anatomy of the heart. The internal three-dimensional structure and the external three-dimensional structure are structurally combined to generate an initial three-dimensional model of the heart. Registration algorithms, model fusion or segmentation algorithms can be used to align and combine the internal and external structures to form a complete three-dimensional model of the heart.

[0036] Step S5: Performing initial 3D rendering on the initial 3D model of the heart using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart; performing secondary rendering on the 3D rendered model of the heart according to a preset shadow determination area to obtain a 3D rendered model of the heart.

[0037] In an embodiment of the present invention, a real-time flow rendering mechanism is utilized to perform a three-dimensional initial rendering of the heart model. This can be achieved by using computer graphics and rendering technology to convert the geometric shape and texture information of the model surface into a realistic image. The real-time flow rendering mechanism can calculate properties such as lighting, shadows, and materials in real time based on the parallel computing capabilities of the graphics processing unit (GPU) to produce high-quality rendering results. The three-dimensional rendered model of the heart is rendered twice based on a preset shadow determination area. The shadow determination area refers to the determination of which areas should be affected by shadows based on the lighting conditions and the geometric shape of the model surface during the rendering process. By adjusting the parameters and algorithms of the shadow determination area, the shape, intensity, and position of the shadows in the rendering results can be controlled to obtain a more realistic rendering effect. After the second rendering, a three-dimensional rendered model of the heart is obtained. The model has undergone preliminary rendering and shadow processing and has a more realistic appearance and lighting effect. It can be used in visualization, medical education, research and analysis, and other fields to help people understand and observe the structure and function of the heart.

[0038] Preferably, step S1 includes the following steps:

[0039] Step S11: using a cardiac ultrasound instrument to obtain an original cardiac ultrasound image;

[0040] Step S12: performing image boundary positioning on the original cardiac ultrasound image according to the Canny edge detection algorithm to generate a cardiac boundary image;

[0041] Step S13: performing color depth detection on the core area of the heart boundary image to generate color depth values of core pixels; performing color depth comparison on the core pixel values with adjacent pixels to obtain high color depth pixels and low color depth pixels;

[0042] Step S14: stacking high color depth pixels to generate high color depth pixel stacking points and removing low color depth pixels; performing region segmentation on the high color depth pixels using a threshold segmentation technique to generate an atrial image and a ventricular image;

[0043] Step S15: Filling holes in the atrial image and the ventricular image by applying morphology to generate an atrial filling image and a ventricular filling image; performing regional verification on the atrial filling image and the ventricular filling image based on the cardiac structure to generate an atrial regional image and a ventricular regional image.

[0044] The present invention uses a cardiac ultrasound instrument to obtain original cardiac ultrasound images, which provide information about cardiac structure and movement. The Canny edge detection algorithm is used to locate the boundaries of the original cardiac ultrasound images, which helps extract cardiac boundary information and provides accurate positioning for subsequent processing steps. The color depth of the core area of the cardiac boundary image is detected to obtain the color depth values of the core pixels, which reflect the density of the cardiac region or the intensity of specific tissues. High-color-depth pixels and low-color-depth pixels are obtained by comparing the color depths of the core pixels. High-color-depth pixels are stacked to generate high-color-depth pixel stacks, which helps highlight important features in the cardiac region. High-color-depth pixels are segmented using threshold segmentation technology to generate atrial and ventricular images. Morphological operations are used to fill holes in these images, eliminating holes and forming continuous regions. Regional verification of the atrial and ventricular filling images is performed based on cardiac structural verification, which helps ensure that the generated atrial and ventricular regional images accurately represent the cardiac tissue structure.

[0045] In an embodiment of the present invention, a doctor or technician uses a cardiac ultrasound instrument to transmit ultrasound waves to the patient's chest. The ultrasound waves pass through the skin and interact with the heart tissue. The ultrasound instrument receives the ultrasound signal reflected by the heart and converts it into an image form to form an original cardiac ultrasound image. The Canny edge detection algorithm is applied to the original cardiac ultrasound image to identify the boundary of the heart. The Canny algorithm finds the position of the edge by calculating the grayscale gradient between pixels in the image. Through this algorithm, a cardiac boundary image is generated, which shows the position of the cardiac boundary. For the cardiac boundary image, color depth detection of the core area is performed. Through this process, the color depth values of the core area pixels can be calculated. Then, the color depth values of these core pixels are compared with the color depths of their adjacent pixels to determine which pixels have high color depth and low color depth. First, the pixels with high color depth are stacked to merge them into high color depth pixel stacks, and the low color depth pixels are removed. Then, the high color depth pixels are segmented using a threshold segmentation technique to separate the atria and ventricles, generating atrial and ventricular images. Morphological operations are used to fill holes in the atrial and ventricular images to fill the holes in the images and form continuous regions. This helps to accurately represent the atrial and ventricular regions. Based on the composition structure of the heart, regional verification is performed on the atrial filled image and the ventricular filled image. By verifying the consistency of each region with the tissue structure of the heart, it can be ensured that the generated atrial region image and ventricular region image accurately represent the corresponding heart structure, thereby generating the atrial region image and the ventricular region image.

[0046] Preferably, step S2 includes the following steps:

[0047] Step S21: performing three-dimensional image stacking processing on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset;

[0048] Step S22: performing image registration on the atrial voxel dataset and the ventricular voxel dataset with a preset standard cardiac structure map, thereby generating a three-dimensional voxel dataset;

[0049] Step S23: using a bicubic interpolation method to perform low-resolution region filling on the three-dimensional voxel dataset to obtain three-dimensional filled voxel data;

[0050] Step S24: constructing a three-dimensional model of the three-dimensional filled voxel data according to the point cloud reconstruction method to generate a three-dimensional model of the interior of the heart; performing a model quality assessment on the three-dimensional model of the interior of the heart to obtain the internal three-dimensional structure.

[0051] The present invention converts atrial and ventricular regional images into three-dimensional voxel datasets. By stacking two-dimensional images in space, the position and attributes of each voxel in three-dimensional space are obtained. The atrial and ventricular voxel datasets are then registered with a preset standard cardiac structure map. Registration is a process of aligning different images or datasets. By comparing information such as image grayscale values or feature point positions, the voxel datasets of the atrial and ventricular regions are aligned with the standard structure. The three-dimensional voxel datasets are processed using a bicubic interpolation method to fill low-resolution areas. This allows the entire three-dimensional voxel dataset to have more uniform resolution and continuity, thereby more accurately representing the internal structure of the heart. The three-dimensional filled voxel data is converted into a three-dimensional model of the heart's interior using a point cloud reconstruction method. The point cloud reconstruction algorithm uses the boundary information of the voxel data to convert it into a point cloud model representing the surface of the object. The generated three-dimensional model can provide visualization and further analysis of the internal structure of the heart. The three-dimensional model is then verified and analyzed using a model quality assessment method to ensure the accuracy and reliability of the internal three-dimensional structure, thereby generating a three-dimensional cardiac model with an accurate internal structure.

[0052] In an embodiment of the present invention, regional image data of the atria and ventricles are collected, for example, by MRI or CT scanning, and the image data of the atria and ventricles are preprocessed, such as removing noise and enhancing contrast, and the images of the atria and ventricles are segmented. The regions of the atria and ventricles are extracted from the background using an image processing algorithm. The segmented regional images of the atria and ventricles are subjected to three-dimensional image stacking processing and combined into a three-dimensional data set to generate an atrial voxel data set and a ventricular voxel data set. The spatial information of the atria and ventricles is converted into the form of voxel data, and a preset standard cardiac structure image is prepared, including the anatomical structure and position information of the heart. The atrial voxel data set and the ventricular voxel data set are aligned with the standard cardiac structure image. Various image alignment algorithms can be used for alignment, such as methods based on feature point matching or image similarity measurement. The goal of the alignment operation is to align the voxel data sets of the atria and ventricles with the standard structure image so that they are spatially consistent, thereby generating a three-dimensional image. A three-dimensional voxel dataset is formed, the three-dimensional voxel dataset is observed and analyzed, and possible low-resolution areas are determined. The low-resolution areas are filled using the bicubic interpolation method, which is a commonly used interpolation method. Missing data is inferred by interpolation calculations between known data points. The purpose of filling is to obtain complete three-dimensional filled voxel data so that the subsequent three-dimensional model construction process can accurately express the internal structure of the heart. The three-dimensional filled voxel data is obtained, and a point cloud reconstruction algorithm is applied to the three-dimensional filled voxel data to construct a three-dimensional model. Point cloud reconstruction is a method of reconstructing a dense three-dimensional model from sparse sample points (here is voxel data). Using the point cloud reconstruction algorithm, a three-dimensional model of the inside of the heart is generated based on the filled voxel data. The model quality of the three-dimensional model of the inside of the heart is evaluated. Various measurement indicators and methods, such as surface smoothness, curvature analysis, geometric shape comparison, etc., can be used to evaluate the accuracy and precision of the model, thereby obtaining the internal three-dimensional structure.

[0053] Preferably, step S3 includes the following steps:

[0054] Step S31: continuously arranging the cardiac two-dimensional image set to obtain a two-dimensional continuous image set;

[0055] Step S32: performing time series marking on the two-dimensional continuous image set according to a preset time interval to generate an initial time series image and a terminal time series image;

[0056] Step S33: confirming the time series change of the two-dimensional image set according to the initial time series image and the terminal time series image to obtain a two-dimensional change image set; performing image overlap on the two-dimensional change image set based on the optical flow method to generate a two-dimensional overlapped image set of the heart;

[0057] Step S34: using a cardiac motion simulation formula to perform cardiac motion velocity screening on the set of two-dimensional cardiac coincidence images, thereby generating a first cardiac motion velocity and a second cardiac motion velocity;

[0058] Step S35: comparing the first heart speed and the second heart speed. When the first heart speed is greater than the second heart speed, marking the two-dimensional coincident heart image corresponding to the first heart speed as a muscle relaxation state image, and marking the two-dimensional coincident heart image corresponding to the second heart speed as a muscle contraction state image.

[0059] Step S36: When the second heart movement speed is greater than the first heart movement speed, the two-dimensional heart coincidence image corresponding to the second heart movement speed is marked as a muscle relaxation state image, and the two-dimensional heart coincidence image corresponding to the first heart movement speed is marked as a muscle contraction state image.

[0060] The present invention arranges the collected two-dimensional cardiac images in order to form a continuous image sequence, so as to capture the changes of the heart at different time points; according to the set time interval, the two-dimensional continuous image set is time-series marked, and by marking the start time and the end time, the image corresponding to each time point can be determined, and the initial time series image and the terminal time series image are generated; by comparing the initial time series image and the terminal time series image, the temporal changes in the two-dimensional image set are confirmed and extracted as a two-dimensional change image set, and then, the two-dimensional change image set is overlapped using the optical flow method, and multiple images are spatially aligned to generate a two-dimensional overlapped image set of the heart; the two-dimensional overlapped image set of the heart is analyzed and screened using a cardiac motion simulation formula to obtain the movement speed information of the heart, and according to the analysis results, a first cardiac movement speed and a second cardiac movement speed are generated; according to the comparison result of the first cardiac movement speed and the second cardiac movement speed, the myocardial state corresponding to the two-dimensional overlapped image of the heart is determined. If the first heart movement speed is greater than the second heart movement speed, the image is marked as a muscle relaxation state image, and the image corresponding to the second heart movement speed is marked as a muscle contraction state image. On the contrary, if the second heart movement speed is greater than the first heart movement speed, the image is marked as a muscle relaxation state image, and the image corresponding to the first heart movement speed is marked as a muscle contraction state image. The movement and changes of the heart at different time points can be analyzed and marked, providing a visual representation of the muscle relaxation and contraction states during cardiac movement, and also providing a valuable data basis for cardiac dynamics research.

[0061] As an example of the present invention, refer to Figure 2 As shown, in this example, step S3 includes:

[0062] Step S31: continuously arranging the cardiac two-dimensional image set to obtain a two-dimensional continuous image set;

[0063] In an embodiment of the present invention, the collected two-dimensional image set of the heart may contain multiple slices, each slice representing a cross-sectional image of the heart at a different position. Specifically, first, ensure that all two-dimensional images are in the same coordinate system. This can be achieved through image preprocessing steps, such as image registration operations. According to the scanning order when acquiring the image, the slice interval of the image and the positional relationship of each slice are determined. For example, if it is scanned gradually from beginning to end, the order of the slices should be arranged continuously from beginning to end. According to the order and positional relationship of the slices, the two-dimensional images are arranged in continuity. This can be achieved by sorting the images according to the slice position or by reallocating the image index. After arranging the images, connection operations are performed between the images to ensure that they are visually continuous. Image processing methods, such as interpolation technology, can be used to smoothly transition the pixels between adjacent images, thereby eliminating gaps or discontinuities between images. The final result is a two-dimensional continuous image set, in which the images are arranged in the order of continuous sections of the heart.

[0064] Step S32: performing time series marking on the two-dimensional continuous image set according to a preset time interval to generate an initial time series image and a terminal time series image;

[0065] In an embodiment of the present invention, the time interval of a cardiac image sequence is determined. The time interval represents the time interval between adjacent images and is typically measured in milliseconds or seconds. This time interval can be determined based on the frame rate or scanning speed when acquiring the images. The number of time series images to be marked is determined based on the time interval and the total number of images in the image set. The calculation formula is: total time = number of images × time interval. Based on the calculated total time, the initial time series image and the terminating time series image are marked. The initial time series image corresponds to the start time of the cardiac image sequence, and the terminating time series image corresponds to the end time of the cardiac image sequence. Based on the markings of the initial time series image and the terminating time series image, images within the corresponding time range are extracted from the two-dimensional continuous image set. This can be achieved by performing image selection and extraction operations based on timestamps or image indexes. The final result is the initial time series image and the terminating time series image, which represent the start and end images within the specified time interval in the cardiac image sequence. Such marking can be used for subsequent time series analysis and processing.

[0066] Step S33: confirming the time series change of the two-dimensional image set according to the initial time series image and the terminal time series image to obtain a two-dimensional change image set; performing image overlap on the two-dimensional change image set based on the optical flow method to generate a two-dimensional overlapped image set of the heart;

[0067] In an embodiment of the present invention, by using the initial time series image and the terminal time series image as input, each pair of adjacent images is compared to determine the temporal changes between them. Image processing techniques, such as difference image calculation, grayscale change calculation or feature extraction, can be used to detect changes. Based on the threshold value or feature judgment of the change, it is confirmed whether there is a significant temporal change. The confirmed two-dimensional change image is saved in a two-dimensional change image set to obtain a two-dimensional change image set. The two-dimensional change image set is used as input and the optical flow method is applied to each pair of adjacent images. The optical flow method is a method for calculating the pixel displacement between adjacent images and is used to capture the motion pattern in the image. The adjacent images are overlapped according to the displacement information estimated by the optical flow. An image registration algorithm, such as a method based on feature point matching, can be used to align the images. The overlapping images can be averaged, superimposed or otherwise processed as needed to obtain a two-dimensional coincident image of the heart. The two-dimensional coincident image of the heart is saved in the coincident image set to generate a two-dimensional coincident image set of the heart.

[0068] Step S34: using a cardiac motion simulation formula to perform cardiac motion velocity screening on the set of two-dimensional cardiac coincidence images, thereby generating a first cardiac motion velocity and a second cardiac motion velocity;

[0069] In an embodiment of the present invention, a two-dimensional overlapping image set of the heart is obtained, which should include a continuous frame sequence of cardiac motion, and a cardiac motion simulation formula is found and selected. The formula can be used to estimate the cardiac motion speed and determine the time scale and image scale of the cardiac motion. Each frame in the two-dimensional overlapping image set of the heart is processed, and the cardiac motion simulation formula is applied to estimate the heart motion speed in each frame. This may involve motion analysis of each pixel or specific area of the heart, and screening out the cardiac motion speed that meets the requirements based on the motion speed threshold or other screening conditions. This can be determined according to the specific needs of the application, such as only retaining image frames with motion speeds within a certain range, and saving the cardiac motion speeds that meet the requirements as the first cardiac motion speed and the second cardiac motion speed.

[0070] Step S35: comparing the first heart speed and the second heart speed. When the first heart speed is greater than the second heart speed, marking the two-dimensional coincident heart image corresponding to the first heart speed as a muscle relaxation state image, and marking the two-dimensional coincident heart image corresponding to the second heart speed as a muscle contraction state image.

[0071] In an embodiment of the present invention, a first cardiac motion velocity and a second cardiac motion velocity have been obtained, and these velocities may be calculated by a cardiac motion simulation formula. A complete two-dimensional cardiac coincident image set includes all cardiac motion frames. For each frame of the image, the corresponding first cardiac motion velocity and second cardiac motion velocity are obtained according to the position of the corresponding frame in the first cardiac motion velocity and second cardiac motion velocity sequence. The first cardiac motion velocity and the second cardiac motion velocity are compared. If the first cardiac motion velocity is greater than the second cardiac motion velocity, the frame is marked as a muscle relaxation state image; if the first cardiac motion velocity is less than or equal to the second cardiac motion velocity, the frame is marked as a muscle contraction state image. According to the marking result, the corresponding image is saved in the corresponding muscle relaxation state image set and muscle contraction state image set.

[0072] Step S36: When the second heart movement speed is greater than the first heart movement speed, the two-dimensional heart coincidence image corresponding to the second heart movement speed is marked as a muscle relaxation state image, and the two-dimensional heart coincidence image corresponding to the first heart movement speed is marked as a muscle contraction state image.

[0073] In an embodiment of the present invention, a first cardiac motion velocity and a second cardiac motion velocity have been obtained, and these velocities may be calculated by a cardiac motion simulation formula. A complete cardiac two-dimensional coincident image set is provided, including all cardiac motion frames. The entire cardiac two-dimensional coincident image set is traversed, and for each frame of the image, the corresponding first cardiac motion velocity and second cardiac motion velocity are obtained according to the position of the corresponding frame in the first cardiac motion velocity and second cardiac motion velocity sequence. The first cardiac motion velocity and the second cardiac motion velocity are compared. If the second cardiac motion velocity is greater than the first cardiac motion velocity, the frame is marked as a muscle relaxation state image; if the second cardiac motion velocity is less than or equal to the first cardiac motion velocity, the frame is marked as a muscle contraction state image. According to the marking result, the corresponding image is saved in the corresponding muscle relaxation state image set and muscle contraction state image set.

[0074] Preferably, the cardiac motion simulation formula in step S34 is as follows:

[0075]

[0076] Where F(t) represents the velocity of the heart at time t, t represents the heart movement time, t0 represents the start time of the heart movement, u(x,t) represents the displacement function of the heart at the spatial point x and the time point t, which describes the deformation and displacement of the heart during the movement, V(x,t) represents the function of the heart movement velocity, which describes the velocity distribution of the heart at the spatial point x and the time point t, L represents the length or range of the space, which specifies the area of heart movement simulation, and k represents the influence coefficient of adjusting time attenuation. It is represented as a second-order partial differential operator, which is used to describe the curvature or rate of change of a function in multidimensional space. ω is represented as the abnormal adjustment value for cardiac motion simulation.

[0077] The present invention constructs a cardiac motion simulation formula, in which the displacement function u(x,t) describes the deformation and displacement of the heart at the spatial point x and the time point t, which reflects the movement of various parts of the heart and models the morphology and structure of the heart. The velocity function V(x,t) describes the velocity distribution of the heart at the spatial point x and the time point t, which reflects the movement speed of different areas of the heart and is used to simulate the process of cardiac contraction and relaxation. The time attenuation influence coefficient k is adjusted to adjust the influence of time attenuation and control the trend of changes in cardiac motion speed. A larger k value will cause the cardiac motion speed to decay faster, while a smaller k value will cause the speed to decay slower. By adjusting the k value, changes in the speed and duration of cardiac motion can be simulated. This formula fully considers the cardiac motion time t, the starting time t0 of the cardiac motion, the displacement function u(x,t) of the heart at the spatial point x and the time point t, the cardiac motion speed function V(x,t), the length or range L of the space, the influence coefficient k for adjusting time attenuation, and the second-order partial differential operator. The cardiac motion simulation abnormal adjustment value ω forms a functional relationship based on the relationship between the displacement function of the heart at the spatial point x and the time point t and the above parameters:

[0078]

[0079] The time and space derivatives in the formula describe the acceleration and nonlinear characteristics of the heart during movement, which can better simulate the dynamic behavior of the heart. The dot product of the Laplace operator of the velocity function V(x, t) and the displacement function u(x, t) takes into account the influence of the velocity distribution on the displacement function, which increases the authenticity and accuracy of the simulation. ktBy gradually weakening the influence of the force function over time, the disappearance trend of cardiac motion can be simulated. The cardiac motion simulation anomaly adjustment value ω can be used to adjust the cardiac motion simulation results. This can be used to correct anomalies that occur during the simulation, such as correcting the difference between the model and actual observations or improving the model's stability. By adjusting the value of ω, the simulation results can be fine-tuned and optimized, more accurately generating the cardiac velocity value F(t) at time t. Parameters in the formula, such as the length or range of the space and the time decay influence coefficient, can be adjusted according to actual conditions to adapt to different cardiac motion simulation scenarios, improving the applicability and flexibility of the algorithm. By comprehensively considering the weight function, Euclidean distance, eigenvalue, and anomaly adjustment value, these parameters can be adjusted to achieve precise control and realism of cardiac motion simulation. By modeling the displacement function and velocity function, the morphology and motion characteristics of the heart can be better understood. Simultaneously, by adjusting the time decay influence coefficient and anomaly adjustment value, the simulation results can be further optimized to make them more consistent with actual conditions, improving the accuracy and reliability of the model.

[0080] Preferably, step S4 includes the following steps:

[0081] Step S41: Acquire user physiological characteristic data through a biosensor;

[0082] Step S42: extracting cardiac area features from the muscle contraction state image and the muscle relaxation state image to generate cardiac contraction state area and cardiac relaxation state area;

[0083] Step S43: Calculating the difference between the heart's systolic area and the heart's diastolic area to obtain heart area change data; using surface modeling technology to perform virtual modeling on the heart area change data and the user's physiological characteristic data to generate an external three-dimensional structure;

[0084] Step S44: Using the Cartesian space coordinate system, the external three-dimensional structure and the internal three-dimensional structure are structurally fused to generate an initial three-dimensional model of the heart.

[0085] The present invention uses biosensors to obtain physiological characteristic data that can provide real-time information about the user's heart movement, such as heart rate and electrocardiogram. These physiological characteristic data are crucial for the subsequent steps of establishing and analyzing the heart model and can provide quantitative reference data. By processing and analyzing the heart image, the area of the heart in the contraction and relaxation states is extracted. This heart area information can provide a quantitative description of the heart size and morphology, providing basic data for subsequent area change calculation and three-dimensional modeling. By calculating the area difference between the heart's contraction and relaxation states, the heart's area change data is obtained. These area change data are combined with the user's physiological characteristic data to create a virtual heart model using surface modeling technology. This external three-dimensional structure can provide a visual expression of heart movement and morphological changes, which helps to further analyze and understand the heart structure. Using the Cartesian space coordinate system, the external three-dimensional structure and the internal three-dimensional structure are fused. This structural fusion process can combine the virtual external three-dimensional structure with the actual internal structure to produce a more accurate and complete three-dimensional initial model of the heart.

[0086] In an embodiment of the present invention, by installing appropriate biosensor equipment, such as a heart rate monitor, an electrocardiograph, or other related equipment, the user is monitored through the biosensor to collect physiological characteristic data including heart rate, electrocardiogram, muscle activity, etc., and the user's physiological characteristic data is obtained. From the data collected by the biosensor, image data related to muscle contraction and muscle relaxation are extracted. These image data are preprocessed, including filtering, enhancement, and denoising operations to ensure image quality. Based on image processing technology, features of the heart region, such as the heart contour and area, are extracted to generate the heart contraction area and the heart relaxation area, and the heart region in the muscle contraction state and the muscle relaxation state are combined. The area difference is calculated to obtain the heart area change data. Combined with the user's physiological characteristic data, such as heart rate and age, virtual modeling is performed using surface modeling technology. During the virtual modeling process, the heart area change data is combined with the user's physiological characteristic data to generate an external three-dimensional structure to express the shape and movement changes of the heart. In the Cartesian space coordinate system, the external three-dimensional structure and the internal three-dimensional structure are structurally fused. Combined with the internal structure (such as the cardiovascular network) and the external structure (the structure generated by virtual modeling), the final three-dimensional heart model is generated through alignment and fusion operations. The final three-dimensional model can provide visualization and quantitative analysis of the heart's morphology, size, and movement characteristics.

[0087] Preferably, step S5 includes the following steps:

[0088] Step S51: setting rendering engine parameters for the initial three-dimensional heart model to generate rendering environment parameters, wherein the rendering environment parameters include light source environment, environment map, and rendering engine parameters;

[0089] Step S52: Rendering the initial three-dimensional heart model in real time according to the rendering environment parameters using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart;

[0090] Step S53: Calculating light source points of the preliminary rendered heart model according to the light source environment to generate rendering light source point data; calculating the coverage area of the preliminary rendered heart model using the environment map to obtain the model coverage area size; analyzing the shadow angle of the model coverage area size and the rendering light source point data using rendering engine parameters to obtain the model shadow area data;

[0091] Step S54: Compare the model shadow area data with the preset shadow determination area. When the model shadow area data is greater than or equal to the preset shadow determination area, perform secondary rendering of the shadow area of the preliminary heart rendering model to obtain a three-dimensional heart rendering model. When the model shadow area data is less than the preset shadow determination area, directly mark the preliminary heart rendering model as a three-dimensional heart rendering model.

[0092] The present invention sets the parameters of the rendering engine for the three-dimensional initial model of the heart, including the light source environment, the environment map and other rendering engine-related parameters, which will affect the subsequent rendering effect of the heart model; uses the real-time flow rendering mechanism to perform real-time rendering, and renders the three-dimensional initial model of the heart according to the rendering environment parameters set in step S51. Through real-time rendering, a preliminary rendering model of the heart is generated, which has basic color and texture; according to the light source environment set in step S51, the light source point data of the preliminary rendering model of the heart is calculated to determine the lighting effect of the model; at the same time, the environment map technology is used to calculate the coverage area of the preliminary rendering model to obtain the size of the shadow area of the model, and the coverage area and The light source point data is subjected to shadow angle analysis to obtain the shadow area data of the model; the obtained model shadow area data is compared with the preset shadow judgment area. If the model shadow area data is greater than or equal to the preset shadow judgment area, the shadow area of the preliminary rendered heart model is secondary rendered to further optimize and obtain the shadow effect of the heart model. If the model shadow area data is less than the preset shadow judgment area, the preliminary rendered model is deemed to require no further processing and is directly marked as a three-dimensional rendered heart model; by optimizing rendering parameters, processing lighting and shadow effects, etc., the quality and realism of the three-dimensional rendered heart model are improved, which can make the generated heart model more realistic and vivid, and provide a better foundation for further analysis and visualization.

[0093] As an example of the present invention, refer to Figure 3 As shown, in this example, step S5 includes:

[0094] Step S51: setting rendering engine parameters for the initial three-dimensional heart model to generate rendering environment parameters, wherein the rendering environment parameters include light source environment, environment map, and rendering engine parameters;

[0095] In the embodiment of the present invention, by selecting a suitable light source type, such as a parallel light source, a point light source, or a spotlight, according to the scene requirements, different light source types will produce different lighting effects. The position and direction of the light source are determined to determine the angle and intensity of the lighting, which is usually achieved by specifying the coordinates or direction vector of the light source. According to the scene requirements and the light source type, the color and intensity of the light source are adjusted to achieve the desired lighting effect. The environment map is a texture image that stores the scene environment information, which can provide the model with the background lighting and reflection information of the surrounding environment. According to the scene requirements, a suitable environment map is selected, such as a skybox map or an environment map map. According to the type of environment map and the requirements of the rendering engine, the environment map is adjusted. Map parameters, such as brightness, reflectivity, lighting intensity, etc. Different parameter settings will affect the realism of the final rendering results. Anti-aliasing is a technology used to smooth rendering results. According to the needs and the support of the rendering engine, select the appropriate anti-aliasing level, such as no anti-aliasing, multi-sampling anti-aliasing (MSAA) or super-sampling anti-aliasing (SSAA). According to the needs and the support of the rendering engine, adjust other graphics settings, such as shadow calculation method, reflection calculation method, light attenuation, etc. These settings will affect the visual effects and performance of the rendering results. According to the needs and the requirements of the rendering engine, adjust other rendering parameters, such as rendering resolution, rendering quality, rendering mode (real-time rendering or offline rendering), etc.

[0096] Step S52: Rendering the initial three-dimensional heart model in real time according to the rendering environment parameters using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart;

[0097] In the embodiment of the present invention, by selecting a rendering engine and rendering software that meets the requirements, such as Unity, UnrealEngine, etc., these tools provide real-time rendering functions and corresponding graphical interfaces, making the rendering process more convenient, importing the initial three-dimensional heart model into the selected rendering software, usually, it is necessary to load the model file (such as .obj, .fbx) into the project of the rendering software, and set the aforementioned rendering environment parameters in the rendering software, including the light source environment, environment map and rendering engine parameters. The specific setting method may vary depending on the selected rendering software. Set the type, position, direction, color and intensity of the light source according to the requirements to control the lighting effect of the heart model, select a suitable environment map, and adjust the environment map. Adjust its parameters to provide background lighting and reflection information of the scene, set the anti-aliasing level, shadow calculation method, reflection calculation method and other graphics settings of the rendering engine as needed, apply appropriate materials and textures to different parts of the heart model as needed, which can be achieved through the material editor or texture mapping tool provided by the rendering software, start the real-time rendering function in the rendering software, and observe the effect of the preliminary rendered model of the heart. If needed, you can adjust the rendering parameters, camera perspective, etc. to obtain the desired rendering results, view the preliminary rendered model and check it. If needed, you can further optimize the appearance and effect of the heart model by adjusting the rendering parameters, improving the lighting settings, adjusting the material properties, etc., to generate a preliminary rendered model of the heart.

[0098] Step S53: Calculating light source points of the preliminary rendered heart model according to the light source environment to generate rendering light source point data; calculating the coverage area of the preliminary rendered heart model using the environment map to obtain the model coverage area size; analyzing the shadow angle of the model coverage area size and the rendering light source point data using rendering engine parameters to obtain the model shadow area data;

[0099] In an embodiment of the present invention, by setting the position, direction, color, and intensity of the light source according to the light source environment parameters in the rendering software, these parameters can be adjusted through the light source setting panel or script. During the rendering process, the rendering engine calculates the lighting conditions of each pixel in the scene based on the properties of the light source and the camera angle of view. These calculations include the incident angle, attenuation, and shadows of the light source. The environment map (such as a spherical panoramic map) is used to calculate the coverage area of the preliminary rendered heart model. The environment map can provide lighting information from all directions in the scene. The rendering software uses the environment map to calculate whether the light of each pixel can directly reach the model surface. If it is blocked, the coverage area at the pixel is larger; if it is not blocked, the coverage area is smaller. The shadow information of the model can be obtained through the shadow settings and rendering engine parameters in the rendering software. The rendering engine calculates the shadow angle when the light passes through the model surface based on the light source point data and the size of the model coverage area. This angle can be used to determine the intensity and color of the shadow. Based on the results of the shadow angle analysis, the shadow area data of the model in different areas can be obtained. This data can be used for subsequent rendering effect adjustment and image processing.

[0100] Step S54: Compare the model shadow area data with the preset shadow determination area. When the model shadow area data is greater than or equal to the preset shadow determination area, perform secondary rendering of the shadow area of the preliminary heart rendering model to obtain a three-dimensional heart rendering model. When the model shadow area data is less than the preset shadow determination area, directly mark the preliminary heart rendering model as a three-dimensional heart rendering model.

[0101] In an embodiment of the present invention, a threshold value for shadow determination area is pre-set according to specific needs and design requirements. This threshold value can be adjusted according to the needs of the project to control the accuracy and precision of shadow rendering. Model shadow area data has been obtained. According to the rendering engine parameters and the results of the shadow angle analysis, this data represents the size of the area occupied by the model shadow. The model shadow area data is compared with the preset shadow determination area. If the model shadow area data is greater than or equal to the preset shadow determination area, it means that the shadow area of the preliminary rendered heart model needs to be secondary rendered. When secondary rendering of the shadow area is required, the relevant functions of the rendering software can be used or a custom script can be written to achieve it. According to the geometric information of the model and the shadow area data, the shadow of the preliminary rendered heart model is secondary rendered to increase the details and accuracy of the shadow. If the model shadow area data is smaller than the preset shadow determination area, there is no need to perform secondary rendering of the shadow area. The preliminary rendered heart model can be directly marked as a three-dimensional heart rendering model, and subsequent processing and application can be continued to obtain a three-dimensional heart rendering model.

[0102] Preferably, step S52 includes the following steps:

[0103] Step S521: dividing the initial three-dimensional heart model into rendering levels according to the rendering environment parameters to generate a model rendering level; placing parallel rendering nodes on the model rendering level using a multi-core CPU to generate parallel rendering nodes;

[0104] Step S522: capturing rendering signals from the parallel rendering nodes to obtain a first rendering signal; when the multi-core CPU receives the first rendering signal, performing model distance measurement on the three-dimensional initial heart model using an LOD control method to obtain a rendering model distance;

[0105] Step S523: Adjusting the rendering accuracy of details of the initial three-dimensional heart model according to the model rendering distance to generate a precision-adapted rendering model and a second rendering signal; when the multi-core CPU receives the second rendering signal, asynchronously rendering the precision-adapted rendering model is performed to generate a rendering CPU core process and a non-rendering CPU core process;

[0106] Step S524: Prioritize the rendering CPU core process and the non-rendering CPU core process, mark the non-rendering CPU core process as an idle process, and mark the rendering CPU core process as a busy process;

[0107] Step S525: Utilize the process frame rate control formula to control the frame rate of the busy process, thereby generating an idle process; perform multi-threaded rendering on the precision adaptive rendering model through the idle thread, thereby generating a preliminary rendering model of the heart.

[0108] The present invention divides the rendering level of the heart 3D initial model into different levels according to the rendering environment parameters, so that the subsequent rendering process is more efficient and flexible; the rendering level of the heart 3D initial model is divided into different levels according to the rendering environment parameters, so that the subsequent rendering process is more efficient and flexible; the rendering signal of the parallel rendering node is captured to obtain the first rendering signal, and the model distance of the heart 3D initial model is measured by the LOD control method, so that the rendering detail level can be adjusted according to the distance of the model in the scene, thereby improving the efficiency and rendering quality; the heart 3D initial model is divided into different levels according to the rendering environment parameters, so that the heart 3D initial model is divided into different levels, so that the subsequent rendering process is more efficient and flexible; the heart 3D initial model is divided into different levels according to the rendering environment parameters, so that the heart 3D initial model is divided into different levels Adjust the rendering accuracy of details, generate the accuracy-adaptive rendering model and the second rendering signal, and by adjusting the rendering details, reduce unnecessary computing overhead and improve rendering speed while ensuring rendering quality; generate rendering CPU core processes and non-rendering CPU core processes through asynchronous rendering of the accuracy-adaptive rendering model, and use idle threads to perform multi-threaded rendering of the model, which can further improve rendering efficiency and concurrent processing capabilities; control the frame rate of busy processes through the process frame rate control formula, generate idle processes, and prioritize rendering CPU core processes and non-rendering CPU core processes, which can better allocate computing resources and improve the overall performance and responsiveness of the system.

[0109] As an example of the present invention, refer to Figure 4 As shown, in this example, step S52 includes:

[0110] Step S521: dividing the initial three-dimensional heart model into rendering levels according to the rendering environment parameters to generate a model rendering level; placing parallel rendering nodes on the model rendering level using a multi-core CPU to generate parallel rendering nodes;

[0111] In an embodiment of the present invention, the heart model is divided into multiple objects according to different parts, such as the heart wall and blood vessels, and different rendering levels are defined for each object. The space of the heart model is divided into grids or voxels, and different rendering levels are defined for each grid or voxel. Based on the processing power of the multi-core CPU and the complexity of the rendering task, the following method can be used to place parallel rendering nodes: according to the workload and performance requirements of the rendering task, the rendering task is evenly distributed to multiple parallel rendering nodes to achieve load balancing; the rendering task is divided into multiple subtasks, and these subtasks are assigned to different parallel rendering nodes for processing. Based on the position and number of the placed parallel rendering nodes, nodes of the parallel rendering nodes can be generated. Each instance will play the role of a parallel rendering node and independently process a part of the rendering task.

[0112] Step S522: capturing rendering signals from the parallel rendering nodes to obtain a first rendering signal; when the multi-core CPU receives the first rendering signal, performing model distance measurement on the three-dimensional initial heart model using an LOD control method to obtain a rendering model distance;

[0113] In an embodiment of the present invention, it is necessary to capture rendering signals during the rendering process on each parallel rendering node. This can be achieved by inserting a signal capture step in the rendering pipeline. The specific implementation method may vary depending on the rendering engine and programming language used. A common method is to insert a signal capture instruction at an appropriate stage of the rendering pipeline to send the rendering signal to the CPU end. On a multi-core CPU, a signal receiving mechanism needs to be set up to receive the first rendering signal from the parallel rendering node. The specific implementation method may vary depending on the parallel computing framework used. A framework such as the Message Passing Interface (MPI) can be used to implement communication and signal reception between nodes. Once the multi-core CPU receives the first rendering signal, it can use LOD (Level The LOD control method measures the model distance of the three-dimensional initial model of the heart. LOD is a method for balancing performance and quality between detail models at different levels. The specific implementation methods may vary according to requirements and application scenarios. The following are the implementation methods: Constructing a hierarchy: According to the complexity and level of detail of the three-dimensional model, the model can be divided into multiple hierarchies, and each level contains a different level of detail; Model distance measurement: After receiving the first rendering signal, the LOD level to be used is determined by measuring the distance between the three-dimensional model of the heart and the camera or viewpoint. The farther part can be rendered using a model with a low level of detail, while the closer part can be rendered using a model with a high level of detail; Dynamically switching LOD levels: According to the measured model distance, different LOD levels are dynamically switched during the rendering process. This can be achieved by adding an LOD control step in the rendering pipeline. According to different rendering frameworks and programming languages, specific LOD control interfaces and functions can be used to implement this function to obtain the rendering model distance.

[0114] Step S523: Adjusting the rendering accuracy of details of the initial three-dimensional heart model according to the model rendering distance to generate a precision-adapted rendering model and a second rendering signal; when the multi-core CPU receives the second rendering signal, asynchronously rendering the precision-adapted rendering model is performed to generate a rendering CPU core process and a non-rendering CPU core process;

[0115] In an embodiment of the present invention, a suitable LOD level is selected according to the distance between the model and the camera, and a model with a lower detail level is used for a farther part, while a model with a higher detail level is used for a closer part, wherein the detail rendering accuracy adjustment includes selecting a suitable LOD level according to the distance between the model and the camera, and a model with a lower detail level is used for a farther part, while a model with a higher detail level is used for a closer part; using a model expression method with multiple resolution levels, and selecting an appropriate resolution level according to the rendering distance; generating a precision-adaptive rendering model and a second rendering signal by performing local detail deformation adjustment on the model to adapt to different viewing distance requirements; and generating a precision-adaptive rendering model and a second rendering signal based on the model after the detail rendering accuracy is adjusted. The specific implementation method may include the following steps: updating the rendering model to include appropriate detail information based on the adjusted level of detail, generating a second rendering signal to notify the multi-core CPU to start asynchronous rendering operations, asynchronous rendering: when the multi-core CPU receives the second rendering signal, asynchronous rendering can be implemented in the following ways: dividing the rendering task into multiple subtasks, each subtask can be assigned to a different CPU core for parallel rendering; using tools or libraries provided by a parallel computing framework or programming language to manage the parallel execution of rendering tasks, which may involve operations such as task scheduling, data synchronization and communication; responsible for performing actual rendering operations, including geometry processing, lighting calculation, texture mapping, etc., and responsible for other related tasks during the rendering process, such as data preprocessing, scene management, user interaction, etc., generating rendering CPU core processes and non-rendering CPU core processes.

[0116] Step S524: Prioritize the rendering CPU core process and the non-rendering CPU core process, mark the non-rendering CPU core process as an idle process, and mark the rendering CPU core process as a busy process;

[0117] In an embodiment of the present invention, by determining the number of CPU cores available in a computer system, which can be obtained by viewing the system configuration or using a specific system monitoring tool, the rendering CPU core process and the non-rendering CPU core process are prioritized. Generally, the rendering process requires a higher priority to ensure the smoothness and responsiveness of real-time rendering. Some CPU cores are selected as non-rendering cores and marked as idle processes, which means that these cores will be allocated to perform non-rendering tasks such as data preprocessing, scene management and user interaction. The idle process can be used to handle background tasks to improve the overall efficiency of the system. The remaining CPU cores are marked as busy processes and allocated to rendering operations. These busy processes will be responsible for performing rendering tasks such as geometry processing, lighting calculation and texture mapping. The process scheduling and management mechanism provided by the operating system is used to ensure correct process priority and core allocation, which may involve allocating rendering tasks to busy processes and allocating non-rendering tasks to idle processes.

[0118] Step S525: Utilize the process frame rate control formula to control the frame rate of the busy process, thereby generating an idle process; perform multi-threaded rendering on the precision adaptive rendering model through the idle thread, thereby generating a preliminary rendering model of the heart.

[0119] In an embodiment of the present invention, a suitable frame rate control formula is determined, which can be designed based on factors such as system performance, task priority, and required rendering quality. For example, the frame rate can be dynamically adjusted according to the current system load and task requirements. According to the set frame rate control formula, the busy process is subjected to frame rate control. This can be achieved by introducing a waiting time or delay operation in the busy process. The frame rate control can ensure that the rendering task of the busy process is processed according to the set frame rate to avoid excessive resource occupation. By executing the busy process with frame rate control, some idle time windows can be obtained. In these time windows, the relevant tasks can be marked as idle processes and assigned to idle cores or threads. The idle processes can be used to process other non-rendering tasks, such as updating the UI, processing input events, etc. The idle threads are used to perform multi-threaded rendering of the precision-adaptive rendering model. This can be achieved by decomposing the rendering task into multiple subtasks and executing them in parallel on the idle threads. Multi-threaded rendering can improve rendering efficiency, speed up rendering, and make full use of available system resources. By performing multi-threaded rendering, a preliminary rendering model of the heart can be generated. According to specific needs, appropriate rendering technology and algorithms can be selected to obtain the required rendering effect and accuracy.

[0120] Preferably, the process frame rate control formula in step S525 is as follows:

[0121]

[0122] Where Q(T) represents the frame rate of the busy process at time T, A represents the amplitude parameter that controls the peak height of the frame rate function, B represents the angular frequency parameter that controls the period of the frame rate function, C represents the initial phase parameter that controls the left and right offsets of the frame rate function, D represents the attenuation parameter that controls the attenuation speed of the frame rate function, E represents the attenuation speed of the frame rate change, F represents the period of the frame rate control, τ represents the number of available processes, and μ represents the correction amount for process frame rate control anomalies.

[0123] The present invention constructs a process frame rate control formula. The amplitude parameter A in the formula controls the peak height of the frame rate function. Increasing the amplitude can increase the peak frame rate, thereby improving the process frame rate. The angular frequency parameter B determines the period of the frame rate function. By adjusting the angular frequency, the fluctuation frequency of the frame rate function can be controlled, thereby affecting the frame rate change rate. The initial phase parameter C controls the left and right offsets of the frame rate function. By adjusting the initial phase, the starting position of the frame rate function can be changed, so that the frame rate exhibits different values at different time points. The decay parameter D affects the decay rate of the frame rate function over time. By increasing the decay parameter, the frame rate can be gradually reduced over time, simulating the decay or deceleration of the process. The decay rate parameter controls the change rate of the frame rate E. By adjusting the decay rate parameter, the frame rate can be adjusted quickly or slowly to meet the changing requirements of the process frame rate. The period parameter F affects the periodic variation of the frame rate. By adjusting the period parameter, the frame rate can exhibit periodic variations within a certain time range, such as acceleration or deceleration. The number of available processes τ affects the calculation of the frame rate. A higher number of processes generally means more computing resources are available, which may result in a higher frame rate. This formula fully considers the amplitude parameter A, angular frequency parameter B, initial phase parameter C, attenuation parameter D, attenuation speed E for controlling frame rate changes, period F for controlling frame rate, number of available processes τ, and correction value μ for process frame rate control anomalies. A functional relationship is formed based on the relationship between the amplitude parameter and the above parameters:

[0124]

[0125] This formula can achieve dynamic adjustment of the frame rate by changing parameters such as amplitude, angular frequency, and initial phase to adapt to different application scenarios and needs. The attenuation parameter and attenuation speed parameter can be used to simulate the gradual deceleration or attenuation of the process during operation, thereby more realistically simulating the actual process behavior. The period parameter can make the frame rate show periodic changes within a certain time range, such as acceleration or deceleration, to meet specific application needs. The process frame rate control abnormality correction amount μ can be used to make additional corrections to the frame rate to deal with possible abnormal situations, ensuring that the frame rate of the process remains stable under unexpected circumstances, and more accurately generating the frame rate Q(T) of the busy process at time T. At the same time, parameters such as the initial phase parameter and angular frequency parameter in the formula can be adjusted according to actual conditions to adapt to different process frame rate control scenarios, thereby improving the applicability and flexibility of the algorithm.

[0126] In this specification, a system for constructing a three-dimensional heart model in real time is provided, which is used to execute the above-mentioned method for constructing a three-dimensional heart model in real time. The system for constructing a three-dimensional heart model in real time includes:

[0127] An image analysis module is used to obtain a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image;

[0128] A voxel conversion module is used to perform high-dimensional conversion on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; and to perform three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure.

[0129] a muscle state analysis module, configured to perform image overlap on a set of two-dimensional cardiac images to generate a set of two-dimensional cardiac overlapped images; and perform image edge analysis on the set of two-dimensional cardiac overlapped images using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image;

[0130] A three-dimensional model construction module is configured to obtain physiological characteristic data of the user; determine the heart area change data based on the muscle contraction state image and the muscle relaxation state image; construct the external structure in three dimensions using the physiological characteristic data of the user and the heart area change data to generate an external three-dimensional structure; and generate an initial three-dimensional model of the heart based on the structural combination of the internal three-dimensional structure and the external three-dimensional structure.

[0131] The real-time rendering module is used to perform three-dimensional initial rendering on the heart three-dimensional initial model using a real-time flow rendering mechanism to generate a preliminary heart rendering model; and perform secondary rendering on the heart three-dimensional rendering model according to a preset shadow judgment area to obtain a three-dimensional heart rendering model.

[0132] The beneficial effect of the present invention is that by performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel data set and a ventricular voxel data set, and then using three-dimensional reconstruction technology to perform three-dimensional construction of the internal structure of these data sets to generate an internal three-dimensional structure, such comprehensive data processing provides a comprehensive presentation of the heart structure, and the two-dimensional image set of the heart is overlapped to generate a two-dimensional overlapped image set of the heart, and the overlapped image set is analyzed for image edges using a cardiac motion simulation formula to determine muscle motion state images, including muscle contraction state images and muscle relaxation state images. By analyzing the motion state of the heart, the function of the heart can be better understood and simulated, and the user's physiological characteristic data is obtained and the heart area change data is determined based on the muscle contraction state images and muscle relaxation state images. According to the user's physiological characteristic data and heart area change data, the external structure is constructed in three dimensions to generate an external three-dimensional structure. In this way, a heart model with personalized characteristics can be constructed according to the individual differences of the user. The initial three-dimensional model of the heart is initially rendered using the real-time flow rendering mechanism to generate a preliminary rendering model. Then, the rendering model is rendered again according to the preset shadow judgment area to obtain a more realistic and lifelike three-dimensional rendering model of the heart. Such rendering optimization makes the model present a better visual effect. The method can obtain cardiac ultrasound images in real time and quickly generate atrial region images and ventricular region images through image processing and segmentation technology. This enables the construction of the three-dimensional heart model to be carried out in real-time operation, providing doctors and researchers with fast heart modeling results. Therefore, the present invention improves the accuracy of model construction and reduces rendering pressure by constructing a hierarchical model of the heart structure and performing multi-layer rendering through the real-time flow rendering mechanism.

[0133] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.

[0134] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a three-dimensional heart model in real time, characterized in that: The following steps are involved: Step S1: Acquire a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image; Step S2: performing high-dimensional transformation on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; performing three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure; Step S3: performing image overlap on the two-dimensional cardiac image set to generate a two-dimensional overlapped cardiac image set; performing image edge analysis on the two-dimensional overlapped cardiac image set using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image; Step S4: Acquire user physiological characteristic data; determining the heart area change data according to the muscle contraction state image and the muscle relaxation state image; The user's physiological characteristics data and heart area change data are used to construct the external structure in three dimensions to generate an external three-dimensional structure; based on the structural combination of the internal three-dimensional structure and the external three-dimensional structure, an initial three-dimensional model of the heart is generated; Step S5: Performing initial 3D rendering on the initial 3D model of the heart using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart; performing secondary rendering on the 3D rendered model of the heart according to a preset shadow determination area to obtain a 3D rendered model of the heart.

2. The method for constructing a three-dimensional heart model in real time according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: obtaining an original cardiac ultrasound image using a cardiac ultrasound instrument; Step S12: performing image boundary positioning on the original cardiac ultrasound image according to the Canny edge detection algorithm to generate a cardiac boundary image; Step S13: performing color depth detection on the core area of the heart boundary image to generate color depth values of core pixels; performing color depth comparison on the core pixel values with adjacent pixels to obtain high color depth pixels and low color depth pixels; Step S14: stacking high color depth pixels to generate high color depth pixel stacking points and removing low color depth pixels; performing region segmentation on the high color depth pixels using a threshold segmentation technique to generate an atrial image and a ventricular image; Step S15: Filling holes in the atrial image and the ventricular image by applying morphology to generate an atrial filling image and a ventricular filling image; performing regional verification on the atrial filling image and the ventricular filling image based on the cardiac structure to generate an atrial regional image and a ventricular regional image.

3. The method for constructing a three-dimensional heart model in real time according to claim 2, characterized in that: Step S2 includes the following steps: Step S21: performing three-dimensional image stacking processing on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; Step S22: performing image registration on the atrial voxel dataset and the ventricular voxel dataset with a preset standard cardiac structure map, thereby generating a three-dimensional voxel dataset; Step S23: using a bicubic interpolation method to perform low-resolution region filling on the three-dimensional voxel dataset to obtain three-dimensional filled voxel data; Step S24: constructing a three-dimensional model of the three-dimensional filled voxel data according to the point cloud reconstruction method to generate a three-dimensional model of the interior of the heart; performing a model quality assessment on the three-dimensional model of the interior of the heart to obtain the internal three-dimensional structure.

4. The method for constructing a three-dimensional heart model in real time according to claim 3, wherein: Step S3 includes the following steps: Step S31: continuously arranging the cardiac two-dimensional image set to obtain a two-dimensional continuous image set; Step S32: performing time series marking on the two-dimensional continuous image set according to a preset time interval to generate an initial time series image and a terminal time series image; Step S33: confirming the time series change of the two-dimensional image set according to the initial time series image and the terminal time series image to obtain a two-dimensional change image set; performing image overlap on the two-dimensional change image set based on the optical flow method to generate a two-dimensional overlapped image set of the heart; Step S34: using a cardiac motion simulation formula to perform cardiac motion velocity screening on the set of two-dimensional cardiac coincidence images, thereby generating a first cardiac motion velocity and a second cardiac motion velocity; Step S35: comparing the first heart speed and the second heart speed. When the first heart speed is greater than the second heart speed, marking the two-dimensional coincident heart image corresponding to the first heart speed as a muscle relaxation state image, and marking the two-dimensional coincident heart image corresponding to the second heart speed as a muscle contraction state image. Step S36: When the second heart movement speed is greater than the first heart movement speed, the two-dimensional heart coincidence image corresponding to the second heart movement speed is marked as a muscle relaxation state image, and the two-dimensional heart coincidence image corresponding to the first heart movement speed is marked as a muscle contraction state image.

5. The method for constructing a three-dimensional heart model in real time according to claim 4, characterized in that: The cardiac motion simulation formula in step S34 is as follows: Where F(t) represents the velocity of the heart at time t, t represents the heart movement time, t0 represents the start time of the heart movement, u(x,t) represents the displacement function of the heart at the spatial point x and the time point t, which describes the deformation and displacement of the heart during the movement, V(x,t) represents the function of the heart movement velocity, which describes the velocity distribution of the heart at the spatial point x and the time point t, L represents the length or range of the space, which specifies the area of heart movement simulation, and k represents the influence coefficient of adjusting time attenuation. It is represented as a second-order partial differential operator, which is used to describe the curvature or rate of change of a function in multidimensional space. ω is represented as the abnormal adjustment value for cardiac motion simulation.

6. The method for constructing a three-dimensional heart model in real time according to claim 4, characterized in that: Step S4 includes the following steps: Step S41: Acquire user physiological characteristic data through a biosensor; Step S42: extracting cardiac area features from the muscle contraction state image and the muscle relaxation state image to generate cardiac contraction state area and cardiac relaxation state area; Step S43: Calculating the difference between the heart's systolic area and the heart's diastolic area to obtain heart area change data; using surface modeling technology to perform virtual modeling on the heart area change data and the user's physiological characteristic data to generate an external three-dimensional structure; Step S44: Using the Cartesian space coordinate system, the external three-dimensional structure and the internal three-dimensional structure are structurally fused to generate an initial three-dimensional model of the heart.

7. The method for constructing a three-dimensional heart model in real time according to claim 6, characterized in that: Step S5 includes the following steps: Step S51: setting rendering engine parameters for the initial three-dimensional heart model to generate rendering environment parameters, wherein the rendering environment parameters include light source environment, environment map, and rendering engine parameters; Step S52: Rendering the initial three-dimensional heart model in real time according to the rendering environment parameters using a real-time flow rendering mechanism to generate a preliminary rendered model of the heart; Step S53: Calculating light source points of the preliminary rendered heart model according to the light source environment to generate rendering light source point data; calculating the coverage area of the preliminary rendered heart model using the environment map to obtain the model coverage area size; analyzing the shadow angle of the model coverage area size and the rendering light source point data using rendering engine parameters to obtain the model shadow area data; Step S54: Compare the model shadow area data with the preset shadow determination area. When the model shadow area data is greater than or equal to the preset shadow determination area, perform secondary rendering of the shadow area of the preliminary heart rendering model to obtain a three-dimensional heart rendering model. When the model shadow area data is less than the preset shadow determination area, directly mark the preliminary heart rendering model as a three-dimensional heart rendering model.

8. The method for constructing a three-dimensional heart model in real time according to claim 7, characterized in that: Step S52 includes the following steps: Step S521: dividing the initial three-dimensional heart model into rendering levels according to the rendering environment parameters to generate a model rendering level; placing parallel rendering nodes on the model rendering level using a multi-core CPU to generate parallel rendering nodes; Step S522: capturing rendering signals from the parallel rendering nodes to obtain a first rendering signal; when the multi-core CPU receives the first rendering signal, performing model distance measurement on the three-dimensional initial heart model using an LOD control method to obtain a rendering model distance; Step S523: Adjusting the rendering accuracy of details of the initial three-dimensional heart model according to the model rendering distance to generate a precision-adapted rendering model and a second rendering signal; when the multi-core CPU receives the second rendering signal, asynchronously rendering the precision-adapted rendering model is performed to generate a rendering CPU core process and a non-rendering CPU core process; Step S524: Prioritize the rendering CPU core process and the non-rendering CPU core process, mark the non-rendering CPU core process as an idle process, and mark the rendering CPU core process as a busy process; Step S525: Utilize the process frame rate control formula to control the frame rate of the busy process, thereby generating an idle process; perform multi-threaded rendering on the precision adaptive rendering model through the idle thread, thereby generating a preliminary rendering model of the heart.

9. The method for constructing a three-dimensional heart model in real time according to claim 8, characterized in that: The process frame rate control formula in step S525 is as follows: Where Q(T) represents the frame rate of the busy process at time T, A represents the amplitude parameter that controls the peak height of the frame rate function, B represents the angular frequency parameter that controls the period of the frame rate function, C represents the initial phase parameter that controls the left and right offsets of the frame rate function, D represents the attenuation parameter that controls the attenuation speed of the frame rate function, E represents the attenuation speed of the frame rate change, F represents the period of the frame rate control, τ represents the number of available processes, and μ represents the correction amount for process frame rate control anomalies.

10. A system for constructing a three-dimensional heart model in real time, characterized in that: A system for executing the method for constructing a three-dimensional heart model in real time according to claim 1, wherein the system comprises: An image analysis module is used to obtain a set of two-dimensional cardiac images through cardiac ultrasound; perform image region segmentation processing on the two-dimensional cardiac images according to the cardiac structure to generate an atrial region image and a ventricular region image; A voxel conversion module is used to perform high-dimensional conversion on the atrial region image and the ventricular region image to generate an atrial voxel dataset and a ventricular voxel dataset; and to perform three-dimensional reconstruction of the internal structure of the atrial voxel dataset and the ventricular voxel dataset using three-dimensional reconstruction technology to generate an internal three-dimensional structure. a muscle state analysis module, configured to perform image overlap on a set of two-dimensional cardiac images to generate a set of two-dimensional cardiac overlapped images; and perform image edge analysis on the set of two-dimensional cardiac overlapped images using a cardiac motion simulation formula to determine the muscle motion state image, wherein the muscle motion state image includes a muscle contraction state image and a muscle relaxation state image; A three-dimensional model construction module is configured to obtain physiological characteristic data of the user; determine the heart area change data based on the muscle contraction state image and the muscle relaxation state image; construct the external structure in three dimensions using the physiological characteristic data of the user and the heart area change data to generate an external three-dimensional structure; and generate an initial three-dimensional model of the heart based on the structural combination of the internal three-dimensional structure and the external three-dimensional structure. The real-time rendering module is used to perform three-dimensional initial rendering on the heart three-dimensional initial model using a real-time flow rendering mechanism to generate a preliminary heart rendering model; and perform secondary rendering on the heart three-dimensional rendering model according to a preset shadow judgment area to obtain a three-dimensional heart rendering model.