dipy/data/fetcher.py
def fetch_bundles_2_subjects():
    """ Download 2 subjects with their bundles
    """
    url = 'https://dl.dropboxusercontent.com/u/2481924/'
    fname = 'bundles_2_subjects.tar.gz'
    url = url + fname
    folder = pjoin(dipy_home, 'exp_bundles_and_maps')

    url_list = [url]
    md5_list = ['97756fbef11ce2df31f1bedf1fc7aac7']
    fname_list = [fname]

    if not os.path.exists(folder):
        print('Creating new directory %s' % folder)
        os.makedirs(folder)
        print('Downloading dataset ...')
        for i in range(len(md5_list)):
            _get_file_data(pjoin(folder, fname_list[i]), url_list[i])
            new_path = pjoin(folder, fname_list[i])
            check_md5(new_path, md5_list[i])
            ar = tarfile.open(new_path)
            ar.extractall(path=folder)
            ar.close()

        print('Done.')
        print('Files copied in folder %s' % folder)
    else:
        msg = 'Dataset is already in place. If you want to fetch it again, '
        msg += 'please first remove the folder %s '
        print(msg % folder)
 Download 2 subjects with their bundles
    
Download 2 subjects with their bundles
Download 2 subjects with their bundles
def fetch_bundles_2_subjects():
    url = 'https://dl.dropboxusercontent.com/u/2481924/'
    fname = 'bundles_2_subjects.tar.gz'
    url = url + fname
    folder = pjoin(dipy_home, 'exp_bundles_and_maps')
    url_list = [url]
    md5_list = ['97756fbef11ce2df31f1bedf1fc7aac7']
    fname_list = [fname]
    if not os.path.exists(folder):
        print('Creating new directory %s' % folder)
        os.makedirs(folder)
        print('Downloading dataset ...')
        for i in range(len(md5_list)):
            _get_file_data(pjoin(folder, fname_list[i]), url_list[i])
            new_path = pjoin(folder, fname_list[i])
            check_md5(new_path, md5_list[i])
            ar = tarfile.open(new_path)
            ar.extractall(path=folder)
            ar.close()
        print('Done.')
        print('Files copied in folder %s' % folder)
    else:
        msg = 'Dataset is already in place. If you want to fetch it again, '
        msg += 'please first remove the folder %s '
        print(msg % folder)
def fetch_bundles_2_subjects ( ) : url = 'https://dl.dropboxusercontent.com/u/2481924/' fname = 'bundles_2_subjects.tar.gz' url = url + fname folder = pjoin ( dipy_home , 'exp_bundles_and_maps' ) url_list = [ url ] md5_list = [ '97756fbef11ce2df31f1bedf1fc7aac7' ] fname_list = [ fname ] if not os . path . exists ( folder ) : print ( 'Creating new directory %s' % folder ) os . makedirs ( folder ) print ( 'Downloading dataset ...' ) for i in range ( len ( md5_list ) ) : _get_file_data ( pjoin ( folder , fname_list [ i ] ) , url_list [ i ] ) new_path = pjoin ( folder , fname_list [ i ] ) check_md5 ( new_path , md5_list [ i ] ) ar = tarfile . open ( new_path ) ar . extractall ( path = folder ) ar . close ( ) print ( 'Done.' ) print ( 'Files copied in folder %s' % folder ) else : msg = 'Dataset is already in place. If you want to fetch it again, ' msg += 'please first remove the folder %s ' print ( msg % folder )
Download 2 subjects with their bundles
Download 2 subjects with their bundles
""" Download 2 subjects with their bundles
    """