Skip to content

Commit 555855b

Browse files
feat: Add right atrium appendage landmarks for Rodero 2021 cases (#1202)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent fcf7526 commit 555855b

File tree

5 files changed

+60
-6
lines changed

5 files changed

+60
-6
lines changed

doc/source/changelog/1202.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add right atrium appendage landmarks

examples/preprocessor/compute-atrial-fibers_pr.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,14 @@
104104
# compute left atrium fiber
105105
la = simulator.compute_left_atrial_fiber()
106106

107+
# Import the appendage landmarks.
108+
from ansys.health.heart.pre.database_utils import right_atrium_appendage_landmarks
109+
110+
# Get the right atrium appendage landmark of the first case of Rodero2021.
111+
right_atrium_appendage_coordinates = right_atrium_appendage_landmarks.get("Rodero2021").get(1)
112+
107113
# Appendage apex point should be manually given to compute right atrium fiber
108-
appendage_apex = [39, 29, 98]
109-
ra = simulator.compute_right_atrial_fiber(appendage_apex)
114+
ra = simulator.compute_right_atrial_fiber(appendage=right_atrium_appendage_coordinates)
110115

111116
###############################################################################
112117
# .. note::
@@ -150,8 +155,16 @@
150155
mesh = ra.ctp()
151156
streamlines = mesh.streamlines(vectors="e_l", source_radius=50, n_points=5000)
152157
tubes = streamlines.tube()
153-
plotter.add_mesh(mesh, opacity=0.5, color="white")
154-
plotter.add_mesh(tubes, color="red")
158+
plotter.add_mesh(mesh, opacity=0.5, color="white", label="myocardium")
159+
plotter.add_mesh(tubes, color="red", label="fibers")
160+
plotter.add_mesh(
161+
pv.PolyData(right_atrium_appendage_coordinates),
162+
color="blue",
163+
point_size=20,
164+
render_points_as_spheres=True,
165+
label="right atrium appendage",
166+
)
167+
plotter.add_legend()
155168
plotter.show()
156169

157170
###############################################################################

examples/simulator/ep-mechanics-simulator-fullheart.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,18 @@
101101
###############################################################################
102102
# Compute the fiber orientation
103103
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104+
# Compute the fiber orientation on the entire model.
105+
106+
# Import the appendage landmarks.
107+
from ansys.health.heart.pre.database_utils import right_atrium_appendage_landmarks
108+
109+
# Get the right atrium appendage landmark of the first case of Rodero2021.
110+
right_atrium_appendage_coordinates = right_atrium_appendage_landmarks.get("Rodero2021").get(1)
104111

105112
# Compute fiber orientation in the ventricles and atria.
106113
simulator.compute_fibers()
107114
simulator.compute_left_atrial_fiber()
108-
simulator.compute_right_atrial_fiber(appendage=[39, 29, 98])
115+
simulator.compute_right_atrial_fiber(appendage=right_atrium_appendage_coordinates)
109116

110117
# Switch the atria to active.
111118
simulator.model.left_atrium.fiber = True

examples/simulator/ep-simulator-fullheart_rodero.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
# ~~~~~~~~~~~~~~~~~~~~~~~~~
108108
# Compute fiber orientation and plot the fibers on the entire model.
109109

110+
# Import the appendage landmarks.
111+
from ansys.health.heart.pre.database_utils import right_atrium_appendage_landmarks
112+
113+
# Get the right atrium appendage landmark of the first case of Rodero2021.
114+
right_atrium_appendage_coordinates = right_atrium_appendage_landmarks.get("Rodero2021").get(1)
115+
110116
# Compute ventricular fibers.
111117
simulator.compute_fibers(method="D-RBM")
112118

@@ -116,7 +122,7 @@
116122
simulator.model.right_atrium.fiber = True
117123
simulator.model.left_atrium.fiber = True
118124
simulator.compute_left_atrial_fiber()
119-
simulator.compute_right_atrial_fiber(appendage=[39, 29, 98])
125+
simulator.compute_right_atrial_fiber(appendage=right_atrium_appendage_coordinates)
120126
simulator.model.plot_fibers(n_seed_points=1000)
121127

122128
###############################################################################

src/ansys/health/heart/pre/database_utils.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,3 +627,30 @@ def get_compatible_input(
627627
"Superior vena cava inlet": 16,
628628
"Inferior vena cava inlet": 17,
629629
}
630+
631+
# Rodero2021 left atrial appendage landmarks. These landmarks are used as input
632+
# to compute the fibers on the left atrium.
633+
right_atrium_appendage_landmarks = {
634+
"Rodero2021": {
635+
1: [39, 29, 98],
636+
2: [37, 41, 103],
637+
3: [39, 60, 99],
638+
4: [33, 34, 102],
639+
5: [25, 44, 91],
640+
6: [26, 36, 86],
641+
7: [33, 28, 91],
642+
8: [35, 39, 94],
643+
9: [39, 27, 100],
644+
10: [33, 36, 96],
645+
11: [30, 50, 91],
646+
12: [28, 42, 93],
647+
13: [27, 46, 89],
648+
14: [44, 23, 101],
649+
15: [37, 32, 88],
650+
16: [36, 39, 98],
651+
17: [28, 30, 94],
652+
18: [26, 30, 83],
653+
19: [39, 33, 88],
654+
20: [32, 38, 95],
655+
}
656+
}

0 commit comments

Comments
 (0)