diff --git a/invesalius/data/imagedata_utils.py b/invesalius/data/imagedata_utils.py index 19ed2df..0dd210e 100644 --- a/invesalius/data/imagedata_utils.py +++ b/invesalius/data/imagedata_utils.py @@ -210,6 +210,13 @@ def ExtractVOI(imagedata,xi,xf,yi,yf,zi,zf): def CreateImageData(filelist, zspacing): message = "Generating multiplanar visualization..." + + if not const.VTK_WARNING: + fow = vtk.vtkFileOutputWindow() + fow.SetFileName('vtkoutput.txt') + ow = vtk.vtkOutputWindow() + ow.SetInstance(fow) + if not(const.REDUCE_IMAGEDATA_QUALITY): update_progress= vtk_utils.ShowProgress(1, dialog_type = "ProgressDialog") diff --git a/invesalius/reader/dicom_reader.py b/invesalius/reader/dicom_reader.py index 839b7e3..33b26c9 100644 --- a/invesalius/reader/dicom_reader.py +++ b/invesalius/reader/dicom_reader.py @@ -118,13 +118,6 @@ 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('vtkoutput.txt') - ow = vtk.vtkOutputWindow() - ow.SetInstance(fow) - return yGetDicomGroups(directory, recursive, gui=False).next() @@ -152,6 +145,12 @@ class ProgressDicomReader: def GetDicomGroups(self, path, recursive): + if not const.VTK_WARNING: + fow = vtk.vtkFileOutputWindow() + fow.SetFileName('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