xcp_d.interfaces.workbench.CiftiCreateDenseScalar

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

Wrapped executable: wb_command -cifti-create-dense-scalar.

Extract volumetric data from CIFTI file (.dtseries).

Other structures can also be extracted. The input cifti file must have a brain models mapping on the chosen dimension, columns for .dtseries,

Examples

>>> cifticreatedensescalar = CiftiCreateDenseScalar()
>>> cifticreatedensescalar.inputs.out_file = 'sub_01_task-rest.dscalar.nii'
>>> cifticreatedensescalar.inputs.left_metric = 'sub_01_task-rest_hemi-L.func.gii'
>>> cifticreatedensescalar.inputs.left_metric = 'sub_01_task-rest_hemi-R.func.gii'
>>> cifticreatedensescalar.inputs.volume_data = 'sub_01_task-rest_subcortical.nii.gz'
>>> cifticreatedensescalar.inputs.structure_label_volume = 'sub_01_task-rest_labels.nii.gz'
>>> cifticreatedensescalar.cmdline
wb_command -cifti-create-dense-scalar 'sub_01_task-rest.dscalar.nii'         -left-metric 'sub_01_task-rest_hemi-L.func.gii'         -right-metric 'sub_01_task-rest_hemi-R.func.gii'         -volume-data 'sub_01_task-rest_subcortical.nii.gz' 'sub_01_task-rest_labels.nii.gz'
Mandatory Inputs:
  • left_metric (a pathlike object or string representing an existing file) – The input surface data from the left hemisphere. Maps to a command-line argument: -left-metric %s (position: 1).

  • right_metric (a pathlike object or string representing an existing file) – The input surface data from the right hemisphere. Maps to a command-line argument: -right-metric %s (position: 2).

  • structure_label_volume (a pathlike object or string representing an existing file) – A label file indicating the structure of each voxel in volume_data. Maps to a command-line argument: %s (position: 4).

  • volume_data (a pathlike object or string representing an existing file) – The input volumetric data. Maps to a command-line argument: -volume %s (position: 3).

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

  • 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: {})

  • out_file (a pathlike object or string representing a file) – The CIFTI output. Maps to a command-line argument: %s (position: 0).

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