Commit 1dfad6a762fd4fc3cef64f2679aa8af6b4291b4b
1 parent
0bd1e163
Exists in
master
and in
68 other branches
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,7 +59,10 @@ class Controller(): | ||
59 | orientation = const.SAGITAL | 59 | orientation = const.SAGITAL |
60 | else: | 60 | else: |
61 | orientation = const.AXIAL | 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 | tilt_value = dicom.acquisition.tilt | 66 | tilt_value = dicom.acquisition.tilt |
64 | if (tilt_value): | 67 | if (tilt_value): |
65 | #TODO: Show dialog so user can set not other value | 68 | #TODO: Show dialog so user can set not other value |
@@ -87,11 +90,12 @@ class Controller(): | @@ -87,11 +90,12 @@ class Controller(): | ||
87 | print "Sorry, but there are no medical images supported on this dir." | 90 | print "Sorry, but there are no medical images supported on this dir." |
88 | else: | 91 | else: |
89 | # Create new project | 92 | # Create new project |
90 | - proj.SetAcquisitionModality(dicom.acquisition.modality) | 93 | + proj.SetAcquisitionModality(acquisition_modality) |
91 | proj.imagedata = imagedata | 94 | proj.imagedata = imagedata |
92 | proj.original_orientation = orientation | 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 | const.WINDOW_LEVEL['Default'] = (window, level) | 99 | const.WINDOW_LEVEL['Default'] = (window, level) |
96 | const.WINDOW_LEVEL['Other'] = (window, level) | 100 | const.WINDOW_LEVEL['Other'] = (window, level) |
97 | 101 |