diff --git a/invesalius/constants.py b/invesalius/constants.py index 908aead..4509f9e 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -252,4 +252,4 @@ IMAGE_TILING = {"1 x 1":(1,1), "1 x 2":(1,2), "4 x 3":(4,3), "4 x 4":(4,4), "4 x 5":(4,5), "5 x 4":(5,4)} - +VTK_WARNING = 0 diff --git a/invesalius/reader/dicom_reader.py b/invesalius/reader/dicom_reader.py index fe805b0..d82622b 100644 --- a/invesalius/reader/dicom_reader.py +++ b/invesalius/reader/dicom_reader.py @@ -36,7 +36,6 @@ import data.imagedata_utils as iu def ReadDicomGroup(dir_): patient_group = GetDicomGroups(dir_) - if len(patient_group) > 0: filelist, dicom, zspacing = SelectLargerDicomGroup(patient_group) filelist = SortFiles(filelist, dicom) @@ -144,6 +143,13 @@ class ProgressDicomReader: ps.Publisher().sendMessage("End dicom load", grouper) 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