Commit 83eaa7571bcac46e09bc84f78a7675748d720d79
1 parent
10ef6cb7
Exists in
master
and in
68 other branches
ADD: Measures class to be used in project
Showing
1 changed file
with
20 additions
and
7 deletions
Show diff stats
invesalius/data/measures.py
... | ... | @@ -6,17 +6,30 @@ |
6 | 6 | # its graphical representation of the data to maintain interactive |
7 | 7 | # performance. |
8 | 8 | |
9 | -import wx | |
10 | -import sys | |
11 | -import os | |
12 | -import time | |
13 | -import math | |
14 | 9 | |
15 | 10 | from itertools import cycle |
16 | -from wx.grid import Grid, GridCellBoolRenderer, GridCellBoolEditor, EVT_GRID_CELL_CHANGE | |
11 | +import math | |
12 | +import os | |
13 | +import sys | |
14 | +import time | |
17 | 15 | |
16 | +import wx | |
18 | 17 | import vtk |
19 | -from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractor | |
18 | + | |
19 | +import constants as const | |
20 | + | |
21 | +class Measurement(): | |
22 | + general_index = -1 | |
23 | + def __init__(self): | |
24 | + Measurement.general_index += 1 | |
25 | + self.index = Surface.general_index | |
26 | + self.name = const.MEASURE_NAME_PATTERN %(self.index+1) | |
27 | + self.colour = const.DEFAULT_MEASURE_COLOUR | |
28 | + self.value = None | |
29 | + self.location = const.SURFACE # AXIAL, CORONAL, SAGITTAL | |
30 | + self.type = const.LINEAR # ANGULAR | |
31 | + self.points = [] | |
32 | + self.is_shown = False | |
20 | 33 | |
21 | 34 | class CirclePointRepresentation(object): |
22 | 35 | """ | ... | ... |