|
74 | 74 | " bmask_path = (\n", |
75 | 75 | " OUTPUT_DIR / bold_run.parent / f\"{bold_run.name.rsplit('_', 1)[0]}_label-brain_mask.nii.gz\"\n", |
76 | 76 | " )\n", |
| 77 | + " print(f\"Data path: {DATA_PATH}\")\n", |
| 78 | + " for item in DATA_PATH.iterdir():\n", |
| 79 | + " print(f\"Item: {item}\")\n", |
| 80 | + "\n", |
| 81 | + " if not DATA_PATH.exists() or not DATA_PATH.is_dir():\n", |
| 82 | + " raise FileNotFoundError(f\"Directory does not exist: {DATA_PATH}\")\n", |
| 83 | + "\n", |
| 84 | + " _path = DATA_PATH / \"synthstrip.1.pt\"\n", |
| 85 | + " if not _path.exists() or not _path.is_dir():\n", |
| 86 | + " raise FileNotFoundError(f\"synthstrip file does not exist: {_path}\")\n", |
| 87 | + "\n", |
77 | 88 | " if not bmask_path.exists():\n", |
78 | 89 | " bmsk_results = SynthStrip(\n", |
79 | 90 | " in_file=str(avg_path),\n", |
80 | 91 | " use_gpu=True,\n", |
81 | | - " model=DATA_PATH / \"synthstrip.1.pt\",\n", |
| 92 | + " model=str(DATA_PATH / \"synthstrip.1.pt\"),\n", |
82 | 93 | " ).run(cwd=str(WORKDIR))\n", |
| 94 | + " print(f\"Outputs: {bmsk_results.outputs}\")\n", |
| 95 | + " print(f\"Out_mask: {bmsk_results.outputs.out_mask}\")\n", |
83 | 96 | " copy(bmsk_results.outputs.out_mask, bmask_path)\n", |
84 | 97 | "\n", |
85 | 98 | " dilmask_path = (\n", |
|
0 commit comments