.. AUTO-GENERATED FILE -- DO NOT EDIT!

interfaces.bids_utils
=====================


.. _nipype.interfaces.bids_utils.BIDSDataGrabber:


.. index:: BIDSDataGrabber

BIDSDataGrabber
---------------

`Link to code <file:///build/nipype-0.14.0/nipype/interfaces/bids_utils.py#L49>`__

BIDS datagrabber module that wraps around pybids to allow arbitrary
querying of BIDS datasets.

Examples
~~~~~~~~

By default, the BIDSDataGrabber fetches anatomical and functional images
from a project, and makes BIDS entities (e.g. subject) available for
filtering outputs.

>>> bg = BIDSDataGrabber()
>>> bg.inputs.base_dir = 'ds005/'
>>> bg.inputs.subject = '01'
>>> results = bg.run() # doctest: +SKIP


Dynamically created, user-defined output fields can also be defined to
return different types of outputs from the same project. All outputs
are filtered on common entities, which can be explicitly defined as
infields.

>>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi'])
>>> bg.inputs.base_dir = 'ds005/'
>>> bg.inputs.subject = '01'
>>> bg.inputs.output_query['dwi'] = dict(modality='dwi')
>>> results = bg.run() # doctest: +SKIP

Inputs::

        [Mandatory]
        base_dir: (an existing directory name)
                Path to BIDS Directory.

        [Optional]
        output_query: (a dictionary with keys which are a unicode string and
                 with values which are a dictionary with keys which are any value
                 and with values which are any value)
                Queries for outfield outputs
        raise_on_empty: (a boolean, nipype default value: True)
                Generate exception if list is empty for a given field
        return_type: ('file' or 'namedtuple', nipype default value: file)

Outputs::

        None
