xcp_d.interfaces.bids.DerivativesDataSink
- class xcp_d.interfaces.bids.DerivativesDataSink(allowed_entities=None, out_path_base=None, **inputs)[source]
Store derivative files.
A child class of the niworkflows DerivativesDataSink, using xcp_d’s configuration files.
- Mandatory Inputs:
in_file (a list of items which are a pathlike object or string representing an existing file) – The object to be saved.
source_file (a list of items which are a pathlike object or string representing a file) – The source file(s) to extract entities from.
- Optional Inputs:
base_directory (a string or os.PathLike object) – Path to the base directory for storing data.
check_hdr (a boolean) – Fix headers of NIfTI outputs. (Nipype default value:
True
)compress (a list of items which are a boolean or None) – Whether
in_file
should be compressed (True), uncompressed (False) or left unmodified (None, default). (Nipype default value:[]
)data_dtype (a string) – NumPy datatype to coerce NIfTI data to, or source tomatch the input file dtype.
dismiss_entities (a list of items which are a string or None) – A list entities that will not be propagated from the source file. (Nipype default value:
[]
)meta_dict (a dictionary with keys which are a value of class ‘str’ and with values which are any value) – An input dictionary containing metadata.
- Outputs:
compression (a list of items which are a boolean or None) – Whether
in_file
should be compressed (True), uncompressed (False) or left unmodified (None).fixed_hdr (a list of items which are a boolean) – Whether derivative header was fixed.
out_file (a list of items which are a pathlike object or string representing an existing file)
out_meta (a list of items which are a pathlike object or string representing an existing file)
- __init__(allowed_entities=None, out_path_base=None, **inputs)[source]
Initialize the SimpleInterface and extend inputs with custom entities.
Methods
__init__
([allowed_entities, out_path_base])Initialize the SimpleInterface and extend inputs with custom entities.
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