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):
2755
2755
desc = 'Generate exception if list is empty '
2756
2756
'for a given field' )
2757
2757
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.)' )
2758
2760
2759
2761
2760
2762
class BIDSDataGrabber (IOBase ):
@@ -2828,8 +2830,10 @@ def _run_interface(self, runtime):
2828
2830
return runtime
2829
2831
2830
2832
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 )
2833
2837
2834
2838
# If infield is not given nm input value, silently ignore
2835
2839
filters = {}
You can’t perform that action at this time.
0 commit comments