Various definitions of spherical sampling

designer.tractography.sphericalsampling.dsigrid(odf_key='odf8')

Reads DSIStudio’s ODF geometry in odfs.mat to use in creation of DSIStudio’s .fib file.

Parameters

odf_keys (str; optional; {‘odf4’, ‘odf5’, ‘odf6’, ‘odf8’, ‘odf12’, ‘odf20’}) – DSIStudio’s direction set to load. (Default: ‘odf8’)

Returns

  • odf_vertices (array_like(dtype=flaot64)) – ODF vertices

  • odf_faces (array_like(dtype=uint16)) – ODF faces

designer.tractography.sphericalsampling.odfgrid(res='med')

Defines the spherical grid defined by quadrisection of the isocahedron. There are three possible options: ‘low’, ‘med’, or ‘high’, where higher resolutions cost more computational time. Use for computation of spherical harmonics from ODFs.

NOTE: These sampling directions were ported from DKE (original author: Russell Glenn)

Parameters

res (str; optional; {‘low’, ‘med’, ‘high’}) – Resolution of spherical sampling distribution (Default: ‘med’) ‘low’ defines the spherical grid defined by 3 fold quadrisection of the isocahedron, or 8 fold tesselation of icosahedron. ‘med’ defines the spherical grid defined by 4 fold quadrisection of the isocahedron, or 16 fold tesselation of icosahedron. ‘high’ defines the spherical grid defined by 5 fold quadrisection of the isocahedron, or 24 fold tesselation of icosahedron.

Returns

  • S (array_like(dtype=float64)) – Coordinates for spherical grid in polar coordinates, extends slightly over one half of the sphere to estimate local maxima on border. First column is phi, second column is theta.

  • idx (aarray_like(dtype=uint16)) – First column defines points in S over one half of the sphere for candiate local maxima. Columns 2-7 define the neighbors for the corresponding point in column 1.

  • idx8 (array_like(dtype=uint16)) – Defines vertices to undersample for sphericalgrid3 - this is useful, for example, when trying to save a smaler datastructure to load into DSI studio (all coordinates are savesd in one large file)

  • area (array_like(dtype=float64)) – Defines the area that each vertex encompasses. It is generally impossible to spread points out isotropically over a sphere, so the area is slightly different for each point - this can be used to update computations that occur over the spherical grid, eg GFA.

  • faces (array_like(dtype=uint16)) – Data structure matching S to save and load into DSI Studio for visualization

  • separation_angle (float64) – Average separation angle between each peak and its nearest neighbors.