From 46111ecbdc7714b1671d775ae3405953b431322d Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 18 Jun 2014 09:49:45 -0300 Subject: [PATCH] micro-optimization --- invesalius/data/styles.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 41acb8f..64b90fb 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -42,7 +42,7 @@ ORIENTATIONS = { BRUSH_FOREGROUND=1 BRUSH_BACKGROUND=2 -BRUSH_ERASE=3 +BRUSH_ERASE=0 def get_LUT_value(data, window, level): return np.piecewise(data, @@ -1009,12 +1009,7 @@ class WaterShedInteractorStyle(DefaultInteractorStyle): # Checking if roi_i has at least one element. if roi_m.size: - if operation == BRUSH_FOREGROUND: - roi_m[index] = 1 - elif operation == BRUSH_BACKGROUND: - roi_m[index] = 2 - elif operation == BRUSH_ERASE: - roi_m[index] = 0 + roi_m[index] = operation def expand_watershed(self, pubsub_evt): markers = self.matrix -- libgit2 0.21.2