From c04ba1d70872010d14114953f56fa8ced6e9e6b4 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Wed, 23 Dec 2009 13:29:38 +0000 Subject: [PATCH] ENH: VTK Warning was displayed when imported with original resolution DICOM --- invesalius/reader/dicom_reader.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/invesalius/reader/dicom_reader.py b/invesalius/reader/dicom_reader.py index cc36bf5..b71695a 100644 --- a/invesalius/reader/dicom_reader.py +++ b/invesalius/reader/dicom_reader.py @@ -118,6 +118,13 @@ def yGetDicomGroups(directory, recursive=True, gui=True): yield grouper.GetPatientsGroups() def GetDicomGroups(directory, recursive=True): + + if not const.VTK_WARNING: + fow = vtk.vtkFileOutputWindow() + #fow.SetFileName('c:\\vtkoutput.txt') + ow = vtk.vtkOutputWindow() + ow.SetInstance(fow) + return yGetDicomGroups(directory, recursive, gui=False).next() @@ -145,12 +152,6 @@ class ProgressDicomReader: def GetDicomGroups(self, path, recursive): - if not const.VTK_WARNING: - fow = vtk.vtkFileOutputWindow() - #fow.SetFileName('c:\\vtkoutput.txt') - ow = vtk.vtkOutputWindow() - ow.SetInstance(fow) - y = yGetDicomGroups(path, recursive) for value_progress in y: if not self.running: -- libgit2 0.21.2