Commit c04ba1d70872010d14114953f56fa8ced6e9e6b4
1 parent
5e46d1ff
Exists in
master
and in
68 other branches
ENH: VTK Warning was displayed when imported with original resolution DICOM
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
invesalius/reader/dicom_reader.py
... | ... | @@ -118,6 +118,13 @@ def yGetDicomGroups(directory, recursive=True, gui=True): |
118 | 118 | yield grouper.GetPatientsGroups() |
119 | 119 | |
120 | 120 | def GetDicomGroups(directory, recursive=True): |
121 | + | |
122 | + if not const.VTK_WARNING: | |
123 | + fow = vtk.vtkFileOutputWindow() | |
124 | + #fow.SetFileName('c:\\vtkoutput.txt') | |
125 | + ow = vtk.vtkOutputWindow() | |
126 | + ow.SetInstance(fow) | |
127 | + | |
121 | 128 | return yGetDicomGroups(directory, recursive, gui=False).next() |
122 | 129 | |
123 | 130 | |
... | ... | @@ -145,12 +152,6 @@ class ProgressDicomReader: |
145 | 152 | |
146 | 153 | def GetDicomGroups(self, path, recursive): |
147 | 154 | |
148 | - if not const.VTK_WARNING: | |
149 | - fow = vtk.vtkFileOutputWindow() | |
150 | - #fow.SetFileName('c:\\vtkoutput.txt') | |
151 | - ow = vtk.vtkOutputWindow() | |
152 | - ow.SetInstance(fow) | |
153 | - | |
154 | 155 | y = yGetDicomGroups(path, recursive) |
155 | 156 | for value_progress in y: |
156 | 157 | if not self.running: | ... | ... |