Commit 37fb3800a6e8fa29a3cc8c0b736159c4b083938f
1 parent
4be9f33f
Exists in
master
FIX: when changing mask the edition threshold was set to global threshold
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
invesalius/data/slice_.py
@@ -459,6 +459,8 @@ class Slice(with_metaclass(utils.Singleton, object)): | @@ -459,6 +459,8 @@ class Slice(with_metaclass(utils.Singleton, object)): | ||
459 | image = self.buffer_slices[orientation].image | 459 | image = self.buffer_slices[orientation].image |
460 | thresh_min, thresh_max = self.current_mask.edition_threshold_range | 460 | thresh_min, thresh_max = self.current_mask.edition_threshold_range |
461 | 461 | ||
462 | + print("Threshold", thresh_min, thresh_max) | ||
463 | + | ||
462 | if hasattr(position, '__iter__'): | 464 | if hasattr(position, '__iter__'): |
463 | px, py = position | 465 | px, py = position |
464 | if orientation == 'AXIAL': | 466 | if orientation == 'AXIAL': |
@@ -922,7 +924,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | @@ -922,7 +924,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | ||
922 | proj.mask_dict[index].on_show() | 924 | proj.mask_dict[index].on_show() |
923 | 925 | ||
924 | if value: | 926 | if value: |
925 | - threshold_range = proj.mask_dict[index].threshold_range | 927 | + threshold_range = proj.mask_dict[index].edition_threshold_range |
926 | Publisher.sendMessage('Set edition threshold gui', threshold_range=threshold_range) | 928 | Publisher.sendMessage('Set edition threshold gui', threshold_range=threshold_range) |
927 | 929 | ||
928 | if (index == self.current_mask.index): | 930 | if (index == self.current_mask.index): |