Skip to content

Commit

Permalink
Update image_conversion.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LalithShiyam authored Sep 8, 2023
1 parent 5b284c3 commit 98e8321
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion falconz/image_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def merge3d(nifti_dir: str, wild_card: str, nifti_outfile: str) -> None:
"""
logging.info(f"Merging 3D nifti files in {nifti_dir} with wildcard {wild_card}")
files_to_merge = fop.get_files(nifti_dir, wild_card)
nib.save(nib.funcs.concat_images(files_to_merge, False), nifti_outfile)
numeric_sorted_files_to_merge = sorted(files_to_merge, key=numeric_sort_key)
nib.save(nib.funcs.concat_images(numeric_sorted_files_to_merge, False), nifti_outfile)
os.chdir(nifti_dir)
logging.info("Done")

0 comments on commit 98e8321

Please sign in to comment.