Read test or example data
provides filenames of some test datasets
Parameters : | name: str :
|
---|---|
Returns : | fnames : tuple
|
Examples
>>> import numpy as np
>>> from dipy.data import get_data
>>> fimg,fbvals,fbvecs=get_data('small_101D')
>>> bvals=np.loadtxt(fbvals)
>>> bvecs=np.loadtxt(fbvecs).T
>>> import nibabel as nib
>>> img=nib.load(fimg)
>>> data=img.get_data()
>>> data.shape
(6, 10, 10, 102)
>>> bvals.shape
(102,)
>>> bvecs.shape
(102, 3)
provide some simulated voxel data
Parameters : | name : str, which file?
|
---|---|
Returns : | dix : dictionary, where dix[‘data’] returns a 2d array
|
Notes
These sim voxels were provided by M.M. Correia using Rician noise.
Examples
>>> from dipy.data import get_sim_voxels
>>> sv=get_sim_voxels('fib1')
>>> sv['data'].shape
(100, 102)
>>> sv['fibres']
'1'
>>> sv['gradients'].shape
(102, 3)
>>> sv['bvals'].shape
(102,)
>>> sv['snr']
'60'
>>> sv2=get_sim_voxels('fib2')
>>> sv2['fibres']
'2'
>>> sv2['snr']
'80'
provide skeletons generated from Local Skeleton Clustering (LSC)
Parameters : | name : str, ‘C1’ or ‘C3’ |
---|---|
Returns : | dix : dictionary |
Examples
>>> from dipy.data import get_skeleton
>>> C=get_skeleton('C1')
>>> len(C.keys())
117
>>> for c in C: break
>>> C[c].keys()
['indices', 'most', 'hidden', 'N']
provide triangulated spheres
Parameters : | name : str
|
---|---|
Returns : | vertices : ndarray
faces : ndarray
|
Examples
>>> import numpy as np
>>> from dipy.data import get_sphere
>>> verts, faces = get_sphere('symmetric362')
>>> verts.shape
(362, 3)
>>> faces.shape
(720, 3)
>>> verts, faces = get_sphere('not a sphere name')
Traceback (most recent call last):
...
DataError: No sphere called "not a sphere name"