nimare.utils.get_masker

get_masker(mask, memory=Memory(location=None), memory_level=1)[source]

Get an initialized, fitted nilearn Masker instance from passed argument.

Parameters:
  • mask (str, nibabel.nifti1.Nifti1Image, or any nilearn Masker) –

  • memory (instance of joblib.Memory, str, or pathlib.Path) – Used to cache the output of a function. By default, no caching is done. If a str is given, it is the path to the caching directory.

  • memory_level (int, default=1) – Rough estimator of the amount of memory used by caching. Higher value means more memory for caching. Zero means no caching.

Returns:

maskernilearn.input_data.base_masker.BaseMasker

Return type:

an initialized, fitted instance of a subclass of