Commit 468d672530feec15356ecb33e41006f2eefd3ab9
1 parent
11f86f5a
Exists in
master
and in
68 other branches
ADD: Option to show vtkOutpuwindow with warning and error messages. const.VTK_WA…
…RNING = 0 to disable output.
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
invesalius/constants.py
@@ -252,4 +252,4 @@ IMAGE_TILING = {"1 x 1":(1,1), "1 x 2":(1,2), | @@ -252,4 +252,4 @@ IMAGE_TILING = {"1 x 1":(1,1), "1 x 2":(1,2), | ||
252 | "4 x 3":(4,3), "4 x 4":(4,4), | 252 | "4 x 3":(4,3), "4 x 4":(4,4), |
253 | "4 x 5":(4,5), "5 x 4":(5,4)} | 253 | "4 x 5":(4,5), "5 x 4":(5,4)} |
254 | 254 | ||
255 | - | 255 | +VTK_WARNING = 0 |
invesalius/reader/dicom_reader.py
@@ -36,7 +36,6 @@ import data.imagedata_utils as iu | @@ -36,7 +36,6 @@ import data.imagedata_utils as iu | ||
36 | def ReadDicomGroup(dir_): | 36 | def ReadDicomGroup(dir_): |
37 | 37 | ||
38 | patient_group = GetDicomGroups(dir_) | 38 | patient_group = GetDicomGroups(dir_) |
39 | - | ||
40 | if len(patient_group) > 0: | 39 | if len(patient_group) > 0: |
41 | filelist, dicom, zspacing = SelectLargerDicomGroup(patient_group) | 40 | filelist, dicom, zspacing = SelectLargerDicomGroup(patient_group) |
42 | filelist = SortFiles(filelist, dicom) | 41 | filelist = SortFiles(filelist, dicom) |
@@ -144,6 +143,13 @@ class ProgressDicomReader: | @@ -144,6 +143,13 @@ class ProgressDicomReader: | ||
144 | ps.Publisher().sendMessage("End dicom load", grouper) | 143 | ps.Publisher().sendMessage("End dicom load", grouper) |
145 | 144 | ||
146 | def GetDicomGroups(self, path, recursive): | 145 | def GetDicomGroups(self, path, recursive): |
146 | + | ||
147 | + if not const.VTK_WARNING: | ||
148 | + fow = vtk.vtkFileOutputWindow() | ||
149 | + #fow.SetFileName('c:\\vtkoutput.txt') | ||
150 | + ow = vtk.vtkOutputWindow() | ||
151 | + ow.SetInstance(fow) | ||
152 | + | ||
147 | y = yGetDicomGroups(path, recursive) | 153 | y = yGetDicomGroups(path, recursive) |
148 | for value_progress in y: | 154 | for value_progress in y: |
149 | if not self.running: | 155 | if not self.running: |