I am loading a volume from a dicom folder import SimpleITK as sitk reader = sitk.ImageSeriesReader() dicom_names = reader.GetGDCMSeriesFileNames(input_dir) reader.SetFileNames(dicom_names) image = reader.Execute() , and I am getting the following warning. Is it possible to catch this warning? WARNING: In d:\a\1\work\b\itk-prefix\include\itk-5.1\itkImageSeriesReader.hxx, line 480 ImageSeriesReader (000002C665417450): Non uniform sampling or missing slices detected, maximum nonuniformity:292.521 I have tried the solutions from this question and it does not work. Is it because the warning message is coming from the C code? Continue reading...