niworkflows.interfaces.nilearn module

Utilities based on nilearn.

class niworkflows.interfaces.nilearn.ComputeEPIMask(generate_report=False, **kwargs)[source]

Bases: SegmentationRC

Optional Inputs:
  • compress_report (‘auto’ or True or False) – Compress the reportlet using SVGO orWEBP. ‘auto’ - compress if relevant software is installed, True = force,False - don’t attempt to compress. (Nipype default value: auto)

  • dilation (an integer) – Binary dilation on the nilearn output.

  • in_file (a pathlike object or string representing an existing file) – 3D or 4D EPI file.

  • out_report (a pathlike object or string representing a file) – Filename for the visual report. (Nipype default value: report.svg)

Outputs:
  • mask_file (a pathlike object or string representing an existing file) – Binary brain mask.

  • out_report (a pathlike object or string representing a file) – Filename for the visual report.

class niworkflows.interfaces.nilearn.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 niworkflows.interfaces.nilearn.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.