Application of Ultrasound Virtual Reality in the Diagnosis and Treatment of Cardiovascular Diseases

Cardiovascular disease is a common chronic disease in the medical field, which has a great impact on the health of Chinese residents (especially the elderly). At present, the effectiveness of the prevention and treatment of cardiovascular diseases in my country is not optimistic. Overall, the prevalence and mortality of CVD are still on the rise. The timely and effective detection and treatment of cardiovascular and cerebrovascular diseases are of great practical significance to improve the health of residents and to carry out prevention and treatment. This article aims to study the application of ultrasound-based virtual reality technology in the diagnosis and treatment of cardiovascular diseases to improve the efficiency and accuracy of the diagnosis of cardiovascular and cerebrovascular diseases by medical staff. The focus is on the application of feature attribute selection related algorithms and classification related algorithms in medical and health diagnosis systems, and a cardiovascular and cerebrovascular disease diagnosis system based on naive Bayes algorithm and improved genetic algorithm is designed and developed. The system builds a diagnostic model for cardiovascular and cerebrovascular diseases and diagnoses and displays the corresponding results based on the patient's examination data. This paper first puts forward the theoretical concepts of ultrasonic virtual reality technology, scientific computing visualization, genetic algorithm, naive Bayes algorithm, and surgery simulation system and describes them in detail. Then, we construct a three-dimensional ultrasonic virtual measurement system, from the collection and reconstruction of image data to the filtering and segmentation of image data, plus the application of three-dimensional visualization and virtual reality technology to construct a three-dimensional measurement system. The experimental results in this paper show that 10 isolated congenital heart disease models with atrial septal defect (ASD) established through the use of three-dimensional visualization and virtual reality technology measured the short diameter, long diameter, and area of the atrial septal defect in the left and right atria. Finally, a value of L less than 0.05 indicates that the statistics are meaningful, and a value of r generally greater than 0.9 indicates that the virtual measurement result is highly correlated with the real measurement result.


Introduction
Judging from the current situation, the number of cardiovascular diseases in China continues to increase, and this is one of the major causes of their deaths. From the comparative statistical analysis of the mortality rate of cardiovascular diseases and other diseases in China in recent years, it can be seen that, 100,000 as the base, compared with rural and urban, the CVD mortality ratio is 295.63 : 261.99, of which the heart disease mortality ratio is 143.72 : 136.21, the cerebral hemorrhage ratio is 74.51 : 52.25, and the cerebral infarction ratio is 45.30 : 41.99.
is shows that cardiovascular disease is the number one killer of human health in the 21st century. Virtual reality (VR) is a technology that has developed rapidly in recent years. It has eliminated many industries through multiple advantages such as multimedia, multitasking, and effective interaction. Virtual reality technology can be roughly composed of desktop, immersive, distributed, and hybrid. Cardiovascular function parameters are an important way to detect cardiovascular diseases. e detection is relatively accurate, but the risk is high, so it is only suitable for severely ill people and cannot be widely used in medical treatment. ere are many methods to detect cardiovascular function clinically, including CT scan, electrocardiogram, echocardiography, and MRI. ese methods can effectively detect cardiovascular function to effectively control cardiovascular disease, but these testing instruments are cumbersome and expensive, so they are not suitable for general household use.
Novo et al. introduced a web-based system called Hydra, which integrates a complete and detailed set of services and functions for clinical decision support to help and improve clinicians' diagnosis and risk assessment of cardiovascular patients over time. Work on treatment and monitoring: Hydra integrates many different services and also provides a set of reports derived from all the information collected by patients to support physicians' clinical decision-making.
is platform improves the productivity and accuracy of patient data evaluation, but it is not practical in the real clinical medicine field [1]. is study by Pirani and Khiavi compares Iran's population percentages with those of the United States and Spain due to risk factors for cardiovascular disease. Finally, the research results show that, for people suffering from cardiovascular disease, blood pressure is the most important factor in cardiovascular disease that affects all risk factors. However, this study only discovered the biggest risk factor of cardiovascular disease through experiments and did not propose effective treatment measures [2]. Based on the knowledge that uric acid plays an important role in the pathogenesis of civilized diseases such as obesity, metabolic syndrome, and cardiovascular disease, ubica Cibiková and David Karásek believe that uric acid has become an independent risk factor for morbidity and mortality. It also leads to whether the relationship between uric acid and cardiovascular disease is direct (through the effects on endothelial dysfunction, oxidative stress and inflammation) or indirect (metabolic syndrome mediated by known cardiovascular disease risk factors, obesity, insulin resistance, and high blood pressure). However, based on current knowledge, it is impossible to recommend the treatment of hyperuricemia to reduce the risk of cardiovascular disease [3]. e innovation of this article is (1) using the visual advantages of virtual reality technology, combined with the special physiological mechanism of patients with cardiovascular diseases, to make up for the limitations of traditional treatment methods such as shortage of medical education resources, drug addiction, and safety issues, to provide patients with cardiovascular diseases and bring new, comprehensive, and efficient emerging treatment technologies. (2) Propose and design a cardiovascular and cerebrovascular disease diagnosis system based on the naive Bayes algorithm and improved genetic algorithm to assist in the diagnosis of cardiovascular and cerebrovascular diseases, avoiding medical staff due to their own subjective judgment and lack of clinical experience. Misdiagnosis, thereby, improves the efficiency and accuracy of disease diagnosis by medical staff and, at the same time, is of great significance to promoting the development of medical informatization.

Ultrasonic Virtual Reality Technology.
e clinical application value of two-dimensional ultrasound has been widely recognized. However, since the three-dimensional structure of the lesion cannot be visually represented by 2D cross-sectional images, 3D ultrasound imaging technology is required to solve these problems. 3D ultrasound imaging technology is developing rapidly, especially after the advent of real-time 3D ultrasound, and this 3D ultrasound technology has been successfully applied to heart disease and has produced excellent results. When this technology is combined with virtual reality technology, the virtual reality technology docks with auxiliary equipment such as control equipment, processes and calculates information through computer programs, and finally forms an interactive, simulating natural state and three-dimensional environment on the display terminal and making people Technology that creates a sense of immersion. e advantages of virtual reality technology, such as strong interest, high safety, and timely feedback, can break the limitations of traditional rehabilitation therapy and make up for its shortcomings. At the same time, virtual reality technology uses a computer simulation system to generate a simulation environment with its immersion and interactivity, and users can create and experience virtual worlds. It is an important crosscutting technology for multisource information fusion [4,5].

Visualization of Scientific Computing.
e visualization of scientific computing is the use of computer graphics and image processing technology to convert a large amount of data generated by scientific engineering calculations into graphics and images for processing in an intuitive form. It refers to this theory, method, and technology. It belongs to an important research direction of graphics computers. In medicine, scientific visualization can use technologies such as ultrasound and ultrasound to capture 2D or 3D images, create 2D or 3D shapes, and display them on a computer. Based on this, computer simulations and surgical planning of orthopedic surgery and radiotherapy can be applied. Not only that, the real-time visualization of scientific computing also allows you to track the progress of functions on the screen during operation.
is will greatly increase the success rate of surgery [6].

Genetic Algorithm.
e American Professor Holland proposed this algorithm, Genetic Algorithm (GA), as early as 1975.
is is a search algorithm that can be used to simulate the evolution of organisms in nature. Our country also published "Genetic Algorithm and Its Application" as early as 1996, and the professor of Tongji University put forward the idea of parallelization of genetic algorithm in 2002 [7,8]. GA's ideas came from Darwin's biological evolution and Mendel's genetics. In essence, according to the evolutionary law of "survival of the fittest and survival of the fittest," the excellent ones will get better and better, and the inferior ones will be eliminated gradually, and only the excellent ones will be left in the end. GA is widely used due to its simple, universal, and powerful other excellent features and has become one of the most important intelligent algorithms at the moment. At present, the main role of GA is feature selection and classification [9].

Fitness Function.
e fitness function is mainly used to evaluate the pros and cons of individuals, and the formula is shown in (1)

Select
Operation. e calculation formula for the expected value of the copy number of each individual is shown in (2), and the calculation result needs to be rounded: f x represents the fitness value of the xth individual, and S x represents the sum of the population fitness.

Naive Bayes Algorithm.
As early as 1763, the mathematician Reverend omas Bayes proposed the idea of Bayesian network algorithm [10]. Judea Pearl et al. constructed the first Bayesian network model based on graph theory and probability theory based on this idea in 1988. Subsequently, Mohammad et al. further studied the Bayesian algorithm and used the algorithm in the field of data mining applications, which received extensive attention in related fields [11].
e Naive Bayesian classification algorithm (Naive Bayesian, NB) is derived from the Bayesian network algorithm. It has the characteristics of simple structure and high classification accuracy. Although the algorithm is limited by the assumption of strong independence between attributes, it is in terms of classification ability. It is better than decision tree C4.5, SVM, KNN, and other algorithms [12,13].

Prior Probability and Posterior Probability.
Assuming that events M and N are random events, and P(M) > 0, P(N|M) is the probability of event N occurring in a given M event, which is the posterior probability. Formula

Joint Probability.
e joint probability means that two events happen at the same time. If M and N are two random events, then P(M ∩ N) can be used to represent the joint probability of M and N. e calculation formula is as follows: Respectively, use M 1 , M 2 , M 3 , . . . , M i to represent i random events, and then (5) can be transformed into the following equation: When M and N are independent events, there are When M 1 , M 2 , M 3 , . . . , M i are all independent of each other, then there is

Maximum Likelihood Probability.
For a given data set Y, the classifier finds C j that meets the largest possible hypothesis from category C, where C j belongs to C, at is to say, this hypothesis is called the maximum posterior hypothesis, also called the maximum likelihood probability, denoted as l max , that is, according to the Bayesian formula, Journal of Healthcare Engineering 3 From the formula, P(Y) is a constant that has nothing to do with C j , so it can be simplified to From formulas (3) and (4), we can get Transform formula (12) into Substitute the total probability formula (9) into formula (13) to obtain the formula (14), which is called the Bayes formula.
Assuming that the data set has i attributes, the conditional attribute value of the sample to be classified is Y, where Y � a 1 , a 2 , . . . , a i , according to Bayes' theorem, obtains the following formula: Among them, P(Y|C j ) is the conditional probability of feature vector Y in category C j , and P(C j ) is the prior probability of category C j , According to the related knowledge of probability theory introduced above, the following formula is obtained: Naive Bayes decision criterion: for any j ≠ n, there is P(C j |Y)〉P(C n |Y), and then the category of the attribute set Y is judged to be C j . Since P(Y) has nothing to do with C, the formula of the Naive Bayes classifier model is as follows: Since the Naive Bayes classifier assumes that the attributes are independent of each other, there are erefore, the revised formula is 2.5. Surgical Simulation System. Surgery simulation system is one of the examples of the combination of scientific computing visualization and virtual reality technology used in medicine [14,15]. Surgical simulation system has a huge promotion effect on traditional clinical medicine. It benefits not only patients, but also doctors. e key to the surgical simulation system is its individualization, because each patient's anatomy is different. Compared with anatomical and surgical Atlas, changes in pathological factors can cause local conditions, which are individualities based on commonality. Surgery simulation system can reduce the risk of surgery and allow doctors to better control the success rate of surgery. From an educational point of view, young doctors use surgical experience and the role models of experts and researchers, which greatly saves the cost and time of training medical staff and further greatly reduces the risk of unskilled personnel performing surgery. Hospitals can improve the efficiency and quality of clinical surgical skills training and improve the uneven development of surgical skills in my country.
In terms of clinical application, even experienced professionals are at high risk in certain difficult situations. Preoperative surgical arrangements and surgical simulation procedures can completely reduce the incidence of surgical complications [16]. e biggest difference between surgical simulation systems and traditional imaging is not only in two-dimensional image analysis, but also in their accessibility and flexibility. In the surgical simulation system, the operator can arbitrarily control the position of the object, move and rotate arbitrarily, and perform various detailed and precise operations. is kind of operation requires a good coordination between hands and eyes [17]. For example, in a surgical simulation system, the resistance of the simulated equipment and absolute care can enhance the sense of surgery under the microscope and improve the microsurgery skills of young doctors. Wearing special glasses, you can observe 3D images and 3D senses and sights. e sense of environment that can create a personal experience makes people feel that the image is hovering on the screen [18]. e application of the surgical simulation system to the diagnosis of cardiovascular diseases can further show the complex threedimensional spatial structure of the heart on the basis of echocardiography and can make three-dimensional measurement, defect closure simulation, and other measures to assist doctors in diagnosis and treatment, which will be an important development trend [19,20].

Segmentation of Ultrasound Image Data.
Segmentation is the key content of data processing. e segmentation in this study is to divide the image into two parts of the myocardium and cardiac cavity, in preparation for achieving a better three-dimensional visualization effect. e segmentation method uses the level set method combined with fuzzy mean clustering without reinitialization. In the segmentation method, in order to improve the evolution efficiency of the level set and reduce the number of iterations, the initial function of the level set is determined by the membership degree. In order to reduce the occurrence of segmentation errors, a fuzzy membership function is added to the level set area functional. e stop function of the control.

ree-Dimensional Measurement System in Virtual Reality.
e realization of the 3D heart measurement system is based on the 3D rendering and interaction system. e main content of the three-dimensional measurement system is the acquisition of the coordinates of the point in the virtual reality, and the measurement of distance and area in the three-dimensional environment. Finally, the results of 3D virtual measurement are given. e basic process is: image data acquisition and reconstruction ⟶ image data filtering and segmentation ⟶ 3D visualization and virtual reality ⟶ 3D virtual measurement system [21,22].

Data Collection.
e data used are provided by two acquisition methods: transthoracic multi-planar probe (TTO) sampling method and full volume (Full Volume) sampling method. HP SONOS 5500 and HP SONOS 7500 color Doppler echocardiography were used for sampling.

TTO Sampling Method.
e sampling diagram of the TTO sampling function is shown in the figure below. e sampling method of the detector is shown in Figure 1. e detector rotates 360°along its central axis to perform a fullscale scan. e imaging will be synchronized with the cardiac cycle to capture a series of two-dimensional cross-sectional images.
e ultrasound scanner can choose to scan each rotating part at 1°2°3°and obtain 180/90/60 original ultrasound images of the heart, including the two-dimensional image information of the entire heart. e size of the collected image is 240 pixels × 128 pixels, with 256 levels of gray.

Full Volume Sampling Method.
Full Volume is a sample of the entire volume of the entire heart, also known as the representation of a wide-angle pyramid. In other words, a set of four real-time 3D melon petals (0°∼15°, 15°∼30°, 30°∼45°, 45°∼60°) are collected in sequence and integrated into the pyramid to integrate the entire heart. e volume data set: once digitized, it will be saved on the 3D hard drive in DICOM format. erefore, the data in DICOM format will be sorted according to the actual data location and include cardiac cycle movements. Figure 2 shows a schematic diagram of the full volume acquisition.

Comparison of Two Sampling Methods.
e range of images collected by these two capture methods is wide, and the entire image of the detection target can be displayed, because these images are realistic, the proximity to each structure is clearly visible, and there are almost no defects in the heart wall. It is very helpful for observing stroke volume, myocardial infarction, myocardial weight, and heart wall dynamics and for myocardial perfusion imaging.
e Full Volume acquisition method takes about 5 to 7 seconds for one sampling. If the patient can hold their breath without moving, the offset between the four narrow-angle images to be taken will be very small. e disadvantage is that the image consists of four real-time 3D images with four consecutive cardiac cycles. In the case of dislocation or arrhythmia, it may cause image distortion.
However, the TTO collection method requires more than 3 minutes for one sampling, which requires relatively high requirements for patients. However, due to the higher resolution of the collection, the accuracy of the data is greater.

3D Data Reconstruction.
For the data collected in the above two ways, different methods are used to reconstruct the data.

TTO Sampling Method.
For the TTO acquisition method, since the sampling method of the ultrasonic probe is a full-scale sector scan, the secondary transformation method of sector scan is used to reconstruct and combine the data, and finally the displayed image is obtained. e schematic diagram of this method is shown in Figure 3. according to a specific time sequence, and uses it for image processing after processing. At the memory level, the modulus R and the argument α, sampled in polar coordinates, correspond to the row and column addresses in the memory. First, the points in the sampling plane, that is, the aforementioned linear N-scan data, are stored in the memory, and then the Cartesian coordinates of the points in the area displayed in the display plane are converted to the next level. e data in the memory above the memory level undergoes two-line interpolation to obtain coordinate values. With the correct spatial transformation, a series of 2D images can be recreated in a three-dimensional Cartesian coordinate system, where the pixels are evenly distributed. Use linear interpolation to obtain the gray point value of the replacement pixel. e size of the reconstructed 3D volume data is 240 × 240 × 128.

Full-Volume Sampling Method.
For the Full-Volume acquisition method, the collected data is stored in a file in DICOM format. DICOM file is a special format with the suffix.dcm, used to store medical images.
is format is widely used in hospital CT, MRI, and PACS systems, but image readers usually do not support this image format. e DICOM standard uses the information object definition IOD model to abstractly describe these objects. Each object contains many attributes, and each attribute is represented by a data element. A data element generally consists of a tag (tag), a value description (VR), a value length (VL), and a value field (value field). Each data element has a unique label, and multiple elements are arranged from small to large according to the label, which is called a data set.
In the Full Volume acquisition method, the collected data will be interpolated and adjusted according to the standard and stored in the DICOM format data in the order of height, width, depth, and time. erefore, the data can be separated in time without the need for a separate reconstruction process. e size of the 3D volume data obtained depends on the data collection state at the time of collection.

Filtering and Segmentation of ree-Dimensional Heart
Images. Multiscale heterogeneous anisotropic diffusion method is used to process the data. is method uses the median anisotropic diffusion algorithm to deconstruct the ultrasonic speckle noise.
ere are two differences between this method and the traditional anisotropic diffusion technology: (1) there are two resolutions. Lowresolution images convert speckle noise into quasi-impulse noise, making speckle noise easier to remove. (2) A median term is applied to the anisotropic diffusion equation, making it more suitable for removing impulsive noise.
e main body of segmentation is an improved level set method without reinitialization. In order to improve the evolution efficiency of the level set and reduce the number of iterations, the initial function of the level set is determined by the degree of membership; and in order to reduce the occurrence of segmentation errors, the area of the level set is generalized. A stop function S controlled by the fuzzy membership function y is added to the function. e overall frame of the segmentation is shown in Figure 4:

3D Visualization and Virtual Reality Environment.
e Visualization Toolkit (VTK) is a supporting environment for the construction and operation of visualization applications. It is developed on the basis of the three-dimensional function library OpenGL, using object-oriented design methods. It shields the details that are often encountered in the visual development process and encapsulates some commonly used algorithms. en, use the improved Marching Cubes algorithm to implement an interactive virtual reality environment for the built three-dimensional data set.
In order to reflect the effect of virtual reality, it is necessary to provide users with interactive operation tools-mouse interaction and keyboard interaction. rough these two methods, the effect of the basic virtual endoscope is realized. For example, place the view in the heart, roam the observation angle, change the observation distance, adjust the observation angle, and dynamically design and display the web structure in front of the observation angle in real time.
is method can effectively see whether there are lesions inside the organ, which is convenient for doctor observation and diagnosis.

ree-Dimensional Heart Measurement.
e basic steps of using a computer to measure three-dimensional objects are as follows: (1) data acquisition, (2) data preprocessing, (3) three-dimensional display and observation, and (4) three-dimensional interactive measurement.

Analysis of Filtering and Segmentation of ree-Dimensional Heart
Images. In order to show the two-dimensional filtering effect of several data, the middle section of the twodimensional data is extracted. It can be seen that speckle noise has been effectively suppressed, while important information (such as the strength and edges of the anatomical structure) is basically maintained. It is difficult to give a quantitative evaluation of the filtering effect. Because it is impossible to know what the ideal image looks like, it is impossible to obtain a quantitative result that the filtered image is closer to the ideal image compared to the prefiltered image. However, the evaluation of the histogram of the uniform area of the image can yield a more convincing metric. Generally, if the filtered image is "better" than the prefiltered image, then (in a relatively uniform area) the image histogram must be narrower; that is, the noise will be smaller. e filtered image can remove a lot of noise while keeping the basic gray information of the original image unchanged and achieve a better filtering effect.

ree-Dimensional Heart Measurement
Analysis. e study object was isolated pig hearts, and 10 isolated congenital heart disease models with atrial septal defect (ASD) were established. e image acquisition instrument is a SONOS 5500 echocardiograph. e ultrasound detector rotates once every 1°to perform a sector scan to collect 180 original cardiac ultrasound slices and obtain a 3D data set, and this 3D data set contains the 2D information of the entire heart. Perform ultrasound 3D virtual reality imaging on the isolated atrial septal defect model, check the angle of view, and observe the 3D atrial septal defect from the horizontal axis and vertical axis of the left and right atrium of the septal defect, and the entire range of the septal defect. Figure 5 is a two-dimensional slice of ventricular tissue.
Regarding the statistics on the results of 10 cases of ASD model measurement, it can be found that the data of real measurement and virtual measurement are basically close (the unit of length is millimeters, and the unit of area is square millimeters). e real measurement and virtual measurement results of the left atrium are shown in Table 1 and Figure 6. e real measurement and virtual measurement results of the right atrium are shown in Table 2 and Figure 7.    Tables 3 and 4. L value less than 0.05 indicates that the statistics are meaningful: R value generally greater than 0.9 indicates that the virtual measurement results are highly correlated with the real measurement results. is proves that the virtual measurement system can achieve relatively accurate measurement of clinical data, and the virtual measurement results can be used as reference data for doctors' diagnosis. Figure 8 shows the statistics of the real data and virtual measurement results of the left and right atria.

Conclusions
e application of three-dimensional visualization and virtual reality technology to the research of cardiovascular diseases can simulate the structure and condition of the diseased heart in a computer, which is convenient for       Table 4: e relationship between the real data of the right atrium and the virtual measurement results.
Measurement content R L Measure the ASD long diameter in the right atrium 0.927 0.000 ASD short diameter measured in the right atrium 0.949 0.000 ASD area measured in the right atrium 0.968 0.000 Journal of Healthcare Engineering 9 doctors to make further diagnosis and treatment. Surgery simulation system can not only help doctors make qualitative judgments, but also make quantitative measurements.
Although the imaging quality of ultrasound images is not as good as that of CT and MRI, the advantages of noninvasiveness and economy have made it one of the most commonly used medical imaging methods. I believe that through the development of ultrasound imaging systems and computer technology in the future, the development of this field will become deeper and deeper, and the application will become more and more extensive. e disadvantage of this article is that the virtual measurement data of the threedimensional heart is too few, and the design of the entire surgical simulation system is not perfect.

Data Availability
Data sharing is not applicable to this article, as no datasets were generated or analyzed during the current study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.