Commit 5199899e24e2584c7aedc35bc2199b58b6d67368
1 parent
3b6ee030
Exists in
master
and in
5 other branches
FIX: On set an colour to a point in clut_raycasting it was setted to black no im…
…porting the colour selected. It was because all colours was being setted normalized
Showing
1 changed file
with
5 additions
and
6 deletions
Show diff stats
invesalius/gui/widgets/clut_raycasting.py
... | ... | @@ -220,15 +220,14 @@ class CLUTRaycastingWidget(wx.Panel): |
220 | 220 | point = self._has_clicked_in_a_point(evt.GetPositionTuple()) |
221 | 221 | if point: |
222 | 222 | i, j = point |
223 | - actual_colour = [i * 255 for i in self.curves[i].nodes[j].colour] | |
223 | + actual_colour = self.curves[i].nodes[j].colour | |
224 | 224 | colour_dialog = wx.GetColourFromUser(self, actual_colour) |
225 | 225 | if colour_dialog.IsOk(): |
226 | 226 | i,j = point |
227 | - r, g, b = [x/255.0 for x in colour_dialog.Get()] | |
228 | - self.colours[i][j]['red'] = r | |
229 | - self.colours[i][j]['green'] = g | |
230 | - self.colours[i][j]['blue'] = b | |
231 | - print self.curves[i].nodes | |
227 | + r, g, b = colour_dialog.Get() | |
228 | + self.colours[i][j]['red'] = r / 255.0 | |
229 | + self.colours[i][j]['green'] = g / 255.0 | |
230 | + self.colours[i][j]['blue'] = b / 255.0 | |
232 | 231 | self.curves[i].nodes[j].colour = (r, g, b) |
233 | 232 | self.Refresh() |
234 | 233 | nevt = CLUTEvent(myEVT_CLUT_POINT_RELEASE, self.GetId(), i) | ... | ... |