|
16 | 16 |
|
17 | 17 | from plotpy.config import _ |
18 | 18 |
|
19 | | -# TODO: Move here other constants from around the codebase |
| 19 | +# =============================================================================== |
| 20 | +# Plot types |
| 21 | +# =============================================================================== |
20 | 22 |
|
21 | 23 |
|
22 | 24 | class PlotType(enum.Enum): |
@@ -44,13 +46,42 @@ class PlotType(enum.Enum): |
44 | 46 | MANUAL = 4 |
45 | 47 |
|
46 | 48 |
|
| 49 | +# =============================================================================== |
| 50 | +# Plot parameters |
| 51 | +# =============================================================================== |
| 52 | + |
47 | 53 | PARAMETERS_TITLE_ICON = { |
48 | 54 | "grid": (_("Grid..."), "grid.png"), |
49 | 55 | "axes": (_("Axes style..."), "axes.png"), |
50 | 56 | "item": (_("Parameters..."), "settings.png"), |
51 | 57 | } |
52 | 58 |
|
53 | 59 |
|
| 60 | +# =============================================================================== |
| 61 | +# Panels |
| 62 | +# =============================================================================== |
| 63 | + |
| 64 | +#: ID of the `item list` panel |
| 65 | +ID_ITEMLIST = "itemlist" |
| 66 | +#: ID of the `contrast adjustment` panel |
| 67 | +ID_CONTRAST = "contrast" |
| 68 | +#: ID of the `X-axis cross section` panel |
| 69 | +ID_XCS = "x_cross_section" |
| 70 | +#: ID of the `Y-axis cross section` panel |
| 71 | +ID_YCS = "y_cross_section" |
| 72 | +#: ID of the `oblique averaged cross section` panel |
| 73 | +ID_OCS = "oblique_cross_section" |
| 74 | + |
| 75 | + |
| 76 | +# =============================================================================== |
| 77 | +# Plot items |
| 78 | +# =============================================================================== |
| 79 | + |
| 80 | +# Shape Z offset used when adding shapes to the plot |
| 81 | +SHAPE_Z_OFFSET = 1000 |
| 82 | + |
| 83 | + |
| 84 | +# Lookup table alpha functions for image items |
54 | 85 | class LUTAlpha(enum.Enum): |
55 | 86 | """LUT Alpha functions""" |
56 | 87 |
|
@@ -86,3 +117,8 @@ def get_choices(self): |
86 | 117 | (LUTAlpha.SIGMOID.value, _("Sigmoid")), |
87 | 118 | (LUTAlpha.TANH.value, _("Hyperbolic tangent")), |
88 | 119 | ] |
| 120 | + |
| 121 | + |
| 122 | +# Lookup table size |
| 123 | +LUT_SIZE = 1024 |
| 124 | +LUT_MAX = float(LUT_SIZE - 1) |
0 commit comments