Skip to content

Commit

Permalink
Merge pull request #49 from Ian-Goodall-Halliwell/main
Browse files Browse the repository at this point in the history
Added more flexibility for non-hippocampus inputs
  • Loading branch information
Ian-Goodall-Halliwell authored Dec 13, 2024
2 parents fdfac4c + cc18762 commit db39c43
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/zbrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,17 @@ def main_func(args):

def check_sub(args, sub, ses=None):
micapipe_path = os.path.join(args.dataset, "derivatives", args.micapipe, sub)
hippunfold_path = os.path.join(
args.dataset, "derivatives", args.hippunfold, "hippunfold", sub
)
if "hippocampus" in args.struct:
hippunfold_path = os.path.join(
args.dataset, "derivatives", args.hippunfold, "hippunfold", sub
)

if ses is not None:
micapipe_path = os.path.join(micapipe_path, ses)
hippunfold_path = os.path.join(hippunfold_path, ses)
if "hippocampus" in args.struct:
hippunfold_path = os.path.join(hippunfold_path, ses)
if not os.path.isdir(micapipe_path):
print(f'Non proccessable micapipe output at {micapipe_path} for {sub}{f"-{ses}" if ses else ""}, skipping')
# print(f'Non proccessable micapipe output at {micapipe_path} for {sub}{f"-{ses}" if ses else ""}, skipping')
return False
if "proc" in args.run:

Expand Down Expand Up @@ -719,7 +721,6 @@ def print_help(self):
parser.add_argument("--volumetric", type=int, default=1)
# Parse the arguments
args, unknown_args = parser.parse_known_args()
print(args.dicoms)
if not vars(args):
parser.print_help()
sys.exit(1)
Expand Down

0 comments on commit db39c43

Please sign in to comment.