Method for automatically selecting myocardial stimulation sites based on AHA standard

By automatically selecting myocardial stimulation sites based on the AHA standard, the problem of inconsistent selection of right ventricular myocardium in three-dimensional personalized heart model simulation was solved, achieving more accurate simulation analysis and myocardial segmentation.

CN120635201APending Publication Date: 2025-09-12DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510698024.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In electrophysiological simulations of existing three-dimensional personalized heart models, the selection of right ventricular myocardial stimulation points is not uniform, making it impossible to achieve more accurate simulation analysis.

Method used

Based on the AHA standard, the left ventricular myocardium is automatically divided into 17 segments, and the right ventricular myocardium is automatically divided into 10 segments. Through interpolation image processing and edge point detection, the myocardial segments are divided and the stimulation sites are selected.

Benefits of technology

It achieves three-dimensional personalized heart model simulation that is closer to clinical results, provides a unified stimulation site selection method, and improves the accuracy and consistency of simulation analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635201A_ABST
    Figure CN120635201A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of digital medical treatment, and particularly relates to a method for automatically selecting myocardial stimulation sites based on an AHA standard. According to the method for automatically selecting myocardial stimulation sites based on the standard of 17 sections of myocardial areas proposed by AHA, left ventricular myocardium is divided into 17 sections, right ventricular myocardium is additionally divided into 10 sections, and then surface stimulation sites and internal stimulation sites of all the sections are automatically selected; a simulation stimulation site closer to a clinical result can be provided for simulation of a three-dimensional personalized heart model. According to the method, various parameters of a model are obtained through interpolation images of a three-dimensional personalized heart model and structure judgment of the interpolation images, then classification of left and right myocardial areas is carried out according to the myocardial interpolation images with classified left and right myocardium and an AHA standard, and then selection of myocardial stimulation sites is carried out by using area classification results; the method is mainly suitable for a selection process of stimulation sites in simulation of a three-dimensional personalized heart model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital medicine, and in particular relates to a method for automatically selecting myocardial stimulation sites based on the AHA standard. Background Art

[0002] The American Heart Association (AHA) has proposed a standardized myocardial segmentation model, known as the 17-segments cardiac segmentation model, which is widely used to describe the myocardial regions and heart wall affected by disease. This model divides the left ventricular myocardium into 17 segments: the left ventricular myocardium is divided into three myocardial rings: the basal, middle, and apical rings, each measuring one-third the length of the left ventricle. On short-axis views, the basal and middle rings are divided into six segments, the apical ring is divided horizontally into four segments, and the portion of myocardium extending beyond the end of the cardiac chamber is designated as the apical cap, the 17th segment. Each segment has a specific location and function, facilitating more precise description and analysis during the diagnosis and treatment of heart disease. This standardized segmentation helps improve the accuracy of heart disease diagnosis and targeted treatment, while also promoting communication and collaboration in heart disease research.

[0003] The three-dimensional personalized heart model can be used for electrophysiological simulation to noninvasively assess a patient's risk of ventricular tachycardia and assist in determining the location of lesions. A series of processing steps on the patient's image data yields a personalized three-dimensional finite element mesh model for a single patient. This model is then subjected to electrophysiological simulation using finite element methods to assess the patient's risk of ventricular tachycardia and assist in determining the location of lesions. During electrophysiological simulation, several initial stimulation points must be selected to induce potential changes in the myocardial cells within the heart model. Therefore, to align the simulation results more closely with clinical observations, the left ventricular stimulation site is chosen at the surface center of a 17-segment myocardial segmentation model. However, the 17-segment myocardial segmentation model proposed by the American Heart Association does not include the right ventricular myocardium. Consequently, the stimulation points for the right ventricle in the simulation of the three-dimensional personalized heart model are not fixed, making it impossible to analyze the simulation results more uniformly. Summary of the Invention

[0004] In order to solve the above problems, the present invention proposes a method for automatically selecting myocardial stimulation sites based on the AHA standard. The method for automatically selecting myocardial stimulation sites based on the 17-segment myocardial region standard proposed by the AHA divides the left ventricular myocardium into 17 segments, and additionally divides the right ventricular myocardium into 10 segments, and then automatically selects the surface stimulation sites and internal stimulation sites of each segment, which can provide simulation stimulation sites that are closer to clinical results for the simulation of three-dimensional personalized heart models. This method uses the interpolation image of the three-dimensional personalized heart model to determine the structure of the interpolation image to obtain various parameters of the model, and then classifies the left and right myocardial regions according to the myocardial interpolation image of the classified left and right myocardium and the AHA standard, and subsequently uses the regional classification results to select myocardial stimulation sites; this method is mainly applicable to the selection process of stimulation sites in the simulation of three-dimensional personalized heart models.

[0005] The technical solutions of the present invention are as follows:

[0006] The method for automatically selecting myocardial stimulation sites based on the AHA standard includes the following steps:

[0007] S1, data preprocessing;

[0008] S11, image preprocessing;

[0009] The LGE-MRI two-dimensional plane image of the heart is segmented to separate the left and right ventricle boundaries.

[0010] S12, obtaining two types of interpolation images by interpolation;

[0011] The interpolated images of the left and right myocardium are obtained by interpolation of the variational implicit function, and two types of interpolated images are obtained by combining them: the interpolated image of the three-dimensional heart model (Label image) and the interpolated image of the left and right ventricles separated (Label_classified image, which is set to have unequal pixel values ​​for the left and right ventricular myocardium).

[0012] S2, find edge points;

[0013] S21. determining the z-axis lengths of the left and right blood pools in the three-dimensional heart model;

[0014] (1) Read the Label image and binarize the image;

[0015] (2) Count the number of pixels along the z-axis to obtain the z-axis range of the myocardium. Then compare the number of pixels in the uppermost layer with the number of pixels in the lowermost layer to determine whether the z-axis is positive. If the z-axis is inverted, flip the image along the z-axis to ensure that the z-axis of the heart base is the highest and the z-axis of the heart apex is the lowest.

[0016] (3) First, invert the background and myocardial parts (i.e., the myocardial part is set to 0, and the blood pool and the background outside the myocardium are set to 1), and then set the part outside the z-axis range to 0 to obtain the Label_invert image;

[0017] (4) Find the three-dimensional connected domain of the Label_invert image and obtain the center of mass of the three connected domains and the boundary coordinates of each axis;

[0018] (5) Remove the connected domain with the lowest z-axis boundary in the Label_invert image (i.e., remove the extramyocardial area) to obtain the Label_invert_nobackground image. The z-axis boundaries of the only two connected domains in this image are the z-axis lengths of the left and right blood pools.

[0019] S22, determining the position of the edge point;

[0020] Since the size and shape of the blood pools in the left and right ventricles are different in each layer of the image, it is necessary to find edge points in all layers of the image where the right ventricle blood pool exists. Therefore, the operation is performed on each layer of the Label_invert_nobackground image, starting from the bottom layer of the heart and ending at the apex layer of the right ventricle. The loop steps are as follows:

[0021] (1) Take the two-dimensional image of the layer and record it as Tempimage;

[0022] (2) Find the connected domain of the Tempimage image and obtain the centroid, circularity and coordinates of the two connected domains;

[0023] (3) According to the degree of circularity, the left and right ventricular blood pools are separated. The connected area with small circularity is recorded as the right ventricle, and the angle RV_angle of the line connecting the left and right ventricular centers of mass is calculated;

[0024] (4) Perform Harris corner detection on the right ventricle in Tempimage to obtain n corner points with the highest corner response values;

[0025] (5) Calculate the R value of the obtained n corner points. The R value formula is as follows:

[0026] R=0.7*|xx C |+0.3*|yy C |

[0027] Among them, x and y represent the horizontal and vertical coordinates of the corner point; C and y C are the x- and y-axis coordinates of the centroid of the right ventricular blood pool in this layer, respectively;

[0028] (6) Sort the R values, set the point with the largest R value as one of the edge points, record it as edge point 1, calculate the angle between it and the center point of the left ventricle, record it as point1_angle, then judge the angle of the remaining corner points in descending order of R value, record the angle between it and the center point of the left ventricle as point2_angle, and make the following judgment:

[0029] (point1_angle-RV_angle)*(point2_angle-RV_angle)>0

[0030] If the above equation is true, it means that the point and the previously obtained edge point 1 are on the same side of the right ventricle, and are not the required edge point 2. Then continue to determine the next corner point until the above equation is not true.

[0031] Additionally, two conditions are added to the edge point search loop to allow for early exit of the loop to accommodate heart models with unusual right ventricular shapes or lengths. The conditions are as follows:

[0032] Condition 1: When the horizontal distance between the edge point of the current layer and the edge point of the previous layer is greater than the distance threshold, the loop is exited;

[0033] Condition 2: When the angle between the line connecting the two edge points of the current layer and the centroid of the left ventricular blood pool is less than the angle threshold, the loop is exited;

[0034] When two edge points meet one of the above conditions, the loop is exited, and the edge points of the remaining layers inherit the edge point coordinates in the previous loop to ensure the uniformity and continuity of the myocardial segmentation.

[0035] S3. Divide the myocardial segments based on the edge points;

[0036] S31, obtaining the center points of each layer of the left and right ventricles;

[0037] First, a threshold processing operation is performed on the interpolated image (Label_classified image) obtained in the S1 preprocessing process, in which the left and right ventricles are separated, and the image of the left ventricular myocardium and the image of the right ventricular myocardium are extracted according to the pixels in the image.

[0038] Then, the connected domain of each layer of the Label_invert_nobackground image obtained in S21 is calculated. If the right ventricular blood pool exists in the layer, two connected domains representing the left and right ventricular blood pools are obtained. The circularity is then used to determine which side of the blood pool it belongs to. The part with a larger circularity is determined to be the left ventricular blood pool, thereby obtaining the centroid of the left and right ventricular blood pools of the corresponding layer. When the right ventricular blood pool does not exist, the connected domain can be directly calculated to obtain the centroid of the left ventricular blood pool.

[0039] When the right ventricular blood pool is extremely small, its circularity is infinitely close to 1 or even greater than 1, so there is a possibility of incorrect judgment of the left and right ventricular blood pools. Therefore, the distance between the centroids of the upper and lower layers of the left ventricle is set not to be too far. When their x- and y-axis coordinates meet the following conditions, the two centroids of this layer are exchanged to ensure the correctness of the left and right ventricular center points.

[0040] (x2-x1) 2 +(y2-y1) 2 >50

[0041] Among them, x2 and y2 are the x-axis and y-axis coordinates of the lower layer's centroid, and x1 and y1 are the x-axis and y-axis coordinates of the upper layer's centroid.

[0042] S32, myocardial segmentation of the upper and middle parts of the left ventricle;

[0043] Previously, two sets of edge points from the heart base to the right ventricular apex layer were obtained in step S2, and the center point of each layer of the left ventricular blood pool was obtained in step S31. Based on these three sets of points, the myocardial segment of the upper and middle sections of the left ventricle is divided as follows:

[0044] (1) Calculate the angles of the straight line formed by the two edge points and the left ventricular blood pool in each layer in the polar coordinate system, then take the average of the two angles and record the three angles as angle 1, angle 2, and angle 3;

[0045] (2) The three angles are converted into the slopes of straight lines in a rectangular coordinate system, and the intercepts are obtained by substituting the left ventricular center point into the slopes, thereby obtaining three segmentation lines;

[0046] (3) Extract the horizontal and vertical coordinates of the left ventricular myocardium whose distance from the three straight lines is less than a fixed value a. This fixed value is the initial value of the width of the segment;

[0047] (4) Create a null image of the same size as the label image, and assign 1 to the pixels with the same horizontal and vertical coordinates as those obtained in step (3). This new image is converted into a binary image, denoted as edge_label, which is used to represent the intersection range of the three straight lines and the left ventricular myocardium.

[0048] (5) The image of only the left ventricular myocardium obtained in step S31 is processed, and the portion of the image that overlaps with the edge_label image is directly set to 0, so that the left ventricular myocardium is divided into 6 non-contacting segments that meet the AHA standard. This image is recorded as noedge_label;

[0049] (6) Calculate the three-dimensional connected domain of the noedge_label image. Normally, six connected domains should be obtained in the segmentation of the upper and middle myocardium. If the number of connected domains is insufficient, increase the constant a in step (3), and then repeat steps (3) to (6) until the number of connected domains becomes 6, or the constant a exceeds the set range. The same method is used to calculate the three-dimensional connected domain of edge_label until six connected domains are obtained.

[0050] (7) Connect the center points of the six connected domains of the two images with the center point of the left ventricle to obtain their corresponding polar coordinate angles. Then, the angle of the line connecting the left and right ventricles is used as a reference to allocate the six segments. The six connected domains are recorded as region 2, region 1, region 6, region 5, region 4, and region 3 in a counterclockwise order. This allocation order cannot be changed, otherwise it will affect the longitudinal division in step S35.

[0051] (8) Finally, the noedge_label image and the edge_label image of the classified connected domain are put together to obtain the left ventricular upper and middle myocardial image classified into six regions;

[0052] S33, myocardial segmentation of the lower left ventricle;

[0053] The myocardial segmentation of the lower left ventricle is essentially the same as that of the upper and middle segments. It is also based on the two groups of edge points from the heart base to the right ventricular apex layer obtained in step S2 and the center point of each layer of the left ventricular blood pool obtained in step S31 to divide the myocardial segment of the lower left ventricle. Only the allocation method of the myocardial segments is slightly different.

[0054] Only two straight lines are needed to segment the lower segment of the left ventricle, namely the lines connecting the two right ventricular edge points to the center point of the left ventricular blood pool, and the number of allocated regions obtained is only 4. The final allocation method is to first connect the center points of the four connected domains with the center point of the left ventricle to obtain their corresponding polar coordinate angles. The connected domain closest to the corresponding angle of the left and right ventricle connection is region 2, and then the remaining three segments are allocated as regions 1, 4, and 3 in a counterclockwise order. This allocation order cannot be changed, otherwise it will affect the longitudinal division in step S35, and finally an image of the lower segment of the left ventricle is obtained, which is classified into four regions.

[0055] S34, myocardial segmentation of the right ventricle;

[0056] The steps for segmenting the right ventricle's myocardial segments are the same as those for the left ventricle. Angles are calculated using the right ventricle center point obtained in step S31 and the two sets of edge points from the heart base to the right ventricle apex obtained in step S2. Lines are then drawn based on the angles. However, in the steps for the right ventricle, rays starting from the right ventricle center point are used instead of straight lines. The intersection of the rays and the myocardium is similarly obtained and then divided into two images. The regions are then classified using angles, and finally merged into a right ventricle myocardial image classified into three regions.

[0057] S35, longitudinal division based on ventricular length;

[0058] For the left ventricle, the upper middle segment image and the lower segment image must be merged first, and then classified according to the AHA myocardial segmentation standard by dividing the basal ring and the middle ring into six regions and the apical ring into four regions. The regions of the upper left ventricle are regions 1 to 6, which are the same as the six regions obtained in step S32, so no changes are made; the regions of the middle left ventricle are regions 7 to 12, so the label of region 1 corresponding to the middle part is modified to the label of region 7, and the label of region 2 is modified to the label of region 8. Similarly, regions 7 to 12 of the middle left ventricle can be obtained; and the lower left ventricle is regions 13 to 16, a total of four regions, and their allocation standard is only the line connecting the two right ventricular edge points to the center point of the left ventricular blood pool, that is, region 1 of the lower segment corresponds to region 13, region 2 corresponds to region 14, region 3 corresponds to region 15, and region 4 corresponds to region 16. Region 17 is the apical region, so the part from the lowest point of the blood pool to the lowest point of the left ventricular myocardium is defined as tissue labeled region 17.

[0059] For the right ventricle, since the AHA myocardial segmentation standard does not include the segmentation standard for the right ventricular myocardium, the segmentation rule of the left ventricle is used, and it is divided into three sections according to the length of the right ventricle: upper, middle and lower. The corresponding labels of areas 1 to 3 in the upper section are modified to areas 21 to 23. Similarly, the middle section is areas 24 to 26, and the lower section is areas 27 to 29. The right ventricular apex area, that is, the part from the lowest point of the right ventricular blood pool to the lowest point of the right ventricular myocardium is defined as area 30.

[0060] S4, select stimulation sites based on the model;

[0061] S41, merging the partitioned images and mapping them to the model;

[0062] The image of the 17 left ventricular myocardium segments and the image of the 10 right ventricular myocardium segments are merged into one image, recorded as the newLabel image, and then based on this image, the 17 left ventricular segments and the 10 right ventricular segments are mapped to the ventricular model of the three-dimensional tetrahedral mesh.

[0063] S42, extracting the inner and outer surfaces of each partition of the model;

[0064] In the simulation of a 3D personalized heart model, the stimulation site is usually selected on the inner surface of the model. Therefore, it is necessary to extract the surface of each partition. The steps can be briefly described as follows:

[0065] Three surfaces of the model before mapping are extracted, namely the inner surface of the left ventricle, the inner surface of the right ventricle and the outer surface of the model; and because the mapping of the model is assigned to voxels, it is necessary to extract the surfaces of 17 left ventricle regions and 10 right ventricle regions of the mapped model, and take the intersection of these surfaces with the inner surfaces of the left and right ventricles to finally obtain the inner surfaces of 17 left ventricle regions and 10 right ventricle regions.

[0066] S43, selecting stimulation sites;

[0067] After obtaining the inner surface of each partition, a mean point is calculated based on all the points on the inner surface of a single partition; the distance between the partition surface and the mean point is calculated, and the minimum distance is taken as the stimulation site of the partition, and finally the coordinates of 17 surface stimulation sites on the left ventricle and 10 on the right ventricle are obtained.

[0068] Beneficial effects of the present invention:

[0069] The present invention is a method for automatically selecting myocardial stimulation sites based on the AHA standard, which specifically includes four steps: data preprocessing, finding edge points, myocardial segmentation, and model-based stimulation site selection. The model is divided into myocardial regions based on the AHA standard by the right ventricular edge points at the junction of the left and right ventricles, thereby obtaining a model with myocardial region labels, and then the stimulation sites are selected more conveniently to simulate a personalized three-dimensional heart model, thereby realizing fully automatic division of a three-dimensional heart model that is closer to the AHA standard and automatic selection of stimulation sites. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 The present invention is a flow chart of a method for automatically selecting myocardial stimulation sites based on the AHA standard.

[0071] Figure 2The AHA standard myocardial segment division rules are demonstrated: the basal ring is divided into six segments, namely the anterior wall basal segment (area 1), the anterior septal basal segment (area 2), the inferior septal basal segment (area 3), the inferior wall basal segment (area 4), the inferior lateral wall basal segment (area 5), ​​and the anterior lateral wall basal segment (area 6); the middle ring is divided into six segments, namely the anterior wall middle segment (area 7), the anterior septal middle segment (area 8), the inferior septal middle segment (area 6), the inferior wall middle segment (area 10), the inferior lateral wall middle segment (area 11), and the anterior lateral wall middle segment (area 12); the apical ring is divided into four segments horizontally, namely the anterior wall apical segment (area 13), the septal apical segment (area 14), the inferior wall apical segment (area 15), and the lateral wall apical segment (area 16); finally, the part of the myocardium beyond the end of the cardiac cavity is recorded as the apical cap, that is, the 17th segment.

[0072] Figure 3 It is the process of image preprocessing and the two types of interpolated images obtained.

[0073] Figure 4 The image shows the range of the left and right ventricular blood pools of six groups of edge points and their corresponding layers. The five-pointed star represents the edge of the right ventricle, and the asterisk represents the center of the left and right ventricles. The right ventricular blood pool no longer exists in the 270th layer, so the image only shows the left ventricular blood pool.

[0074] Figure 5 Four slices of the left ventricular upper and middle myocardium image divided into six non-contacting segments that meet the AHA criteria.

[0075] Figure 6 Four layers of the image of the upper and middle left ventricular myocardium, which has been divided into six areas.

[0076] Figure 7 These are two layers of an image of the lower left ventricular myocardium that has been divided into four regions.

[0077] Figure 8 The image shows six slices of the right ventricular myocardium divided into three regions, with the 288th slice being the last slice of the right ventricle.

[0078] Figure 9 These are the four views of the model after mapping, namely top view (a), front view (b), left view (c), and right view (d).

[0079] Figure 10 In the figure, a represents the three surfaces proposed by the initial model, b represents the surface corresponding to a single partition in the mapped model, the dots in c represent the surface stimulation points finally selected, and the dots in d represent the myocardial internal stimulation points finally selected. DETAILED DESCRIPTION

[0080] The following takes a ventricular image of a specific patient as an example to further illustrate the present invention in combination with specific embodiments. Figure 1 As shown, a method for automatically selecting myocardial stimulation sites based on the AHA standard is Figure 2 The AHA standard myocardial segmentation method is demonstrated, including the following steps:

[0081] Step 1: Data preprocessing;

[0082] S11, image preprocessing;

[0083] The patient's LGE-MRI two-dimensional plane image is segmented in a common way to segment the left and right ventricular boundaries and obtain a ventricular myocardial image with specific boundaries. Figure 3 shown.

[0084] S12, obtaining two types of interpolation images by interpolation;

[0085] The interpolation images of the left and right ventricular myocardium are obtained by interpolation of the variational implicit function, and two types of interpolation images are obtained by combining them: the interpolation image of the three-dimensional personalized heart model (Label image, with a resolution set to 0.35mm) and the interpolation image of the left and right ventricles (Label_classified image). The specific images are as follows: Figure 3 The interpolated image of the heart model is used to determine the longitudinal length of the model in the subsequent steps, and to determine the range of the ventricular blood pool and its edge points. Since the heart model does not have a front-back, left-right position relationship after being converted into an image, it is necessary to use the interpolated image of the left and right ventricles to distinguish the left and right ventricles in the model image. The pixel value of the left ventricular myocardium is set to 255, and the pixel value of the right ventricular myocardium is set to 32. Figure 3 In the interpolated image that separates the left and right ventricles, the brighter myocardium is the left ventricular myocardium, and the slightly darker myocardium is the right ventricular myocardium.

[0086] Step 2: Find edge points;

[0087] In the AHA myocardial segment standard, the segmentation of the myocardial part is determined based on the intersection of the right ventricular endocardium and the left ventricular endocardium, that is, the two edge points of the right ventricular blood pool. Therefore, if the myocardial segments are to be classified according to the standard, the two edge points of the right ventricular blood pool need to be found first.

[0088] S21. determining the longitudinal lengths of the left and right blood pools in the model, i.e., the z-axis lengths;

[0089] This step is divided into 5 steps:

[0090] (1) Read the label image and convert it into a binary image with only two pixels, 0 and 1, for subsequent processing;

[0091] (2) Count the number of pixels along the z-axis to obtain the z-axis range of the myocardium. Then compare the number of pixels in the uppermost layer with the number of pixels in the lowermost layer to determine whether the z-axis is positive. If the number of pixels in the uppermost layer is higher than that in the lowermost layer, it means that the z-axis of the model image is reversed. Then flip the image along the z-axis to ensure that the z-axis of the heart base is the highest and the z-axis of the heart apex is the lowest.

[0092] (3) Processing the binarized Label image: To separate the blood pool, the background and myocardial parts are inverted (i.e., the pixel value of the myocardial part is set to 0, and the pixel value of the blood pool and the background outside the myocardium is set to 1). Then, the part outside the z-axis range is set to 0 to obtain the Label_invert image.

[0093] (4) Calculate the three-dimensional connected domain of the Label_invert image and obtain the center of mass of the three connected domains and the boundary coordinates of each axis. The connected domains are the background, the left ventricular blood pool, and the right ventricular blood pool.

[0094] (5) Remove the connected domain with the lowest z-axis boundary in the Label_invert image (i.e., remove the background part of the extramyocardial area) to obtain the Label_invert_nobackground image. The only two connected domains left in this image are the left and right ventricular blood pools. The connected domain with the lower z-axis boundary is the left ventricular blood pool, and the other is the right ventricular blood pool. The upper and lower z-axis boundaries of the two blood pools are the corresponding z-axis lengths.

[0095] S22, determining the position of the edge point;

[0096] The operation is performed on each layer of the Label_invert_nobackground image, starting from the bottom layer of the heart and ending at the apex layer of the right ventricle. The loop steps are as follows:

[0097] (1) Take the two-dimensional image of the layer and record it as Tempimage;

[0098] (2) Find the connected domain of the Tempimage image and obtain the centroid, circularity and coordinates of the two connected domains (corresponding to the left and right ventricular blood pools), as follows: Figure 4 The asterisks in the figure show the center points of 6 layers. There is only one center point in layer 270 because the right ventricular blood pool no longer exists.

[0099] (3) According to the circularity, the left and right ventricular blood pools are separated. The connected domain with a circularity close to 1 is recorded as the left ventricle, and the connected domain with a small circularity is recorded as the right ventricle. The angle RV_angle of the line connecting the center of mass of the left and right ventricles is calculated.

[0100] (4) Perform Harris corner detection on the right ventricle in the Tempimage to obtain the ten corner points with the highest corner response values. The number of corner points can be adjusted according to the actual situation so that the corner points found can include edge points on both sides. If the number is too small, only edge points on one side will be found, which will affect the subsequent process.

[0101] (5) Calculate the R value of the ten corner points obtained. The R value formula is as follows:

[0102] R=0.7*|xx C |+0.3*|yy C |

[0103] Among them, x C and y C are the x- and y-axis coordinates of the centroid of the right ventricular blood pool in this layer, respectively, where x represents the horizontal axis and y represents the vertical axis;

[0104] (6) Sort the R values, set the point with the largest R value as one of the edge points, record it as edge point 1, calculate the angle between it and the center point of the left ventricle, record it as point1_angle, then judge the angle of the remaining corner points in descending order of R value, record the angle between it and the center point of the left ventricle as point2_angle, and make the following judgment:

[0105] (point1_angle-RV_angle)*(point2_angle-RV_angle))>0

[0106] Where RV_angle is the angle of the line connecting the left and right ventricular centroids obtained by (3) in the S22 step loop. The meaning of the above formula is to determine whether the two edge points are on the same side. If the formula is true, it means that the point and the previously obtained edge point 1 are on the same side of the right ventricle, and are not the required edge point 2. Then continue to determine the next corner point until the formula is not true.

[0107] Additionally, two conditions are added to the edge point search loop to allow for early exit of the loop to accommodate heart models with unusual right ventricle shapes or lengths. The conditions are as follows:

[0108] Condition 1: When the horizontal distance between the edge point of this layer and the edge point of the previous layer is greater than a fixed value, the loop is exited;

[0109] Condition 2: When the angle between the line connecting the two edge points of the current layer and the centroid of the left ventricular blood pool is less than a fixed value, the loop is exited;

[0110] When two edge points in the program meet one of the above conditions, the program will jump out of the loop, and the edge points of the remaining layers will inherit the coordinates of the edge points in the previous loop to ensure the uniformity and continuity of the myocardial segmentation.

[0111] Figure 4 The image shows the range of the left and right ventricular blood pools of six groups of edge points and their corresponding layers. The five-pointed star represents the edge point of the right ventricle, and the asterisk represents the center point of the left and right ventricles. The right ventricular blood pool no longer exists in the 270th layer, so the image only shows the left ventricular blood pool.

[0112] Step 3: Divide the myocardial segments based on the edge points;

[0113] As mentioned above, the myocardial segmentation according to the AHA standard is based on the left and right ventricular junction edge points finally obtained in step S2. The left and right ventricles must first be divided into three segments with an integer number of layers (rounded up) according to their height. The part with the largest z-axis is defined as the upper segment, the part in the middle of the z-axis is defined as the middle segment, and the part with the smallest z-axis is defined as the lower segment. The left and right ventricles are then divided into angular segments based on the line connecting the edge points and the center points of the left and right ventricles. The allocation standard based on the AHA standard is only the line connecting the two right ventricular edge points to the center point of the left ventricular blood pool. Therefore, the allocation method of the lower segment and the upper middle segment of the left ventricle is different. Due to the difference in the structure of the left and right ventricular muscles, the division method is also different. Finally, the ventricular length is proportionally divided longitudinally, and 17 segments of the left ventricular myocardium and 10 segments of the right ventricular myocardium are finally obtained.

[0114] S31, obtaining the center points of each layer of the left and right ventricles;

[0115] First, the interpolation image (Label_classified image) obtained in the preprocessing process is thresholded, and the part with a pixel value of 255 in the image is extracted as an image of only the left ventricular myocardium, and the part with a pixel value of 32 is extracted as an image of only the right ventricular myocardium.

[0116] Then, the connected domain of each layer of the Label_invert_nobackground image obtained in step S21 is calculated. If there is a layer of right ventricular blood pool, two connected domains representing the left and right ventricular blood pools will be obtained. The circularity is then used to determine which side of the blood pool it is. Since the left ventricle of a normal patient is closer to a circle and the right ventricle is usually semicircular, the part with a large circularity close to 1 will be judged as the left ventricular blood pool, and the part with a small circularity will be judged as the right ventricular blood pool, thereby obtaining the centroid of the left and right ventricular blood pools of the corresponding layer; when the right ventricular blood pool does not exist, the connected domain can be directly calculated to obtain the centroid of the left ventricular blood pool.

[0117] S32. Myocardial segmentation of the left ventricle;

[0118] Previously, two sets of edge points from the heart base to the right ventricular apex layer were obtained in step S2, and the center point of each layer of the left ventricular blood pool was obtained in step S31. Based on these three sets of points, the myocardial segment of the upper and middle sections of the left ventricle is divided as follows:

[0119] (1) Calculate the angles of the straight line formed by the two edge points and the left ventricular blood pool in each layer in the polar coordinate system, then take the average of the two angles and record the three angles as angle 1, angle 2, and angle 3;

[0120] (2) The three angles are converted into the slopes of straight lines in the rectangular coordinate system. The slope of angle 1 corresponds to k1, the slope of angle 2 corresponds to k2, and the slope of angle 3 corresponds to k3. The intercept is obtained by substituting the left ventricular center point. The formula is as follows, thus obtaining three segmentation lines;

[0121] b1=y0-k1x0

[0122] b2=y0-k2x0

[0123] b3=y0-k3x0

[0124] Wherein, k1, k2, and k3 are the slopes of the three straight lines, b1, b2, and b3 are the intercepts of the three straight lines, y0 is the vertical axis (y-axis) coordinate of the center point of the left ventricle, and x0 is the horizontal axis (x-axis) coordinate of the center point of the left ventricle;

[0125] (3) The left ventricular myocardial points whose distance from the three straight lines is less than a fixed value a are selected. This fixed value is the initial value of the segmentation line width, which can be adjusted according to the subsequent distribution of the connected domain. When the value is too small, it will affect the partitioning of step (6), but when the value is too large, it will increase the time consumption of the myocardial segment segmentation step. Due to the uniqueness of the personalized heart model, the shape of each heart model is different, which may cause the value of the fixed value a to be unsuitable for a specific model. Therefore, the segmentation line width is set to a value that gradually increases from a relatively small fixed value a; the initial value of the fixed value a can be set to 2.

[0126] (4) Create a null image of the same size as the label image, and assign 1 to the pixels with the same horizontal and vertical coordinates as the left ventricular myocardial points obtained in (3). This new image is converted into a binary image, which only records the left ventricular myocardial points whose distance from the three straight lines is less than a fixed value a. This image is called edge_label, which is used to indicate the intersection range of the three straight lines and the left ventricular myocardium.

[0127] (5) The image of only the left ventricular myocardium obtained in step S31 is processed, and the portion of the image that overlaps with the edge_label image is directly set to 0. In layman's terms, the straight line portion is erased, so that the left ventricular myocardium is divided into 6 non-contacting segments that meet the AHA standard. This image is recorded as noedge_label; Figure 5 Four slices of the left ventricular upper and middle myocardium image, which has been divided into six non-contacting segments that meet the AHA criteria, are shown;

[0128] (6) Calculate the three-dimensional connected domain of the noedge_label image. Normally, six connected domains should be obtained in the segmentation of the upper and middle myocardium. If the number of connected domains is insufficient, increase the constant a in step (3), and then repeat steps (3) to (6) until the number of connected domains becomes 6 or the constant a exceeds the set range. The same method is used to calculate the three-dimensional connected domain of edge_label until six connected domains are obtained.

[0129] (7) Connect the center points of the six connected domains of the two images with the center point of the left ventricle to obtain their corresponding polar coordinate angles. Then, the angle of the line connecting the left and right ventricles is used as a reference to allocate the six segments. The six connected domains are recorded as region 2, region 1, region 6, region 5, region 4, and region 3 in a counterclockwise order. This allocation order cannot be changed, otherwise it will affect the longitudinal division in step S35.

[0130] (8) Finally, the noedge_label image and the edge_label image of the classified connected domain are put together to obtain the left ventricular upper and middle myocardial image classified into six regions; Figure 6 Four slices of the left ventricular upper and middle myocardium image, which has been divided into six segments according to the AHA criteria, are shown;

[0131] S33, myocardial segmentation of the lower left ventricle;

[0132] The myocardial segmentation of the lower left ventricle is essentially the same as that of the upper and middle segments. It is also based on the two sets of edge points from the heart base to the right ventricular apex layer and the center point of each layer of the left ventricular blood pool obtained in the previous step to divide the myocardial segment of the lower left ventricle. Only the allocation method of the myocardial segments is slightly different.

[0133] Only two straight lines are needed to segment the lower segment of the left ventricle, namely the lines connecting the two right ventricular edge points to the center point of the left ventricular blood pool, and the number of allocated regions is only 4. The final allocation method is to first connect the center points of the four connected domains with the center point of the left ventricle to obtain their corresponding polar coordinate angles. The connected domain closest to the angle corresponding to the line connecting the left and right ventricles is region 2, and then the remaining three segments are allocated as regions 1, 4, and 3 in a counterclockwise order. This allocation order cannot be changed, otherwise it will affect the longitudinal division in step S35. Finally, an image of the lower segment of the left ventricle is obtained, which is classified into four regions. Figure 7 Two layers of an image of the lower left ventricular myocardium divided into four regions are shown;

[0134] S34, myocardial segmentation of the right ventricle;

[0135] The steps for segmenting the right ventricle's myocardial segments are the same as those for the left ventricle. Angles are calculated using the right ventricle center point obtained in step S31 and the two sets of edge points from the heart base to the right ventricle apex layer obtained in step S2. Lines are then drawn based on the angles. However, in the steps for the right ventricle, rays with the right ventricle center point as the starting point are not used as straight lines. The intersection of the rays and the myocardium is also obtained, and then divided into two images. The regions are then classified and finally merged into a right ventricle myocardial image classified into three regions. Figure 8 An image of the right ventricular myocardium divided into three regions shows four layers;

[0136] S35, longitudinal division based on ventricular length;

[0137] For the left ventricle, the left ventricle length is divided into three segments with an integer number of layers (rounded up). The part with the largest z-axis is defined as the upper segment, the part in the middle of the z-axis is defined as the middle segment, and the part with the smallest z-axis is defined as the lower segment. According to the AHA myocardial segmentation standard, the area of ​​the upper segment of the left ventricle is area 1 to area 6, which is the same as that obtained in the previous step, so no change is made; the area of ​​the middle segment of the left ventricle is area 7 to area 12, so the label of area 1 corresponding to the middle segment is changed to the label of area 7, and the label of area 2 is changed to the label of area 8 , and so on, we can get areas 7 to 12 in the middle section of the left ventricle; and areas 13 to 16 in the lower section of the left ventricle, a total of four areas. The allocation standard is only the line connecting the two right ventricular edge points to the center point of the left ventricular blood pool, that is, area 1 in the lower section corresponds to area 13, area 2 and area 3 correspond to area 14, area 4 corresponds to area 15, and area 5 and area 6 correspond to area 16; and area 17 is the apex area, so the part from the lowest point of the blood pool to the bottom of the left ventricular myocardium is defined as tissue labeled area 17.

[0138] For the right ventricle, since the AHA myocardial segmentation standard does not include the segmentation standard for the right ventricular myocardium, the segmentation rules for the left ventricle are used, and it is divided into three sections according to the length of the right ventricle: upper, middle and lower. The corresponding labels of areas 1 to 3 in the upper section are modified to areas 21 to 23. Similarly, the middle section is areas 24 to 26, and the lower section is areas 27 to 29. The right ventricular apex area, that is, the part from the lowest point of the right ventricular blood pool to the lowest point of the right ventricular myocardium, is defined as area 30.

[0139] Step 4: Select stimulation sites based on the model;

[0140] S41, merging the partitioned images and mapping them to the model;

[0141] The image of the 17 left ventricular myocardium segments and the image of the 10 right ventricular myocardium segments are merged into one image, recorded as the newLabel image. Then, based on this image, the 17 left ventricular segments and the 10 right ventricular segments are mapped to the ventricular model of the 3D tetrahedral mesh. The mapping method is briefly described as follows:

[0142] Calculate the centroid of each tetrahedral mesh in the model, divide the centroid coordinate value by the image resolution and round it down to the nearest integer, and get the corresponding pixel of each mesh in the newLabel image. The pixel label value represents the partition corresponding to this tetrahedral mesh.

[0143] Figure 9 The mapped model is shown.

[0144] S42, extracting the inner and outer surfaces of each partition of the model;

[0145] The three surfaces of the model before mapping are extracted, namely the left ventricular surface, the right ventricular surface and the outer surface of the model. Figure 10 Because the mapping of the model is assigned to voxels, it is necessary to extract the surfaces of 17 left ventricular regions and 10 right ventricular regions of the mapped model. The surface image of a single region is as follows: Figure 10 As shown in middle b, the intersection of these surfaces and the inner surfaces of the left and right ventricles is taken, and finally the inner surfaces of 17 regions of the left ventricle and the inner surfaces of 10 regions of the right ventricle are obtained;

[0146] Since the inner surface of the right ventricle proposed by the original model actually includes the surface of the ventricular septum, the outer surface of the ventricular septum is obtained after removing the inner surfaces of the 10 partitions of the right ventricle in the right ventricular surface. For the 17 partitions of the left ventricle, the outer surface except the corresponding area of ​​the ventricular septum can be obtained by the intersection of the outer surface of the model and the regional surface. The outer surface of the ventricular septum and the corresponding partition can be obtained by taking the intersection of the outer surface of the ventricular septum and the corresponding partition; and the outer surface of the 10 areas of the right ventricle can be obtained by taking the intersection of the regional surface and the outer surface of the model, and finally the outer surfaces of the 17 areas of the left ventricle and the outer surfaces of the 10 areas of the right ventricle are obtained.

[0147] S43, selecting stimulation sites;

[0148] After obtaining the inner surface of each partition, a mean point is calculated based on all the points on the inner surface of a single partition (its coordinates are the average of the x-axis coordinates, y-axis coordinates, and z-axis coordinates of all the points on the surface). Since the model is a three-dimensional model, the mean point is not on the model surface in most cases. Therefore, it is necessary to calculate the distance between the partition surface and the mean point, and take the minimum distance as the stimulation site for the partition. Finally, the coordinates of 17 surface stimulation sites for the left ventricle and 10 for the right ventricle are obtained. Figure 10 Surface stimulation points in segment 1 are shown in center c.

[0149] In the personalized 3D heart model, the model is three-dimensional, and its internal points can also be selected as stimulation sites. First, based on the points on the outer surface of the corresponding partition, the point closest to the inner surface stimulation site is calculated. Then, half of these two points are taken. Since this point may not have a corresponding point in the three-dimensional grid, it is necessary to find the point with the smallest distance to this point and use it as the internal stimulation point of the current partition. Finally, the coordinates of 17 internal stimulation sites in the left ventricle and 10 internal stimulation sites in the right ventricle are obtained. Figure 10 Middle d shows the internal stimulation point of segment 1.

Claims

1. A method for automatically selecting myocardial stimulation sites based on the AHA standard, characterized in that: The steps are as follows: S1, data preprocessing; S11, image preprocessing; Segment the LGE-MRI two-dimensional planar image of the heart to separate the left and right ventricle boundaries; S12, obtaining two types of interpolation images by interpolation; The interpolated images of the left and right myocardium are obtained by interpolation of the variational implicit function, and two types of interpolated images are obtained by combining them: the interpolated image of the three-dimensional heart model is called the Label image, and the interpolated image of the left and right ventricles is called the Label_classified image; in the Label_classified image, the pixel values ​​of the left and right ventricular myocardium are set to be unequal; S2, find edge points; S21. determining the z-axis lengths of the left and right blood pools in the three-dimensional heart model; (1) Read the Label image and binarize the image; (2) Count the number of pixels along the z-axis to obtain the z-axis range of the myocardium. Then compare the number of pixels in the uppermost layer with the number of pixels in the lowermost layer to determine whether the z-axis is positive. If the z-axis is inverted, flip the image along the z-axis to ensure that the z-axis of the heart base is the highest and the z-axis of the heart apex is the lowest. (3) First, invert the background and myocardial parts, and then set the part outside the z-axis range to 0 to obtain the Label_invert image; (4) Find the three-dimensional connected domain of the Label_invert image and obtain the center of mass of the three connected domains and the boundary coordinates of each axis; (5) Remove the connected domain with the lowest z-axis boundary in the Label_invert image to obtain the Label_invert_nobackground image. The z-axis boundaries of the only two connected domains in this image are the z-axis lengths of the left and right blood pools. S22, determining the position of the edge point; The operation is performed on each layer of the Label_invert_nobackground image, starting from the bottom layer of the heart and ending at the apex layer of the right ventricle. The loop steps are as follows: (1) Take the two-dimensional image of the layer and record it as Tempimage; (2) Find the connected domain of the Tempimage image and obtain the centroid, circularity and coordinates of the two connected domains; (3) According to the degree of circularity, the left and right ventricular blood pools are separated. The connected area with small circularity is recorded as the right ventricle, and the angle RV_angle of the line connecting the left and right ventricular centers of mass is calculated; (4) Perform Harris corner detection on the right ventricle in Tempimage to obtain n corner points with the highest corner response values; (5) Calculate the R value of the obtained n corner points. The R value formula is as follows: R=0.7*|x-x C |+0.3*|y-y C | Among them, x and y represent the horizontal and vertical coordinates of the corner point; C and y C are the x- and y-axis coordinates of the centroid of the right ventricular blood pool in this layer, respectively; (6) Sort the R values, set the point with the largest R value as one of the edge points, record it as edge point 1, calculate the angle between it and the center point of the left ventricle, record it as point1_angle, then judge the angle of the remaining corner points in descending order of R value, record the angle between it and the center point of the left ventricle as point2_angle, and make the following judgment: (point1_angle-RV_angle)*(point2_angle-RV_angle)>0 If the above equation is true, it means that the point and the previously obtained edge point 1 are on the same side of the right ventricle, and are not the desired edge point 2. Then continue to determine the next corner point until the above equation is not true; S3. Divide the myocardial segments based on the edge points; S31, obtaining the center points of each layer of the left and right ventricles; First, perform threshold processing on the Label_classified image obtained in the S1 preprocessing process, and extract the image of the left ventricular myocardium and the image of the right ventricular myocardium based on the pixels in the image; Then, for the Label_invert_nobackground image obtained in S21, the connected domain of each layer is calculated. If the right ventricular blood pool exists in the layer, two connected domains representing the left and right ventricular blood pools are obtained. The circularity is then used to determine which side of the blood pool it belongs to. The part with a larger circularity is determined to be the left ventricular blood pool, thereby obtaining the centroid of the left and right ventricular blood pools of the corresponding layer. If the right ventricular blood pool does not exist, the connected domain is directly calculated to obtain the centroid of the left ventricular blood pool. The distance between the centroids of the upper and lower layers of the left ventricle cannot be too far. When their x- and y-axis coordinates satisfy the following conditions, the two centroids of this layer are swapped to ensure the accuracy of the left and right ventricle center points. <h2 style=";text-align:left;direction:ltr">(x2-x1)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +(y2-y1)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> >50 Among them, x2 and y2 are the x-axis and y-axis coordinates of the lower layer's centroid, and x1 and y1 are the x-axis and y-axis coordinates of the upper layer's centroid; S32, myocardial segmentation of the upper and middle parts of the left ventricle; (1) Calculate the angles of the straight line formed by the two edge points and the left ventricular blood pool in each layer in the polar coordinate system, then take the average of the two angles and record the three angles as angle 1, angle 2, and angle 3; (2) The three angles are converted into the slopes of straight lines in a rectangular coordinate system, and the intercepts are obtained by substituting the left ventricular center point into the slopes, thereby obtaining three segmentation lines; (3) Extract the horizontal and vertical coordinates of the left ventricular myocardium whose distance from the three straight lines is less than a fixed value a. This fixed value is the initial value of the width of the segment; (4) Create a null image of the same size as the label image, and assign 1 to the pixels with the same horizontal and vertical coordinates as those obtained in step (3). This new image is converted into a binary image, denoted as edge_label, which is used to represent the intersection range of the three straight lines and the left ventricular myocardium. (5) The image of only the left ventricular myocardium obtained in step S31 is processed, and the portion of the image that overlaps with the edge_label image is directly set to 0, so that the left ventricular myocardium is divided into 6 non-contacting segments that meet the AHA standard. This image is recorded as noedge_label; (6) Calculate the three-dimensional connected domain of the noedge_label image. Normally, six connected domains should be obtained in the segmentation of the upper and middle myocardium. If the number of connected domains is insufficient, increase the constant a in step (3), and then repeat steps (3) to (6) until the number of connected domains becomes 6, or the constant a exceeds the set range. For edge_label, calculate its three-dimensional connected domain in the same way until six connected domains are obtained. (7) Connect the center points of the six connected domains of the two images with the center point of the left ventricle to obtain their corresponding polar coordinate angles. Then, the angle of the line connecting the left and right ventricles is used as a reference to allocate the six segments. The six connected domains are recorded as region 2, region 1, region 6, region 5, region 4, and region 3 in counterclockwise order. (8) Finally, the noedge_label image and the edge_label image of the classified connected domain are put together to obtain the left ventricular upper and middle myocardial image classified into six regions; S33, myocardial segmentation of the lower left ventricle; The myocardial segmentation of the lower left ventricle is based on the two sets of edge points from the heart base to the right ventricular apex layer obtained in step S2 and the center point of each layer of the left ventricular blood pool obtained in step S31 to divide the myocardial segment of the lower left ventricle; Only two straight lines are needed to segment the lower segment of the left ventricle, namely, the lines connecting the two right ventricular edge points to the center point of the left ventricular blood pool, and the number of allocated regions is only 4. The final allocation method is to first connect the center points of the four connected domains with the center point of the left ventricle to obtain their corresponding polar coordinate angles. The connected domain closest to the angle corresponding to the line connecting the left and right ventricles is region 2. The remaining three segments are then allocated as regions 1, 4, and 3 in a counterclockwise order. This allocation order cannot be changed, otherwise it will affect the longitudinal division in step S35. Finally, an image of the lower segment of the left ventricle is obtained, which is classified into four regions. S34, myocardial segmentation of the right ventricle; The steps for segmenting the right ventricle's myocardium are the same as those for the left ventricle; S35, longitudinal division based on ventricular length; For the left ventricle, the upper middle segment image and the lower segment image must be merged first, and then classified according to the AHA myocardial segmentation standard by dividing the basal ring and the middle ring into six regions and the apical ring into four regions. The regions of the upper left ventricle are regions 1 to 6, which are the same as the six regions obtained in step S32 and are not changed; the regions of the middle left ventricle are regions 7 to 12, so the label of region 1 corresponding to the middle part is modified to the label of region 7, and the label of region 2 is modified to the label of region 8. Similarly, regions 7 to 12 of the middle left ventricle can be obtained; and the lower left ventricle is regions 13 to 16, a total of four regions, and the allocation standard is only the line connecting the two right ventricular edge points to the center point of the left ventricular blood pool, that is, region 1 of the lower segment corresponds to region 13, region 2 corresponds to region 14, region 3 corresponds to region 15, and region 4 corresponds to region 16; and region 17 is the apical region, so the part from the lowest point of the blood pool to the lowest point of the left ventricular myocardium is defined as tissue labeled region 17; For the right ventricle, since the AHA myocardial segmentation standards do not include segmentation standards for the right ventricle, the segmentation rules for the left ventricle are used. The right ventricle is divided into three segments according to its length: upper, middle and lower. The labels of areas 1 to 3 in the upper segment are changed to areas 21 to 23. Similarly, the labels of areas 24 to 26 in the middle segment and areas 27 to 29 in the lower segment are changed. The right ventricular apex area, that is, the area from the lowest point of the right ventricular blood pool to the lowest point of the right ventricular myocardium, is defined as area 30. S4, select stimulation sites based on the model; S41, merging the partitioned images and mapping them to the model; The image of the 17 segments of the left ventricular myocardium and the image of the 10 segments of the right ventricular myocardium are merged into one image, recorded as the newLabel image, and then based on this image, the 17 segments of the left ventricle and the 10 segments of the right ventricle are mapped to the ventricular model of the three-dimensional tetrahedral mesh; S42, extracting the inner and outer surfaces of each partition of the model; Three surfaces were extracted from the model before mapping: the inner surface of the left ventricle, the inner surface of the right ventricle, and the outer surface of the model. The surfaces of 17 left ventricle regions and 10 right ventricle regions of the mapped model were then extracted. The intersection of these surfaces with the inner surfaces of the left and right ventricles was taken to obtain the inner surfaces of 17 left ventricle regions and 10 right ventricle regions. S43, selecting stimulation sites; After obtaining the inner surface of each partition, a mean point is calculated based on all the points on the inner surface of a single partition; the distance between the partition surface and the mean point is calculated, and the minimum distance is taken as the stimulation site of the partition, and finally the coordinates of 17 surface stimulation sites on the left ventricle and 10 on the right ventricle are obtained.

2. The method for automatically selecting myocardial stimulation sites based on the AHA standard according to claim 1, characterized in that: In S22, two conditions for prematurely exiting the loop are added to the edge point search loop to cope with individual heart models with unusual right ventricle shapes or lengths. The conditions are as follows: Condition 1: When the horizontal distance between the edge point of the current layer and the edge point of the previous layer is greater than the distance threshold, the loop is exited; Condition 2: When the angle between the line connecting the two edge points of the current layer and the centroid of the left ventricular blood pool is less than the angle threshold, the loop is exited; When two edge points meet one of the above conditions, the loop is exited, and the edge points of the remaining layers inherit the edge point coordinates in the previous loop to ensure the uniformity and continuity of the myocardial segmentation.

3. The method for automatically selecting myocardial stimulation sites based on the AHA standard according to claim 1, characterized in that: S34 is specifically as follows: Angles are calculated using the right ventricle center point obtained in step S31 and two sets of edge points from the heart base to the right ventricle apex layer obtained in step S2, and lines are drawn based on the angles. However, in the right ventricle step, a ray with the right ventricle center point as the initial point is used instead of a straight line, and the intersection of the ray and the myocardium is obtained, which is then divided into two images, and the areas are classified using angles, and finally merged into a right ventricle myocardial image classified into three areas.

4. The method for automatically selecting myocardial stimulation sites based on the AHA standard according to claim 1, characterized in that: The mapping method in S41 is as follows: calculate the centroid of each tetrahedral mesh in the model, divide the centroid coordinate value by the image resolution and round it down to the nearest integer, and obtain the corresponding pixel of each mesh in the newLabel image. The pixel label value represents the partition corresponding to the tetrahedral mesh.