|
1 | 1 | #!/usr/bin/env python |
2 | 2 | """ |
3 | | -In this example we create the bull eye representation for the left ventricle |
4 | | -according to the American Heart Association (AHA) |
| 3 | +This example demonstrates how to create the 17 segment model for the left |
| 4 | +ventricle recommended by the American Heart Association (AHA). |
5 | 5 | """ |
6 | 6 |
|
7 | 7 | import numpy as np |
8 | 8 | import matplotlib as mpl |
9 | 9 | import matplotlib.pyplot as plt |
10 | 10 |
|
11 | 11 |
|
12 | | -def bulleye_plot(data, ax, vlim=None, segBold=[]): |
| 12 | +def bullseye_plot(ax, data, vlim=None, segBold=[]): |
13 | 13 | """ |
14 | | - Left Ventricle bull eye for the Left Ventricle according to the |
15 | | - American Heart Association (AHA) |
| 14 | + Bullseye representation for the left ventricle. |
| 15 | +
|
| 16 | + Parameters |
| 17 | + ---------- |
| 18 | + ax : axes |
| 19 | + data : list of int and float |
| 20 | + The intensity values for each of the 17 segments |
| 21 | + vlim : [min, max] or None |
| 22 | + Optional argument to set the Intensity range |
| 23 | + segBold: list of int |
| 24 | + A list with the segments to highlight |
| 25 | +
|
| 26 | +
|
| 27 | + Notes |
| 28 | + ----- |
| 29 | + This function create the 17 segment model for the left ventricle according |
| 30 | + to the American Heart Association (AHA) [1]_ |
| 31 | +
|
| 32 | + References |
| 33 | + ---------- |
| 34 | + .. [1] M. D. Cerqueira, N. J. Weissman, V. Dilsizian, A. K. Jacobs, |
| 35 | + S. Kaul, W. K. Laskey, D. J. Pennell, J. A. Rumberger, T. Ryan, |
| 36 | + and M. S. Verani, “Standardized myocardial segmentation and nomenclature |
| 37 | + for tomographic imaging of the heart,” Circulation, vol. 105, no. 4, |
| 38 | + pp. 539–542, 2002. |
16 | 39 | """ |
17 | 40 |
|
18 | 41 | linewidth = 2 |
@@ -101,13 +124,13 @@ def bulleye_plot(data, ax, vlim=None, segBold=[]): |
101 | 124 |
|
102 | 125 | fig, ax = plt.subplots(figsize=(12, 8), nrows=1, ncols=2, |
103 | 126 | subplot_kw=dict(projection='polar')) |
104 | | -fig.canvas.set_window_title('Left Ventricle Bull Eyes (AHA)') |
| 127 | +fig.canvas.set_window_title('Left Ventricle Bulls Eyes (AHA)') |
105 | 128 |
|
106 | | -bulleye_plot(data, ax[0], vlim=vlim) |
107 | | -ax[0].set_title('Bull Eye (AHA)') |
| 129 | +bullseye_plot(ax[0], data, vlim=vlim) |
| 130 | +ax[0].set_title('Bulls Eye (AHA)') |
108 | 131 |
|
109 | | -bulleye_plot(data, ax[1], segBold=[3,5,6,11,12,16], |
110 | | - vlim=vlim) |
| 132 | +bullseye_plot(ax[1], data, segBold=[3, 5, 6, 11, 12, 16], |
| 133 | + vlim=vlim) |
111 | 134 | ax[1].set_title('Segments [3,5,6,11,12,16] in bold') |
112 | 135 |
|
113 | 136 |
|
|
0 commit comments