Commit 1dfad6a762fd4fc3cef64f2679aa8af6b4291b4b

Authored by Paulo Henrique Junqueira Amorim
1 parent 0bd1e163

FIX: Bug open Analyze

Showing 1 changed file with 8 additions and 4 deletions   Show diff stats
invesalius/control.py
... ... @@ -59,7 +59,10 @@ class Controller():
59 59 orientation = const.SAGITAL
60 60 else:
61 61 orientation = const.AXIAL
62   -
  62 +
  63 + window = window = float(dicom.image.window)
  64 + level = level = float(dicom.image.level)
  65 + acquisition_modality = dicom.acquisition.modality
63 66 tilt_value = dicom.acquisition.tilt
64 67 if (tilt_value):
65 68 #TODO: Show dialog so user can set not other value
... ... @@ -87,11 +90,12 @@ class Controller():
87 90 print "Sorry, but there are no medical images supported on this dir."
88 91 else:
89 92 # Create new project
90   - proj.SetAcquisitionModality(dicom.acquisition.modality)
  93 + proj.SetAcquisitionModality(acquisition_modality)
91 94 proj.imagedata = imagedata
92 95 proj.original_orientation = orientation
93   - proj.window = window = float(dicom.image.window)
94   - proj.level = level = float(dicom.image.level)
  96 + proj.window = window
  97 + proj.level = level
  98 +
95 99 const.WINDOW_LEVEL['Default'] = (window, level)
96 100 const.WINDOW_LEVEL['Other'] = (window, level)
97 101  
... ...