@@ -129,7 +129,7 @@ def get_parser():
129
129
'option is not enabled, standard EPI-T1 coregistration is performed '
130
130
'using the middle echo.' )
131
131
g_conf .add_argument (
132
- '--output-spaces' , nargs = '+ ' , action = OutputReferencesAction , default = SpatialReferences (),
132
+ '--output-spaces' , nargs = '* ' , action = OutputReferencesAction , default = SpatialReferences (),
133
133
help = """\
134
134
Standard and non-standard spaces to resample anatomical and functional images to. \
135
135
Standard spaces may be specified by the form \
@@ -138,8 +138,8 @@ def get_parser():
138
138
colon-separated parameters. \
139
139
Non-standard spaces imply specific orientations and sampling grids. \
140
140
Important to note, the ``res-*`` modifier does not define the resolution used for \
141
- the spatial normalization.
142
- For further details, please check out \
141
+ the spatial normalization. To generate no BOLD outputs, use this option without specifying \
142
+ any spatial references. For further details, please check out \
143
143
https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (currentv .base_version
144
144
if is_release else 'latest' ))
145
145
@@ -718,7 +718,14 @@ def parse_spaces(opts):
718
718
719
719
"""
720
720
spaces = opts .output_spaces
721
- spaces .checkpoint ()
721
+ if not spaces .references and not spaces .is_cached ():
722
+ warnings .warn (
723
+ "No output spaces have been set - fMRIPrep will add `MNI152NLin2009cAsym` by default."
724
+ )
725
+ spaces .add ('MNI152NLin2009cAsym' )
726
+
727
+ if not spaces .is_cached (): # spaces may be already checkpointed if users want no BOLD outputs
728
+ spaces .checkpoint ()
722
729
723
730
if opts .use_aroma :
724
731
# Make sure there's a normalization to FSL for AROMA to use.
@@ -730,15 +737,7 @@ def parse_spaces(opts):
730
737
spaces .add (('fsaverage' , {'den' : '164k' }))
731
738
spaces .add (('MNI152NLin6Asym' , {'res' : vol_res }))
732
739
733
- # These arguments implicitly signal expected output
734
- if not spaces .references :
735
- warnings .warn (
736
- "fMRIPrep will not generate preprocessed derivatives because "
737
- "none of `--output-spaces`, `--use-aroma`, or `--cifti-output` "
738
- "were set."
739
- )
740
-
741
- # Add the default standard space (required by several sub-workflows)
740
+ # Add the default standard space if not already present (required by several sub-workflows)
742
741
if "MNI152NLin2009cAsym" not in spaces .get_spaces (nonstandard = False , dim = (3 ,)):
743
742
spaces .add ("MNI152NLin2009cAsym" )
744
743
return spaces
0 commit comments