File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2755,6 +2755,8 @@ class BIDSDataGrabberInputSpec(DynamicTraitedSpec):
27552755 desc = 'Generate exception if list is empty '
27562756 'for a given field' )
27572757 return_type = traits .Enum ('file' , 'namedtuple' , usedefault = True )
2758+ strict = traits .Bool (desc = 'Return only BIDS "proper" files (e.g., '
2759+ 'ignore derivatives/, sourcedata/, etc.)' )
27582760
27592761
27602762class BIDSDataGrabber (IOBase ):
@@ -2828,8 +2830,10 @@ def _run_interface(self, runtime):
28282830 return runtime
28292831
28302832 def _list_outputs (self ):
2831- layout = gb .BIDSLayout (self .inputs .base_dir ,
2832- exclude = ['derivatives/' , 'code/' , 'sourcedata/' ])
2833+ exclude = None
2834+ if self .inputs .strict :
2835+ exclude = ['derivatives/' , 'code/' , 'sourcedata/' ]
2836+ layout = gb .BIDSLayout (self .inputs .base_dir , exclude = exclude )
28332837
28342838 # If infield is not given nm input value, silently ignore
28352839 filters = {}
You can’t perform that action at this time.
0 commit comments