Skip to content

Commit

Permalink
Update image_conversion.py
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Keyn34 authored Sep 29, 2023
1 parent 9002a6e commit c3dcb22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion falconz/image_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3dcb22

Please sign in to comment.