@@ -129,7 +129,7 @@ def get_parser():
129129 'option is not enabled, standard EPI-T1 coregistration is performed '
130130 'using the middle echo.' )
131131 g_conf .add_argument (
132- '--output-spaces' , nargs = '+ ' , action = OutputReferencesAction , default = SpatialReferences (),
132+ '--output-spaces' , nargs = '* ' , action = OutputReferencesAction , default = SpatialReferences (),
133133 help = """\
134134 Standard and non-standard spaces to resample anatomical and functional images to. \
135135 Standard spaces may be specified by the form \
@@ -138,8 +138,8 @@ def get_parser():
138138 colon-separated parameters. \
139139 Non-standard spaces imply specific orientations and sampling grids. \
140140 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 \
143143 https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (currentv .base_version
144144 if is_release else 'latest' ))
145145
@@ -718,7 +718,11 @@ def parse_spaces(opts):
718718
719719 """
720720 spaces = opts .output_spaces
721- spaces .checkpoint ()
721+ if not spaces .references and not spaces .is_cached ():
722+ spaces .add ('MNI152NLin2009cAsym' )
723+
724+ if not spaces .is_cached (): # spaces may be already checkpointed if users want no BOLD outputs
725+ spaces .checkpoint ()
722726
723727 if opts .use_aroma :
724728 # Make sure there's a normalization to FSL for AROMA to use.
@@ -730,15 +734,7 @@ def parse_spaces(opts):
730734 spaces .add (('fsaverage' , {'den' : '164k' }))
731735 spaces .add (('MNI152NLin6Asym' , {'res' : vol_res }))
732736
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)
737+ # Add the default standard space if not already present (required by several sub-workflows)
742738 if "MNI152NLin2009cAsym" not in spaces .get_spaces (nonstandard = False , dim = (3 ,)):
743739 spaces .add ("MNI152NLin2009cAsym" )
744740 return spaces
0 commit comments