Commit c171a2bde0b07948070bf4e718ceb7bbe3481077

Authored by tfmoraes
1 parent b14ca6cf

It was missing control.py in the last commit

Showing 1 changed file with 8 additions and 2 deletions   Show diff stats
invesalius/control.py
@@ -408,6 +408,8 @@ class Controller(): @@ -408,6 +408,8 @@ class Controller():
408 self.Slice.window_width = proj.window 408 self.Slice.window_width = proj.window
409 self.Slice.spacing = header.get_zooms()[:3] 409 self.Slice.spacing = header.get_zooms()[:3]
410 410
  411 + ps.Publisher().sendMessage('Update threshold limits',
  412 + proj.threshold_range)
411 413
412 def CreateDicomProject(self, imagedata, dicom): 414 def CreateDicomProject(self, imagedata, dicom):
413 name_to_const = {"AXIAL":const.AXIAL, 415 name_to_const = {"AXIAL":const.AXIAL,
@@ -488,10 +490,11 @@ class Controller(): @@ -488,10 +490,11 @@ class Controller():
488 490
489 wl = float(dicom.image.level) 491 wl = float(dicom.image.level)
490 ww = float(dicom.image.window) 492 ww = float(dicom.image.window)
491 - self.matrix, self.filename = utils.dcm2memmap(filelist, size,  
492 - orientation) 493 + self.matrix, scalar_range, self.filename = utils.dcm2memmap(filelist, size,
  494 + orientation)
493 self.Slice = sl.Slice() 495 self.Slice = sl.Slice()
494 self.Slice.matrix = self.matrix 496 self.Slice.matrix = self.matrix
  497 + self.Slice.matrix_filename = self.filename
495 498
496 if orientation == 'AXIAL': 499 if orientation == 'AXIAL':
497 self.Slice.spacing = xyspacing[0], xyspacing[1], zspacing 500 self.Slice.spacing = xyspacing[0], xyspacing[1], zspacing
@@ -502,6 +505,9 @@ class Controller(): @@ -502,6 +505,9 @@ class Controller():
502 505
503 self.Slice.window_level = wl 506 self.Slice.window_level = wl
504 self.Slice.window_width = ww 507 self.Slice.window_width = ww
  508 +
  509 + ps.Publisher().sendMessage('Update threshold limits', scalar_range)
  510 +
505 return imagedata, dicom 511 return imagedata, dicom
506 512
507 def LoadImagedataInfo(self): 513 def LoadImagedataInfo(self):