@@ -142,7 +142,7 @@ def _bids_filter(value):
142
142
'option is not enabled, standard EPI-T1 coregistration is performed '
143
143
'using the middle echo.' )
144
144
g_conf .add_argument (
145
- '--output-spaces' , nargs = '+ ' , action = OutputReferencesAction , default = SpatialReferences () ,
145
+ '--output-spaces' , nargs = '* ' , action = OutputReferencesAction ,
146
146
help = """\
147
147
Standard and non-standard spaces to resample anatomical and functional images to. \
148
148
Standard spaces may be specified by the form \
@@ -151,8 +151,8 @@ def _bids_filter(value):
151
151
colon-separated parameters. \
152
152
Non-standard spaces imply specific orientations and sampling grids. \
153
153
Important to note, the ``res-*`` modifier does not define the resolution used for \
154
- the spatial normalization.
155
- For further details, please check out \
154
+ the spatial normalization. To generate no BOLD outputs, use this option without specifying \
155
+ any spatial references. For further details, please check out \
156
156
https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (currentv .base_version
157
157
if is_release else 'latest' ))
158
158
@@ -304,12 +304,19 @@ def _bids_filter(value):
304
304
def parse_args (args = None , namespace = None ):
305
305
"""Parse args and run further checks on the command line."""
306
306
import logging
307
+ from niworkflows .utils .spaces import Reference , SpatialReferences
307
308
parser = _build_parser ()
308
309
opts = parser .parse_args (args , namespace )
309
310
config .execution .log_level = int (max (25 - 5 * opts .verbose_count , logging .DEBUG ))
310
311
config .from_dict (vars (opts ))
311
312
config .loggers .init ()
312
313
314
+ # Initialize --output-spaces if not defined
315
+ if config .execution .output_spaces is None :
316
+ config .execution .output_spaces = SpatialReferences (
317
+ [Reference ("MNI152NLin2009cAsym" , {"res" : "native" })]
318
+ )
319
+
313
320
# Retrieve logging level
314
321
build_log = config .loggers .cli
315
322
0 commit comments