xcp_d.interfaces.workbench.CiftiCreateDenseFromTemplate
- class xcp_d.interfaces.workbench.CiftiCreateDenseFromTemplate(command=None, terminal_output=None, write_cmdline=False, **inputs)[source]
Wrapped executable:
wb_command -cifti-create-dense-from-template
.Create CIFTI with matching dense map.
This command helps you make a new dscalar, dtseries, or dlabel cifti file that matches the brainordinate space used in another cifti file. The template file must have the desired brainordinate space in the mapping along the column direction (for dtseries, dscalar, dlabel, and symmetric dconn this is always the case). All input cifti files must have a brain models mapping along column and use the same volume space and/or surface vertex count as the template for structures that they contain. If any input files contain label data, then input files with non-label data are not allowed, and the -series option may not be used.
Any structure that isn’t covered by an input is filled with zeros or the unlabeled key.
Examples
>>> ccdft = CiftiCreateDenseFromTemplate() >>> ccdft.inputs.template_cifti = "sub-01_task-rest_bold.dtseries.nii" >>> ccdft.inputs.label = "parcellation.dlabel.nii" >>> ccdft.cmdline wb_command -cifti-create-dense-from-template sub-01_task-rest_bold.dtseries.nii resampled_parcellation.dlabel.nii -label parcellation.dlabel.nii
- Mandatory Inputs:
label (a pathlike object or string representing an existing file) – Use input data from surface label files. Input label file. Maps to a command-line argument:
-cifti %s
(position: 2).template_cifti (a pathlike object or string representing an existing file) – File to match brainordinates of. 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
.cifti_out (a pathlike object or string representing a file) – The output cifti file. Maps to a command-line argument:
%s
(position: 1).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:
{}
)
- Outputs:
cifti_out (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