niworkflows.interfaces.cifti module

Handling connectivity: combines FreeSurfer surfaces with subcortical volumes.

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

Bases: SimpleInterface

Construct new filename based on unique label of spaces used to generate a CIFTI file.

Examples

>>> namer = CiftiNameSource()
>>> namer.inputs.space = 'fsLR'
>>> res = namer.run()
>>> res.outputs.out_name
'space-fsLR_bold.dtseries'
>>> namer.inputs.density = '32k'
>>> res = namer.run()
>>> res.outputs.out_name
'space-fsLR_den-32k_bold.dtseries'
Mandatory Inputs:

space (a string) – The space identifier.

Optional Inputs:

density (a string) – Density label.

Outputs:

out_name (a string) – (partial) filename formatted according to template.

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

Bases: SimpleInterface

Generate a HCP-style CIFTI image from BOLD file in target spaces.

Mandatory Inputs:
  • TR (a float) – Repetition time.

  • bold_file (a pathlike object or string representing an existing file) – Input BOLD file.

  • surface_bolds (a list of items which are a pathlike object or string representing an existing file) – List of surface BOLD GIFTI files (length 2 with order [L,R]).

Optional Inputs:
  • grayordinates (‘91k’ or ‘170k’) – Final CIFTI grayordinates. (Nipype default value: 91k)

  • surface_target (‘fsLR’) – CIFTI surface target space. (Nipype default value: fsLR)

  • volume_target (‘MNI152NLin6Asym’) – CIFTI volumetric output space. (Nipype default value: MNI152NLin6Asym)

Outputs:
  • out_file (a pathlike object or string representing a file) – Generated CIFTI file.

  • out_metadata (a pathlike object or string representing a file) – CIFTI metadata JSON.