Commit b18061d2683cacecbc18ce8a61773b47a05cee3d

Authored by Thiago Franco de Moraes
1 parent 3368fa08

Dealing with integer overflow when calculating the histogram

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
invesalius/data/slice_.py
@@ -116,7 +116,7 @@ class Slice(object): @@ -116,7 +116,7 @@ class Slice(object):
116 def matrix(self, value): 116 def matrix(self, value):
117 self._matrix = value 117 self._matrix = value
118 i, e = value.min(), value.max() 118 i, e = value.min(), value.max()
119 - r = e - i 119 + r = int(e) - int(i)
120 self.histogram = numpy.histogram(self._matrix, r, (i, e))[0] 120 self.histogram = numpy.histogram(self._matrix, r, (i, e))[0]
121 121
122 def __bind_events(self): 122 def __bind_events(self):