xcp_d.interfaces.censoring.RemoveDummyVolumes
- class xcp_d.interfaces.censoring.RemoveDummyVolumes(from_file=None, resource_monitor=None, **inputs)[source]
Removes initial volumes from a nifti or cifti file.
A bold file and its corresponding confounds TSV (fmriprep format) are adjusted to remove the first n seconds of data.
- Mandatory Inputs:
bold_file (a pathlike object or string representing an existing file) – Either cifti or nifti .
confounds_file (a pathlike object or string representing an existing file) – TSV file with selected confounds for denoising.
dummy_scans (an integer or ‘auto’) – Number of volumes to drop from the beginning, calculated in an earlier workflow from dummy_scans.
fmriprep_confounds_file (a pathlike object or string representing an existing file) – FMRIPrep confounds tsv. Used for motion-based censoring.
motion_file (a pathlike object or string representing an existing file) – Confounds file containing only filtered motion parameters.
temporal_mask (a pathlike object or string representing an existing file) – Temporal mask file.
- Outputs:
bold_file_dropped_TR (a pathlike object or string representing an existing file) – Bold or cifti with volumes dropped.
confounds_file_dropped_TR (a pathlike object or string representing an existing file) – TSV file with selected confounds for denoising, after removing TRs.
dummy_scans (an integer) – Number of volumes dropped.
fmriprep_confounds_file_dropped_TR (a pathlike object or string representing an existing file) – FMRIPrep confounds tsv after removing TRs. Used for motion-based censoring.
motion_file_dropped_TR (a pathlike object or string representing an existing file) – Confounds file containing only filtered motion parameters.
temporal_mask_dropped_TR (a pathlike object or string representing an existing file) – Temporal mask file.
- __init__(from_file=None, resource_monitor=None, **inputs)[source]
Subclasses must implement __init__
Methods
__init__
([from_file, resource_monitor])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.
run
([cwd, ignore_exception])Execute this interface.
save_inputs_to_json
(json_file)A convenient way to save current inputs to a JSON file.
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.
resource_monitor
version
interfaces should implement a version property