data
#
Read or fetch test or example data.
|
Returns the directory component of a pathname |
|
Download glTF samples from Khronos Group Github. |
Download cube map textures for fury |
|
Download icons for fury |
|
Download the models for shader tutorial |
|
Download the new icons for DrawPanel |
|
Download textures for fury |
|
Download the following wiki informationInterdisciplinary map of the journals |
|
Returns all model name from the glTF-samples repository |
|
|
Join two or more pathname components, inserting '/' as needed. |
|
Read specific cube map with specific suffix type and extension. |
|
Read specific dMRI image. |
|
Read specific gltf sample. |
|
Read specific icon from specific style. |
|
Read specific model. |
|
Read specific texture. |
Module: data.fetcher
#
Fetcher based on dipy.
|
Check the generated sha checksum. |
|
copy data from file-like object fsrc to file-like object fdst |
|
|
|
Returns the directory component of a pathname |
|
Download files to folder and checks their sha checksums. |
|
Download glTF samples from Khronos Group Github. |
Download cube map textures for fury |
|
Download icons for fury |
|
Download the models for shader tutorial |
|
Download the new icons for DrawPanel |
|
Download textures for fury |
|
Download the following wiki informationInterdisciplinary map of the journals |
|
Returns all model name from the glTF-samples repository |
|
|
Join two or more pathname components, inserting '/' as needed. |
|
Read specific cube map with specific suffix type and extension. |
|
Read specific dMRI image. |
|
Read specific gltf sample. |
|
Read specific icon from specific style. |
|
Read specific model. |
|
Read specific texture. |
|
Returns a sha256 hash object; optionally initialized with a string |
|
Show progressbar. |
dirname#
fetch_gltf#
- fury.data.fetch_gltf(name=None, mode='glTF')[source]#
Download glTF samples from Khronos Group Github.
- Parameters:
name (str, list, optional) – Name of the glTF model (for e.g. Box, BoxTextured, FlightHelmet, etc) KhronosGroup/glTF-Sample-Models Default: None, Downloads essential glTF samples for tests.
mode (str, optional) – Type of glTF format. You can choose from different options (e.g. glTF, glTF-Embedded, glTF-Binary, glTF-Draco) Default: glTF, .bin and texture files are stored separately.
- Returns:
filenames – tuple of feteched filenames (list) and folder (str) path.
- Return type:
fetch_viz_cubemaps#
- fury.data.fetch_viz_cubemaps()#
Download cube map textures for fury
fetch_viz_dmri#
- fury.data.fetch_viz_dmri()#
fetch_viz_icons#
- fury.data.fetch_viz_icons()#
Download icons for fury
fetch_viz_models#
- fury.data.fetch_viz_models()#
Download the models for shader tutorial
fetch_viz_new_icons#
- fury.data.fetch_viz_new_icons()#
Download the new icons for DrawPanel
fetch_viz_textures#
- fury.data.fetch_viz_textures()#
Download textures for fury
fetch_viz_wiki_nw#
- fury.data.fetch_viz_wiki_nw()#
Download the following wiki informationInterdisciplinary map of the journals
list_gltf_sample_models#
- fury.data.list_gltf_sample_models()[source]#
Returns all model name from the glTF-samples repository
- Returns:
model_names – Lists the name of glTF sample from KhronosGroup/glTF-Sample-Models
- Return type:
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_cubemap#
- fury.data.read_viz_cubemap(name, suffix_type=1, ext='.jpg')[source]#
Read specific cube map with specific suffix type and extension.
- Parameters:
name (str) –
suffix_type (int, optional) – 0 for numeric suffix (e.g., skybox_0.jpg, skybox_1.jpg, etc.), 1 for -p/nC encoding where C is either x, y or z (e.g., skybox-px.jpeg, skybox-ny.jpeg, etc.), 2 for pos/negC where C is either x, y, z (e.g., skybox_posx.png, skybox_negy.png, etc.), and 3 for position in the cube map (e.g., skybox_right.jpg, skybox_front.jpg, etc).
ext (str, optional) – Image type extension. (.jpg, .jpeg, .png, etc.).
- Returns:
list of paths – List with the complete paths of the skybox textures.
- Return type:
read_viz_dmri#
read_viz_gltf#
read_viz_icons#
read_viz_models#
read_viz_textures#
check_sha#
copyfileobj#
copyfileobj_withprogress#
dirname#
fetch_data#
- fury.data.fetcher.fetch_data(files, folder, data_size=None)[source]#
Download files to folder and checks their sha checksums.
- Parameters:
files (dictionary) – For each file in files the value should be (url, sha). The file will be downloaded from url if the file does not already exist or if the file exists but the sha checksum does not match.
folder (str) – The directory where to save the file, the directory will be created if it does not already exist.
data_size (str, 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 sha checksum of the file does not match the expected value. The downloaded file is not deleted when this error is raised.
fetch_gltf#
- fury.data.fetcher.fetch_gltf(name=None, mode='glTF')[source]#
Download glTF samples from Khronos Group Github.
- Parameters:
name (str, list, optional) – Name of the glTF model (for e.g. Box, BoxTextured, FlightHelmet, etc) KhronosGroup/glTF-Sample-Models Default: None, Downloads essential glTF samples for tests.
mode (str, optional) – Type of glTF format. You can choose from different options (e.g. glTF, glTF-Embedded, glTF-Binary, glTF-Draco) Default: glTF, .bin and texture files are stored separately.
- Returns:
filenames – tuple of feteched filenames (list) and folder (str) path.
- Return type:
fetch_viz_cubemaps#
- fury.data.fetcher.fetch_viz_cubemaps()#
Download cube map textures for fury
fetch_viz_dmri#
- fury.data.fetcher.fetch_viz_dmri()#
fetch_viz_icons#
- fury.data.fetcher.fetch_viz_icons()#
Download icons for fury
fetch_viz_models#
- fury.data.fetcher.fetch_viz_models()#
Download the models for shader tutorial
fetch_viz_new_icons#
- fury.data.fetcher.fetch_viz_new_icons()#
Download the new icons for DrawPanel
fetch_viz_textures#
- fury.data.fetcher.fetch_viz_textures()#
Download textures for fury
fetch_viz_wiki_nw#
- fury.data.fetcher.fetch_viz_wiki_nw()#
Download the following wiki informationInterdisciplinary map of the journals
list_gltf_sample_models#
- fury.data.fetcher.list_gltf_sample_models()[source]#
Returns all model name from the glTF-samples repository
- Returns:
model_names – Lists the name of glTF sample from KhronosGroup/glTF-Sample-Models
- Return type:
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_cubemap#
- fury.data.fetcher.read_viz_cubemap(name, suffix_type=1, ext='.jpg')[source]#
Read specific cube map with specific suffix type and extension.
- Parameters:
name (str) –
suffix_type (int, optional) – 0 for numeric suffix (e.g., skybox_0.jpg, skybox_1.jpg, etc.), 1 for -p/nC encoding where C is either x, y or z (e.g., skybox-px.jpeg, skybox-ny.jpeg, etc.), 2 for pos/negC where C is either x, y, z (e.g., skybox_posx.png, skybox_negy.png, etc.), and 3 for position in the cube map (e.g., skybox_right.jpg, skybox_front.jpg, etc).
ext (str, optional) – Image type extension. (.jpg, .jpeg, .png, etc.).
- Returns:
list of paths – List with the complete paths of the skybox textures.
- Return type:
read_viz_dmri#
read_viz_gltf#
read_viz_icons#
read_viz_models#
read_viz_textures#
sha256#
- fury.data.fetcher.sha256(string=b'', *, usedforsecurity=True)#
Returns a sha256 hash object; optionally initialized with a string