From c3dcb2212def52cb4ebb7ffbb9228906a7488739 Mon Sep 17 00:00:00 2001 From: Sebastian Gutschmayer <87951050+Keyn34@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:32:31 +0200 Subject: [PATCH] Update image_conversion.py Fixed a bug where the converted nifti file wasn't found when it was too big for pigz to compress. The search includes now .nii as well (it was only nii.gz before) --- falconz/image_conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/falconz/image_conversion.py b/falconz/image_conversion.py index b87d1ed..408300d 100644 --- a/falconz/image_conversion.py +++ b/falconz/image_conversion.py @@ -97,7 +97,7 @@ def _convert_dicom_series(self): os.remove(os.path.join(self.output_directory, json_file[0])) # Scan the output directory for the generated nifti files - converted_files = [f for f in os.listdir(self.output_directory) if f.endswith('.nii.gz')] + converted_files = [f for f in os.listdir(self.output_directory) if (f.endswith('.nii.gz') or f.endswith('.nii'))] for nifti_file in converted_files: file_path = os.path.join(self.output_directory, nifti_file)