xcp_d.interfaces.workbench.CiftiParcellate

class xcp_d.interfaces.workbench.CiftiParcellate(command=None, terminal_output=None, write_cmdline=False, **inputs)[source]

Wrapped executable: wb_command -cifti-parcellate.

Extract timeseries from CIFTI file.

The input cifti file must have a brain models mapping on the chosen dimension, columns for .dtseries.

Examples

>>> ciftiparcel = CiftiParcellate()
>>> ciftiparcel.inputs.in_file = 'sub-01XX_task-rest.dtseries.nii'
>>> ciftiparcel.inputs.out_file = 'sub_01XX_task-rest.ptseries.nii'
>>> ciftiparcel.inputs.atlas_label = 'schaefer_space-fsLR_den-32k_desc-400_atlas.dlabel.nii'
>>> ciftiparcel.inputs.direction = 'COLUMN'
>>> ciftiparcel.cmdline
wb_command -cifti-parcellate sub-01XX_task-rest.dtseries.nii     schaefer_space-fsLR_den-32k_desc-400_atlas.dlabel.nii COLUMN     sub_01XX_task-rest.ptseries.nii
Mandatory Inputs:
  • atlas_label (a pathlike object or string representing a file) – A cifti label file to use for the parcellation. Maps to a command-line argument: %s (position: 1).

  • direction (‘ROW’ or ‘COLUMN’) – Which mapping to parcellate (integer, ROW, or COLUMN). Maps to a command-line argument: %s (position: 2).

  • in_file (a pathlike object or string representing an existing file) – The cifti file to parcellate. Maps to a command-line argument: %s (position: 0).

Optional Inputs:
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • cerebellum_area_metric (a pathlike object or string representing an existing file) – Specify the cerebellum surface metricto use. Maps to a command-line argument: -cerebellum-area-metric %s (position: 10).

  • cerebellum_area_surf (a pathlike object or string representing an existing file) – Specify the cerebellum surface to use. Maps to a command-line argument: -cerebellum-area-surf %s (position: 7).

  • cifti_weights (a pathlike object or string representing an existing file) – Use a cifti file containing weights. Maps to a command-line argument: -cifti-weights %s (position: 11).

  • cor_method (‘MEAN’ or ‘MAX’ or ‘MIN’ or ‘INDEXMAX’ or ‘INDEXMIN’ or ‘SUM’ or ‘PRODUCT’ or ‘STDEV’ or ‘SAMPSTDEV’ or ‘VARIANCE’ or ‘TSNR’ or ‘COV’ or ‘L2NORM’ or ‘MEDIAN’ or ‘MODE’ or ‘COUNT_NONZERO’) – Specify method of parcellation (default MEAN, or MODE if label data). Maps to a command-line argument: -method %s (position: 12).

  • environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value: {})

  • left_area_metric (a pathlike object or string representing an existing file) – Specify the left surface metric to use. Maps to a command-line argument: -left-area-metric %s (position: 8).

  • left_area_surf (a pathlike object or string representing an existing file) – Specify the left surface to use. Maps to a command-line argument: -left-area-surface %s (position: 5).

  • only_numeric (a boolean) – Exclude non-numeric values. Maps to a command-line argument: -only-numeric (position: 13).

  • out_file (a pathlike object or string representing a file) – Output cifti file. Maps to a command-line argument: %s (position: 3).

  • right_area_metric (a pathlike object or string representing an existing file) – Specify the right surface metric to use. Maps to a command-line argument: -right-area-metric %s (position: 9).

  • right_area_surf (a pathlike object or string representing an existing file) – Specify the right surface to use. Maps to a command-line argument: -right-area-surface %s (position: 6).

  • spatial_weights (a string) – Use voxel volume and either vertex areas or metric files as weights. Maps to a command-line argument: -spatial-weights (position: 4).

Outputs:

out_file (a pathlike object or string representing an existing file) – Output CIFTI file.

__init__(command=None, terminal_output=None, write_cmdline=False, **inputs)[source]

Subclasses must implement __init__

Methods

__init__([command, terminal_output, ...])

Subclasses must implement __init__

aggregate_outputs([runtime, needed_outputs])

Collate expected outputs and apply output traits validation.

help([returnhelp])

Prints class help

load_inputs_from_json(json_file[, overwrite])

A convenient way to load pre-set inputs from a JSON file.

raise_exception(runtime)

run([cwd, ignore_exception])

Execute this interface.

save_inputs_to_json(json_file)

A convenient way to save current inputs to a JSON file.

set_default_terminal_output(output_type)

Set the default terminal output for CommandLine Interfaces.

version_from_command([flag, cmd])

Attributes

always_run

Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.

can_resume

Defines if the interface can reuse partial results after interruption.

cmd

sets base command, immutable

cmdline

command plus any arguments (args) validates arguments and generates command line

resource_monitor

terminal_output

version

interfaces should implement a version property

write_cmdline