aslprep.interfaces package

Nipype interfaces for aslprep.

class ASLSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Copy the x-form matrices from hdr_file to out_file.

Clearly that’s wrong.

Mandatory Inputs:

in_func (a pathlike object or string representing an existing file) – Input ASL time-series (4D file).

Optional Inputs:
  • confounds_file (a pathlike object or string representing an existing file) – BIDS’ _confounds.tsv file.

  • confounds_list (a list of at least 1 items which are a string or a tuple of the form: (a string, a string or None) or a tuple of the form: (a string, a string or None, a string or None)) – List of headers to extract from the confounds_file.

  • in_mask (a pathlike object or string representing an existing file) – 3D brain mask.

  • in_segm (a pathlike object or string representing an existing file) – Resampled segmentation.

  • str_or_tuple (a string or a tuple of the form: (a string, a string or None) or a tuple of the form: (a string, a string or None, a string or None))

  • tr (a float or None) – The repetition time. (Nipype default value: None)

Outputs:

out_file (a pathlike object or string representing an existing file) – Written file path.

class AboutSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SummaryInterface

A basic summary of the ASLPrep run.

Optional Inputs:
  • command (a string) – ASLPREP command.

  • version (a string) – ASLPREP version.

Outputs:

out_report (a pathlike object or string representing an existing file) – HTML segment containing summary.

class CBFSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Prepare an CBF summary plot for the report.

This plot restricts CBF values to -20 (if there are negative values) or 0 (if not) to 100.

Mandatory Inputs:
  • cbf (a pathlike object or string representing an existing file)

  • label (a string) – Label.

  • ref_vol (a pathlike object or string representing an existing file)

  • vmax (an integer) – Max value of asl.

Outputs:

out_file (a pathlike object or string representing an existing file) – Written file path.

class CBFtsSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Prepare an CBF summary plot for the report.

Mandatory Inputs:
  • cbf_ts (a pathlike object or string representing an existing file) – cbf time series.

  • seg_file (a pathlike object or string representing an existing file) – Seg_file.

  • tr (a float) – TR.

Optional Inputs:
  • confounds_file (a pathlike object or string representing an existing file) – Confound file .

  • score_outlier_index (a pathlike object or string representing an existing file) – Scorexindex file .

Outputs:

out_file (a pathlike object or string representing an existing file) – Written file path.

class DerivativesDataSink(allowed_entities=None, out_path_base=None, **inputs)[source]

Bases: DerivativesDataSink

Store derivative files.

A child class of the niworkflows DerivativesDataSink, using aslprep’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)

out_path_base = 'aslprep'
class FunctionalSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SummaryInterface

A summary of a functional run, with QC measures included.

Mandatory Inputs:
  • distortion_correction (a string) – Susceptibility distortion correction method.

  • pe_direction (None or ‘i’ or ‘i-’ or ‘j’ or ‘j-’) – Phase-encoding direction detected.

  • registration (‘FSL’ or ‘FreeSurfer’) – Functional/anatomical registration method.

  • registration_dof (6 or 9 or 12) – Registration degrees of freedom.

  • registration_init (‘register’ or ‘header’) – Whether to initialize registration with the “header” or by centering the volumes (“register”).

  • tr (a float) – Repetition time.

Optional Inputs:
  • confounds_file (a pathlike object or string representing an existing file) – Confounds file.

  • fallback (a boolean) – Boundary-based registration rejected.

  • qc_file (a pathlike object or string representing an existing file) – Qc file.

Outputs:

out_report (a pathlike object or string representing an existing file) – HTML segment containing summary.

class GatherConfounds(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Combine various sources of confounds in one TSV file.

Optional Inputs:
  • dvars (a pathlike object or string representing an existing file) – File containing DVARS.

  • fd (a pathlike object or string representing an existing file) – Input framewise displacement.

  • motion (a pathlike object or string representing an existing file) – Input motion parameters.

  • rmsd (a pathlike object or string representing an existing file) – Input RMS framewise displacement.

  • signals (a pathlike object or string representing an existing file) – Input signals.

  • std_dvars (a pathlike object or string representing an existing file) – File containing standardized DVARS.

Outputs:
  • confounds_file (a pathlike object or string representing an existing file) – Output confounds file.

  • confounds_list (a list of items which are a string) – List of headers.

class SubjectSummary(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SummaryInterface

A summary describing the subject’s data as a whole.

Optional Inputs:
  • asl (a list of items which are a pathlike object or string representing an existing file or a list of items which are a pathlike object or string representing an existing file) – ASL functional series.

  • nstd_spaces (a list of items which are a string) – List of non-standard spaces.

  • std_spaces (a list of items which are a string) – List of standard spaces.

  • subject_id (a string) – Subject ID.

  • subjects_dir (a pathlike object or string representing a directory) – FreeSurfer subjects directory.

  • t1w (a list of items which are a pathlike object or string representing an existing file) – T1w structural images.

  • t2w (a list of items which are a pathlike object or string representing an existing file) – T2w structural images.

Outputs:
  • out_report (a pathlike object or string representing an existing file) – HTML segment containing summary.

  • subject_id (a string) – FreeSurfer subject ID.

Submodules