The module nipy.labs.utils.mask contains utilities to extract brain masks from fMRI data:
compute_mask | |
compute_mask_files | |
compute_mask_sessions |
The compute_mask_files() and compute_mask_sessions() functions work with Nifti files rather than numpy ndarrays. This is convenient to reduce memory pressure when working with long time series, as there is no need to store the whole series in memory.