aslprep.niworkflows.interfaces.nilearn module

Utilities based on nilearn.

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

Bases: SimpleInterface

Run Nilearn’s compute_epi_mask.

Mandatory Inputs:

in_files (a list of items which are a pathlike object or string representing an existing file) – Input EPI or list of files.

Optional Inputs:
  • closing (a boolean) – (Nipype default value: True)

  • connected (a boolean) – (Nipype default value: True)

  • enhance_t2 (a boolean) – Enhance T2 contrast on image. (Nipype default value: False)

  • ensure_finite (a boolean) – (Nipype default value: True)

  • exclude_zeros (a boolean) – (Nipype default value: False)

  • fill_holes (a boolean) – (Nipype default value: True)

  • lower_cutoff (a float) – (Nipype default value: 0.2)

  • no_sanitize (a boolean) – (Nipype default value: False)

  • opening (an integer) – (Nipype default value: 2)

  • target_affine (a string or os.PathLike object referring to an existing file or None) – (Nipype default value: None)

  • target_shape (a string or os.PathLike object referring to an existing file or None) – (Nipype default value: None)

  • upper_cutoff (a float) – (Nipype default value: 0.85)

Outputs:

out_mask (a pathlike object or string representing an existing file) – Output mask.

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

Bases: SimpleInterface

Run Nilearn’s concat_imgs.

Mandatory Inputs:

in_files (a list of items which are a pathlike object or string representing an existing file) – Input list of files to merge.

Optional Inputs:
  • compress (a boolean) – Use gzip compression on .nii output. (Nipype default value: True)

  • dtype (‘f4’ or ‘f8’ or ‘u1’ or ‘u2’ or ‘u4’ or ‘i2’ or ‘i4’) – Numpy dtype of output image. (Nipype default value: f4)

  • header_source (a pathlike object or string representing an existing file) – A Nifti file from which the header should be copied.

Outputs:

out_file (a pathlike object or string representing an existing file) – Output merged file.