Skip to content

Commit

Permalink
Fix non needed / in merging
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Oct 11, 2024
1 parent a808ee4 commit 80d9624
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions NiChart_DLMUSE/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,23 @@ def remove_subfolders(in_dir: str) -> None:
os.system(f"rm -r {in_dir}/split_*")

def merge_output_data(in_dir: str) -> None:
os.system(f"mkdir {in_dir}/results")
os.system(f"mkdir {in_dir}/results/s1_reorient_lps")
os.system(f"mkdir {in_dir}/results/s2_dlicv")
os.system(f"mkdir {in_dir}/results/s3_masked")
os.system(f"mkdir {in_dir}/results/s4_dlmuse")
os.system(f"mkdir {in_dir}/results/s5_relabeled")
os.system(f"mkdir {in_dir}/results/s6_combined")
os.system(f"mkdir {in_dir}results")
os.system(f"mkdir {in_dir}results/s1_reorient_lps")
os.system(f"mkdir {in_dir}results/s2_dlicv")
os.system(f"mkdir {in_dir}results/s3_masked")
os.system(f"mkdir {in_dir}results/s4_dlmuse")
os.system(f"mkdir {in_dir}results/s5_relabeled")
os.system(f"mkdir {in_dir}results/s6_combined")

for dir in os.listdir(in_dir):
os.system(f"mv {in_dir}/{dir}/s1_reorient_lps/* {in_dir}/results/s1_reorient_lps/")
os.system(f"mv {in_dir}/{dir}/s2_dlicv/* {in_dir}/results/s2_dlicv/")
os.system(f"mv {in_dir}/{dir}/s3_masked/* {in_dir}/results/s3_masked/")
os.system(f"mv {in_dir}/{dir}/s4_dlmuse/* {in_dir}/results/s4_dlmuse/")
os.system(f"mv {in_dir}/{dir}/s5_relabeled/* {in_dir}/results/s5_relabeled/")
os.system(f"mv {in_dir}/{dir}/s6_combined/* {in_dir}/results/s6_combined/")

os.system(f"mv {in_dir}/*.nii.gz {in_dir}/results/")
os.system(f"mv {in_dir}{dir}/s1_reorient_lps/* {in_dir}results/s1_reorient_lps/")
os.system(f"mv {in_dir}{dir}/s2_dlicv/* {in_dir}results/s2_dlicv/")
os.system(f"mv {in_dir}{dir}/s3_masked/* {in_dir}results/s3_masked/")
os.system(f"mv {in_dir}{dir}/s4_dlmuse/* {in_dir}results/s4_dlmuse/")
os.system(f"mv {in_dir}{dir}/s5_relabeled/* {in_dir}results/s5_relabeled/")
os.system(f"mv {in_dir}{dir}/s6_combined/* {in_dir}results/s6_combined/")

os.system(f"mv {in_dir}*.nii.gz {in_dir}results/")

for dir in os.listdir(in_dir):
os.system(f"rm -r {dir}")

0 comments on commit 80d9624

Please sign in to comment.