sdcflows.workflows.outputs module

Writing out outputs.

class sdcflows.workflows.outputs.DerivativesDataSink(allowed_entities=None, out_path_base=None, **inputs)[source]

Bases: DerivativesDataSink

Overload the out_path_base setting.

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 to match 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 string 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)

sdcflows.workflows.outputs.init_fmap_derivatives_wf(*, output_dir, bids_fmap_id=None, custom_entities=None, name='fmap_derivatives_wf', write_coeff=False)[source]

Set up datasinks to store derivatives in the right location.

Parameters:
  • output_dir (str) – Directory in which to save derivatives

  • bids_fmap_id (str) – Sets the B0FieldIdentifier metadata into the outputs.

  • custom_entities (dict) – Define extra entities that will be written out in filenames.

  • name (str) – Workflow name (default: "fmap_derivatives_wf")

  • write_coeff (bool) – Build the workflow path to map coefficients into target space.

Inputs:
  • source_files – One or more fieldmap file(s) of the BIDS dataset that will serve for naming reference.

  • fieldmap – The preprocessed fieldmap, in its original space with Hz units.

  • fmap_coeff – Field coefficient(s) file(s)

  • fmap_ref – An anatomical reference (e.g., magnitude file)

sdcflows.workflows.outputs.init_fmap_reports_wf(*, output_dir, fmap_type, bids_fmap_id=None, custom_entities=None, name='fmap_reports_wf')[source]

Set up a battery of datasinks to store reports in the right location.

Parameters:
  • fmap_type (str) – The fieldmap estimator type.

  • output_dir (str) – Directory in which to save derivatives

  • bids_fmap_id (str) – Sets the B0FieldIdentifier metadata into the outputs.

  • custom_entities (dict) – Define extra entities that will be written out in filenames.

  • name (str) – Workflow name (default: "fmap_reports_wf")

Inputs:
  • source_files – One or more fieldmap file(s) of the BIDS dataset that will serve for naming reference.

  • fieldmap – The preprocessed fieldmap, in its original space with Hz units.

  • fmap_ref – An anatomical reference (e.g., magnitude file)

  • fmap_mask – A brain mask in the fieldmap’s space.