Skip to content

Commit

Permalink
Readd / as i think it doesnt mess up anything
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Oct 11, 2024
1 parent 73ae387 commit 5181135
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion NiChart_DLMUSE/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def main() -> None:

threads = []
for i in range(len(subfolders)):
curr_out_dir = out_dir + f"split_{i}"
curr_out_dir = out_dir + f"/split_{i}"
curr_thread = threading.Thread(
target=run_pipeline, args=(subfolders[i], curr_out_dir, device)
)
Expand Down
28 changes: 14 additions & 14 deletions NiChart_DLMUSE/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,22 @@ 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}/temp_working_dir/s1_reorient_lps/* {in_dir}results/s1_reorient_lps/")
os.system(f"mv {in_dir}{dir}/temp_working_dir/s2_dlicv/* {in_dir}results/s2_dlicv/")
os.system(f"mv {in_dir}{dir}/temp_working_dir/s3_masked/* {in_dir}results/s3_masked/")
os.system(f"mv {in_dir}{dir}/temp_working_dir/s4_dlmuse/* {in_dir}results/s4_dlmuse/")
os.system(f"mv {in_dir}{dir}/temp_working_dir/s5_relabeled/* {in_dir}results/s5_relabeled/")
os.system(f"mv {in_dir}{dir}/temp_working_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}/temp_working_dir/s1_reorient_lps/* {in_dir}/results/s1_reorient_lps/")
os.system(f"mv {in_dir}/{dir}/temp_working_dir/s2_dlicv/* {in_dir}/results/s2_dlicv/")
os.system(f"mv {in_dir}/{dir}/temp_working_dir/s3_masked/* {in_dir}/results/s3_masked/")
os.system(f"mv {in_dir}/{dir}/temp_working_dir/s4_dlmuse/* {in_dir}/results/s4_dlmuse/")
os.system(f"mv {in_dir}/{dir}/temp_working_dir/s5_relabeled/* {in_dir}/results/s5_relabeled/")
os.system(f"mv {in_dir}/{dir}/temp_working_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 5181135

Please sign in to comment.