aslprep.niworkflows.interfaces package

ApplyTransforms[source]

alias of ANTSApplyTransformsRPT

ApplyXFM[source]

alias of ApplyXFMRPT

BET[source]

alias of BETRPT

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

Bases: SimpleInterface

Plot the number of components necessary to explain the specified levels of variance.

Mandatory Inputs:

metadata_files (a list of items which are a pathlike object or string representing an existing file) – List of files containing component metadata.

Optional Inputs:
  • metadata_sources (a list of items which are a string) – List of names of decompositions (e.g., aCompCor, tCompCor) yielding the arguments in metadata_files.

  • out_file (a pathlike object or string representing a file or None) – Path to save plot. (Nipype default value: None)

  • variance_thresholds (a tuple of the form: (a float, a float, a float)) – Levels of explained variance to include in plot. (Nipype default value: (0.5, 0.7, 0.9))

Outputs:

out_file (a pathlike object or string representing an existing file) – Path to saved plot.

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

Bases: SimpleInterface

Plot the correlation among confound regressors.

Mandatory Inputs:

confounds_file (a pathlike object or string representing an existing file) – File containing confound regressors.

Optional Inputs:
  • max_dim (an integer) – Maximum number of regressors to include in plot. Regressors with highest magnitude of correlation with reference_column will be selected. (Nipype default value: 70)

  • out_file (a pathlike object or string representing a file or None) – Path to save plot. (Nipype default value: None)

  • reference_column (a string) – Column in the confound file for which all correlation magnitudes should be ranked and plotted. (Nipype default value: global_signal)

Outputs:

out_file (a pathlike object or string representing an existing file) – Path to saved plot.

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

Bases: SimpleInterface

Copy a header from the hdr_file to out_file with data drawn from in_file.

Mandatory Inputs:
  • hdr_file (a pathlike object or string representing an existing file) – The file we get the header from.

  • in_file (a pathlike object or string representing an existing file) – The file we get the data from.

Outputs:

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

class CopyXForm(fields=None, **inputs)[source]

Bases: SimpleInterface

Copy the x-form matrices from hdr_file to out_file.

Mandatory Inputs:

hdr_file (a pathlike object or string representing an existing file) – The file we get the header from.

output_spec[source]

alias of DynamicTraitedSpec

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

Bases: SimpleInterface

Expand a confound model according to a specified formula.

Mandatory Inputs:

confounds_file (a pathlike object or string representing an existing file) – TSV containing confound time series for expansion according to the specified formula.

Optional Inputs:
  • model_formula (a string) – Formula for generating model expansions. By default, the 32-parameter expansion will be generated. Note that any expressions to be expanded must be in parentheses, even if they include only a single variable (e.g., (x)^2, not x^2).

    Examples: * rps + wm + csf + gsr : 9-parameter model. rps denotes realignment

    parameters, wm denotes mean white matter signal, csf denotes mean cerebrospinal fluid signal, and gsr denotes mean global signal.

    • (dd1(rps + wm + csf + gsr))^^2 : 36-parameter expansion. rps + wm + csf + gsr denotes that realignment parameters and mean WM, CSF, and global signals should be included. dd1 denotes that these signals should be augmented with their first temporal derivatives. ^^2 denotes that the original signals and temporal derivatives should be augmented with quadratic expansions.

    • (dd1(rps))^^2 : 24-parameter expansion. rps denotes that realignment parameters should be included. dd1 and ^^2 denote temporal derivative and quadratic expansions as above.

    • (dd1(rps + wm + csf + gsr))^^2 + others : generate all expansion terms necessary for a 36-parameter model as above, and concatenate those expansion terms to all other regressor columns in the confounds file.

    (Nipype default value: (dd1(rps + wm + csf + gsr))^^2 + others)

  • output_file (a pathlike object or string representing a file) – Output path.

Outputs:

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

FAST[source]

alias of FASTRPT

FLIRT[source]

alias of FLIRTRPT

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

Bases: SimpleInterface

Prepare an fMRI summary plot for the report.

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

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

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

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

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

Optional Inputs:
  • fd_thres (a float) – (Nipype default value: 0.2)

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

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

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

Outputs:

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

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

Bases: SimpleInterface

Convert input motion parameters into the designated convention.

Mandatory Inputs:

in_file (a pathlike object or string representing an existing file) – The input parameters file.

Optional Inputs:

format (‘FSL’ or ‘AFNI’ or ‘FSFAST’ or ‘NIPY’) – Output format. (Nipype default value: FSL)

Outputs:

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

Registration[source]

alias of ANTSRegistrationRPT

RobustMNINormalization[source]

alias of RobustMNINormalizationRPT

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

Bases: SimpleInterface

Check the correctness of x-form headers (matrix and code) and fixes problematic combinations of values. Removes any extension form the header if present. This interface implements the following logic: +——————-+——————+——————+——————+————————————————+ | valid quaternions | qform_code > 0 | sform_code > 0 | qform == sform | actions | +===================+==================+==================+==================+================================================+ | True | True | True | True | None | +——————-+——————+——————+——————+————————————————+ | True | True | False | * | sform, scode <- qform, qcode | +——————-+——————+——————+——————+————————————————+ | * | True | * | False | sform, scode <- qform, qcode | +——————-+——————+——————+——————+————————————————+ | * | False | True | * | qform, qcode <- sform, scode | +——————-+——————+——————+——————+————————————————+ | * | False | False | * | sform, qform <- best affine; scode, qcode <- 1 | +——————-+——————+——————+——————+————————————————+ | False | * | False | * | sform, qform <- best affine; scode, qcode <- 1 | +——————-+——————+——————+——————+————————————————+

Mandatory Inputs:

in_file (a pathlike object or string representing an existing file) – Input image.

Optional Inputs:
  • max_32bit (a boolean) – Cast data to float32 if higher precision is encountered. (Nipype default value: False)

  • n_volumes_to_discard (an integer) – Discard n first volumes. (Nipype default value: 0)

Outputs:
  • out_file (a pathlike object or string representing an existing file) – Validated image.

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

SimpleBeforeAfter[source]

alias of SimpleBeforeAfterRPT

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

Bases: SimpleInterface

Generate spike regressors.

Mandatory Inputs:

confounds_file (a pathlike object or string representing an existing file) – TSV containing criterion time series (e.g., framewise displacement, DVARS) to be used for creating spike regressors.

Optional Inputs:
  • concatenate (a boolean) – Indicates whether to concatenate spikes to existing confounds or return spikes only. (Nipype default value: True)

  • dvars_thresh (a float) – Minimum standardised DVARS threshold for flagging a frame as a spike. (Nipype default value: 1.5)

  • fd_thresh (a float) – Minimum framewise displacement threshold for flagging a frame as a spike. (Nipype default value: 0.5)

  • header_prefix (a string) – Prefix for spikes in the output TSV header. (Nipype default value: motion_outlier)

  • lags (a list of items which are an integer) – Relative indices of lagging frames to flag for each flagged frame. (Nipype default value: [0])

  • minimum_contiguous (an integer or None) – Minimum number of contiguous volumes required to avoid flagging as a spike. (Nipype default value: None)

  • output_file (a pathlike object or string representing a file) – Output path.

  • output_format (‘spikes’ or ‘mask’) – Format of output (spikes or mask). (Nipype default value: spikes)

Outputs:

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

Submodules