niworkflows.interfaces.probmaps module

Utilities.

class niworkflows.interfaces.probmaps.AddTPMs(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Calculate the union of several TPMs.

Mandatory Inputs:

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

Optional Inputs:

indices (a list of items which are an integer) – Select specific maps.

Outputs:

out_file (a pathlike object or string representing an existing file) – Union of binarized input files.

class niworkflows.interfaces.probmaps.TPM2ROI(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Convert tissue probability maps (TPMs) into ROIs.

This interface follows the following logic:

  1. Erode in_mask by mask_erode_mm and apply to in_tpm

  2. Threshold masked TPM at prob_thresh

  3. Erode resulting mask by erode_mm

Mandatory Inputs:
  • in_mask (a pathlike object or string representing an existing file) – Binary mask of skull-stripped T1w image.

  • in_tpm (a pathlike object or string representing an existing file) – Tissue probability map file in T1 space.

Optional Inputs:
  • erode_mm (a float) – Erode output mask (kernel width in mm). Mutually exclusive with inputs: erode_prop.

  • erode_prop (a float) – Erode output mask (target volume ratio). Mutually exclusive with inputs: erode_mm.

  • mask_erode_mm (a float) – Erode input mask (kernel width in mm). Mutually exclusive with inputs: mask_erode_prop.

  • mask_erode_prop (a float) – Erode input mask (target volume ratio). Mutually exclusive with inputs: mask_erode_mm.

  • prob_thresh (a float) – Threshold for the tissue probability maps. (Nipype default value: 0.95)

Outputs:
  • eroded_mask (a pathlike object or string representing an existing file) – Resulting eroded mask.

  • roi_file (a pathlike object or string representing an existing file) – Output ROI file.