Skip to content

Commit 156ed9b

Browse files
author
DBIC BIDS Team
committed
ENH: pass POPULATE_INTENDED_FOR_OPTS from heuristic upon command style invocation of populate-intended-for
1 parent bdbc91e commit 156ed9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

heudiconv/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,15 @@ def process_extra_commands(outdir, command, files, dicom_dir_template,
109109
from .utils import get_heuristic_description
110110
print(get_heuristic_description(heuristic, full=True))
111111
elif command == 'populate-intended-for':
112+
kwargs = {}
113+
if heuristic:
114+
heuristic = load_heuristic(heuristic)
115+
kwargs = getattr(heuristic, 'POPULATE_INTENDED_FOR_OPTS', {})
112116
for subj in subjs:
113117
session_path = op.join(outdir, 'sub-' + subj)
114118
if session:
115119
session_path = op.join(session_path, 'ses-' + session)
116-
populate_intended_for(session_path)
120+
populate_intended_for(session_path, **kwargs)
117121
else:
118122
raise ValueError("Unknown command %s" % command)
119123
return

0 commit comments

Comments
 (0)