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
invesalius/reader/dicom_reader.py
... | ... | @@ -36,7 +36,6 @@ import data.imagedata_utils as iu |
36 | 36 | def ReadDicomGroup(dir_): |
37 | 37 | |
38 | 38 | patient_group = GetDicomGroups(dir_) |
39 | - | |
40 | 39 | if len(patient_group) > 0: |
41 | 40 | filelist, dicom, zspacing = SelectLargerDicomGroup(patient_group) |
42 | 41 | filelist = SortFiles(filelist, dicom) |
... | ... | @@ -144,6 +143,13 @@ class ProgressDicomReader: |
144 | 143 | ps.Publisher().sendMessage("End dicom load", grouper) |
145 | 144 | |
146 | 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 | 153 | y = yGetDicomGroups(path, recursive) |
148 | 154 | for value_progress in y: |
149 | 155 | if not self.running: | ... | ... |