data
¶
Read test or example data.
|
Returns the directory component of a pathname |
Download icons for fury |
|
|
Join two or more pathname components, inserting ‘/’ as needed. |
|
Read specific icon from specific style. |
Module: data.fetcher
¶
Fetcher based on dipy.
|
Compute the md5 of filename. |
|
copy data from file-like object fsrc to file-like object fdst |
|
|
|
Downloads files to folder and checks their md5 checksums. |
Download icons for fury |
|
Returns a md5 hash object; optionally initialized with a string |
|
|
Join two or more pathname components, inserting ‘/’ as needed. |
|
Read specific icon from specific style. |
|
Show progressbar. |
pjoin¶
-
fury.data.
pjoin
(a, *p)¶ Join two or more pathname components, inserting ‘/’ as needed. If any component is an absolute path, all previous path components will be discarded. An empty last part will result in a path that ends with a separator.
read_viz_icons¶
-
fury.data.
read_viz_icons
(style='icomoon', fname='infinity.png')[source]¶ Read specific icon from specific style.
- Parameters
- stylestr
Current icon style. Default is icomoon.
- fnamestr
Filename of icon. This should be found in folder HOME/.fury/style/. Default is infinity.png.
- Returns
- pathstr
Complete path of icon.
check_md5¶
copyfileobj¶
copyfileobj_withprogress¶
fetch_data¶
-
fury.data.fetcher.
fetch_data
(files, folder, data_size=None)[source]¶ Downloads files to folder and checks their md5 checksums.
- Parameters
- filesdictionary
For each file in files the value should be (url, md5). The file will be downloaded from url if the file does not already exist or if the file exists but the md5 checksum does not match.
- folderstr
The directory where to save the file, the directory will be created if it does not already exist.
- data_sizestr, optional
A string describing the size of the data (e.g. “91 MB”) to be logged to the screen. Default does not produce any information about data size.
- Raises
- FetcherError
Raises if the md5 checksum of the file does not match the expected value. The downloaded file is not deleted when this error is raised.
pjoin¶
-
fury.data.fetcher.
pjoin
(a, *p)¶ Join two or more pathname components, inserting ‘/’ as needed. If any component is an absolute path, all previous path components will be discarded. An empty last part will result in a path that ends with a separator.
read_viz_icons¶
-
fury.data.fetcher.
read_viz_icons
(style='icomoon', fname='infinity.png')[source]¶ Read specific icon from specific style.
- Parameters
- stylestr
Current icon style. Default is icomoon.
- fnamestr
Filename of icon. This should be found in folder HOME/.fury/style/. Default is infinity.png.
- Returns
- pathstr
Complete path of icon.