Skip to content

Commit

Permalink
Merge pull request #326 from UNFmontreal/Add_verbose_dcm2niix
Browse files Browse the repository at this point in the history
[ENH] Add logging when dcm2niix skips dcm images
  • Loading branch information
arnaudbore authored Nov 11, 2024
2 parents d29978c + 0718515 commit d289f76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dcm2bids/dcm2niix_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ def execute(self):
shutil.rmtree(self.rm_tmp_dir)
self.logger.info("Temporary dicom directory removed.")

if "Warning" in output or "Error" in output:
if "Warning" in output or "Error" in output or "Skipping" in output:
self.logger.info("Log from dcm2niix execution")
if "Warning" in output:
self.logger.warning(f"{output}")
else:
if "Error" in output:
self.logger.error(f"{output}")
else:
self.logger.warning(f"{output}")
else:
self.logger.debug(f"\n{output}")
self.logger.info("Check log file for dcm2niix output\n")
Expand Down

0 comments on commit d289f76

Please sign in to comment.