Commit 28e7e30b92b0010306f7867ef4c78f1def781497
1 parent
38aaa6ad
Exists in
master
and in
6 other branches
FIX: Open angular measure from inv3
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
invesalius/data/measures.py
@@ -39,18 +39,24 @@ class MeasurementManager(object): | @@ -39,18 +39,24 @@ class MeasurementManager(object): | ||
39 | 39 | ||
40 | 40 | ||
41 | def _load_measurements(self, pubsub_evt): | 41 | def _load_measurements(self, pubsub_evt): |
42 | + print "_load_measurements" | ||
42 | dict = pubsub_evt.data | 43 | dict = pubsub_evt.data |
43 | for i in dict: | 44 | for i in dict: |
44 | m = dict[i] | 45 | m = dict[i] |
46 | + print "m:", m.name | ||
45 | if m.type == const.LINEAR: | 47 | if m.type == const.LINEAR: |
48 | + print "linear" | ||
46 | mr = LinearMeasure(m.colour) | 49 | mr = LinearMeasure(m.colour) |
47 | else: | 50 | else: |
51 | + print "angular" | ||
48 | mr = AngularMeasure(m.colour) | 52 | mr = AngularMeasure(m.colour) |
49 | self.current = (m, mr) | 53 | self.current = (m, mr) |
50 | self.measures.append(self.current) | 54 | self.measures.append(self.current) |
51 | for point in m.points: | 55 | for point in m.points: |
56 | + print "point:", point | ||
52 | x, y, z = point | 57 | x, y, z = point |
53 | actors = mr.AddPoint(x, y, z) | 58 | actors = mr.AddPoint(x, y, z) |
59 | + print "actors:", actors | ||
54 | ps.Publisher().sendMessage(("Add actors", m.location), | 60 | ps.Publisher().sendMessage(("Add actors", m.location), |
55 | (actors, m.slice_number)) | 61 | (actors, m.slice_number)) |
56 | self.current = None | 62 | self.current = None |
@@ -87,6 +93,7 @@ class MeasurementManager(object): | @@ -87,6 +93,7 @@ class MeasurementManager(object): | ||
87 | mr = LinearMeasure(m.colour) | 93 | mr = LinearMeasure(m.colour) |
88 | else: | 94 | else: |
89 | mr = AngularMeasure(m.colour) | 95 | mr = AngularMeasure(m.colour) |
96 | + m.type = type | ||
90 | self.current = (m, mr) | 97 | self.current = (m, mr) |
91 | 98 | ||
92 | x, y, z = position | 99 | x, y, z = position |