Module Contents



All Definitions should inherit this.


find_file(bids_layout, path, filters, suffix, session, subject, extension='.nii.gz')

Helper function

class AFQ.definitions.utils.Definition[source]

Bases: object

All Definitions should inherit this. For a given subject and session within the API, the definition is used to create a given mask, map, etc. Definitions have an init function which the users uses to specify how they want the definition to behave. The find_path and get_for_subses functions are called by the AFQ API. The api calls find_path to let the definition find relevant files for the given subject and session. The api calls get_for_subses to get the mask, map, etc.

abstract find_path(self, bids_layout, from_path, subject, session)[source]

Uses __init__ in str_for_toml to make string that will instantiate itself. Assumes object will have attributes of same name as __init__ args. This is important for reading/writing definitions as arguments to config files.

AFQ.definitions.utils.find_file(bids_layout, path, filters, suffix, session, subject, extension='.nii.gz')[source]

Helper function Generic calls to get_nearest to find a file