Source code for nidata.atlas.msdl_atlas

# *- encoding: utf-8 -*-
# Author: Alexandre Abraham, Philippe Gervais
# License: simplified BSD

import os.path as op


from ...core.datasets import HttpDataset


[docs]class MSDLDataset(HttpDataset): """Download and load the MSDL brain atlas. Parameters ---------- data_dir: string, optional Path of the data directory. Used to force data storage in a specified location. Default: None url: string, optional Override download URL. Used for test only (or if you setup a mirror of the data). Returns ------- data: dict Dictionary-like object, the interest attributes are : - 'labels': str. Path to csv file containing labels. - 'maps': str. path to nifti file containing regions definition. References ---------- :Download: https://team.inria.fr/parietal/files/2015/01/MSDL_rois.zip :Paper to cite: `Multi-subject dictionary learning to segment an atlas of brain spontaneous activity <http://hal.inria.fr/inria-00588898/en>`_ Gaël Varoquaux, Alexandre Gramfort, Fabian Pedregosa, Vincent Michel, Bertrand Thirion. Information Processing in Medical Imaging, 2011, pp. 562-573, Lecture Notes in Computer Science. :Other references: `Learning and comparing functional connectomes across subjects <http://hal.inria.fr/hal-00812911/en>`_. Gaël Varoquaux, R.C. Craddock NeuroImage, 2013. """
[docs] def fetch(self, url=None, resume=True, verbose=1): url = 'https://team.inria.fr/parietal/files/2015/01/MSDL_rois.zip' opts = {'uncompress': True} files = [(op.join('MSDL_rois', 'msdl_rois_labels.csv'), url, opts), (op.join('MSDL_rois', 'msdl_rois.nii'), url, opts)] files = self.fetcher.fetch(files, force=not resume, verbose=verbose) return dict(labels=files[0], maps=files[1])
[docs]def fetch_msdl_atlas(data_dir=None, url=None, resume=True, verbose=1): return MSDLDataset(data_dir=data_dir) \ .fetch(url=url, resume=resume, verbose=verbose)