Commit 4bcd447b2e3a87eaacfdb6047f2e8f8902421aa0
1 parent
59567274
Exists in
master
and in
68 other branches
FIX: Colour used in erase imagedata during edition
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
invesalius/data/slice_.py
... | ... | @@ -372,7 +372,7 @@ class Slice(object): |
372 | 372 | """ |
373 | 373 | x, y, z = position |
374 | 374 | imagedata = self.current_mask.imagedata |
375 | - colour = imagedata.GetScalarRange()[0]# - 1 # Important to effect erase | |
375 | + colour = self.imagedata.GetScalarRange()[0]# - 1 # Important to effect erase | |
376 | 376 | imagedata.SetScalarComponentFromDouble(x, y, z, 0, colour) |
377 | 377 | imagedata.Update() |
378 | 378 | |
... | ... | @@ -382,7 +382,7 @@ class Slice(object): |
382 | 382 | """ |
383 | 383 | imagedata = self.current_mask.imagedata |
384 | 384 | if colour is None: |
385 | - colour = imagedata.GetScalarRange()[1] | |
385 | + colour = self.imagedata.GetScalarRange()[1] | |
386 | 386 | imagedata.SetScalarComponentFromDouble(x, y, z, 0, colour) |
387 | 387 | |
388 | 388 | def EditPixelBasedOnThreshold(self, x, y, z): | ... | ... |