niworkflows.interfaces.space module

Interfaces for handling spaces.

class niworkflows.interfaces.space.SpaceDataSource(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Generate a Nipype interface from a Space specification.

Example

>>> SpaceDataSource(
...     in_tuple=('MNIPediatricAsym:cohort-2', {'res': 2, 'den': '91k'})).run().outputs

cohort = 2
density = 91k
resolution = 2
space = MNIPediatricAsym
uid = MNIPediatricAsym_cohort-2_res-2
>>> SpaceDataSource(
...     in_tuple=('MNIPediatricAsym:cohort-2', {'res': 'native', 'den': '91k'})).run().outputs

cohort = 2
density = 91k
resolution = native
space = MNIPediatricAsym
uid = MNIPediatricAsym_cohort-2_res-native
Mandatory Inputs:

in_tuple (a tuple of the form: (a string, a dictionary with keys which are any value and with values which are any value)) – A space declaration.

Outputs:
  • cohort (a string) – A cohort specifier.

  • density (a string) – A density specifier.

  • resolution (a string) – A resolution specifier.

  • space (a string) – The space identifier, after dropping the cohort modifier.

  • uid (a string) – A unique identifier combining space specifications.