Created
March 31, 2020 14:54
-
-
Save tfmoraes/78e22e60b8197eb47cffde5e8ec6a42b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py | |
| index e53235f5..2380f15d 100644 | |
| --- a/invesalius/data/slice_.py | |
| +++ b/invesalius/data/slice_.py | |
| @@ -1381,7 +1381,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | |
| colorer.SetInputData(image) | |
| colorer.SetWindow(self.window_width) | |
| colorer.SetLevel(self.window_level) | |
| - colorer.SetOutputFormatToRGB() | |
| + colorer.SetOutputFormatToLuminance() | |
| colorer.Update() | |
| return colorer.GetOutput() | |
| @@ -1454,7 +1454,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | |
| else: | |
| # map scalar values into colors | |
| lut_bg = vtk.vtkLookupTable() | |
| - lut_bg.SetTableRange(imagedata.GetScalarRange()) | |
| + lut_bg.SetTableRange((0, 255)) | |
| lut_bg.SetSaturationRange(self.saturation_range) | |
| lut_bg.SetHueRange(self.hue_range) | |
| lut_bg.SetValueRange(self.value_range) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py | |
| index e53235f5..2380f15d 100644 | |
| --- a/invesalius/data/slice_.py | |
| +++ b/invesalius/data/slice_.py | |
| @@ -1381,7 +1381,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | |
| colorer.SetInputData(image) | |
| colorer.SetWindow(self.window_width) | |
| colorer.SetLevel(self.window_level) | |
| - colorer.SetOutputFormatToRGB() | |
| + colorer.SetOutputFormatToLuminance() | |
| colorer.Update() | |
| return colorer.GetOutput() | |
| @@ -1454,7 +1454,7 @@ class Slice(with_metaclass(utils.Singleton, object)): | |
| else: | |
| # map scalar values into colors | |
| lut_bg = vtk.vtkLookupTable() | |
| - lut_bg.SetTableRange(imagedata.GetScalarRange()) | |
| + lut_bg.SetTableRange((0, 255)) | |
| lut_bg.SetSaturationRange(self.saturation_range) | |
| lut_bg.SetHueRange(self.hue_range) | |
| lut_bg.SetValueRange(self.value_range) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment