Commit 462913dd1a7d6d5c550b9bb94878f8cee58ffd3e
1 parent
6442ff71
Exists in
master
and in
6 other branches
ENH: Reverted: VTK Warning was displayed when imported with original resolution DICOM
Showing
2 changed files
with
13 additions
and
7 deletions
Show diff stats
invesalius/data/imagedata_utils.py
... | ... | @@ -210,6 +210,13 @@ def ExtractVOI(imagedata,xi,xf,yi,yf,zi,zf): |
210 | 210 | |
211 | 211 | def CreateImageData(filelist, zspacing): |
212 | 212 | message = "Generating multiplanar visualization..." |
213 | + | |
214 | + if not const.VTK_WARNING: | |
215 | + fow = vtk.vtkFileOutputWindow() | |
216 | + fow.SetFileName('vtkoutput.txt') | |
217 | + ow = vtk.vtkOutputWindow() | |
218 | + ow.SetInstance(fow) | |
219 | + | |
213 | 220 | if not(const.REDUCE_IMAGEDATA_QUALITY): |
214 | 221 | update_progress= vtk_utils.ShowProgress(1, dialog_type = "ProgressDialog") |
215 | 222 | ... | ... |
invesalius/reader/dicom_reader.py
... | ... | @@ -118,13 +118,6 @@ 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('vtkoutput.txt') | |
125 | - ow = vtk.vtkOutputWindow() | |
126 | - ow.SetInstance(fow) | |
127 | - | |
128 | 121 | return yGetDicomGroups(directory, recursive, gui=False).next() |
129 | 122 | |
130 | 123 | |
... | ... | @@ -152,6 +145,12 @@ class ProgressDicomReader: |
152 | 145 | |
153 | 146 | def GetDicomGroups(self, path, recursive): |
154 | 147 | |
148 | + if not const.VTK_WARNING: | |
149 | + fow = vtk.vtkFileOutputWindow() | |
150 | + fow.SetFileName('vtkoutput.txt') | |
151 | + ow = vtk.vtkOutputWindow() | |
152 | + ow.SetInstance(fow) | |
153 | + | |
155 | 154 | y = yGetDicomGroups(path, recursive) |
156 | 155 | for value_progress in y: |
157 | 156 | if not self.running: | ... | ... |