Skip to content

Add .get_entities() method to BIDSLayout #346

@effigies

Description

@effigies

Currently, you can get valid entities by running BIDSLayout(bids_root).entities and a little parsing. It would be nice to have a helper function such as bids.layout.list_entities():

def list_entities(domains=('bids',)):
    res = []
    for domain in domains:
        res.extend(...)  # Parse the entities from the JSON files
    return res

The reason this comes up is that, currently, nipype.interfaces.io.BIDSDataGrabber manually parses the JSON files, found in a path relative to bids.__file__. This isn't great.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions