skbold.utils.load_roi_mask module

load_nifti_and_check_space(nifti, reg_dir, return_array=True, **kwargs)[source]
load_roi_mask(roi_name, atlas_name='HarvardOxford-Cortical', lateralized=False, which_hemifield=None, threshold=0, maxprob=False, yeo_conservative=False, reg_dir=None, verbose=False)[source]

Loads a mask (from an atlas).

Parameters:
  • roi_name (str) – Name of the ROI (as specified in the FSL XML-files)
  • atlas_name (str) – Name of the atlas. Choose from: ‘HarvardOxford-Cortical’, ‘HarvardOxford-Subcortical’, ‘Yeo2011’.
  • lateralized (bool) – Whether to use lateralized masks (only available for Harvard- Oxford atlases). If this variable is specified, you have to specify which_hemifield too.
  • which_hemifield (str) – If lateralized is True, then which hemifield should be used?
  • threshold (int) – Threshold for probabilistic masks (everything below this threshold is set to zero before creating the mask).
  • maxprob (bool) – Whether to select only the voxels that have the highest probability of that particular ROI for a given threshold. Setting this option to true ensures that each mask has unique voxels (substantially slows down the function, though).
  • yeo_conservative (bool) – If Yeo2011 atlas is picked, whether the conservative or liberal atlas should be used.
  • reg_dir (str) – Absolute path to directory with registration info (in FSL format), for if you want to automatically warp the mask to native (EPI) space!
  • return_path (bool) – Whether to return the path to the ROI/mask or the loaded corresponding numpy array.
Returns:

  • mask ((list of) numpy-array(s)) – Boolean numpy array(s) indicating the ROI-mask(s).
  • mask_names ((list of) str) – Name of the mask corresponding to the numpy-array

print_mask_options(atlas_name='HarvardOxford-Cortical')[source]

Prints the options for ROIs given a certain atlas.

Parameters:atlas_name (str) – Name of the atlas. Availabel: ‘HarvardOxford-Cortical’, ‘HarvardOxford-Subcortical’, ‘Yeo2011’.