odfs (ndarray) – SF or SH coefficients 2-dimensional array.
vertices (ndarray) – The sphere vertices used for SH to SF projection.
faces (ndarray) – Indices of sphere vertices forming triangles. Should be
ordered clockwise (see fury.utils.fix_winding_order).
indices (tuple) – Indices given in tuple(x_indices, y_indices, z_indices)
format for mapping 2D ODF array to 3D voxel grid.
scale (float) – Multiplicative factor to apply to ODF amplitudes.
norm (bool) – Normalize SF amplitudes so that the maximum
ODF amplitude per voxel along a direction is 1.
radial_scale (bool) – Scale sphere points by ODF values.
global_cm (bool) – If True the colormap will be applied in all ODFs. If False
it will be applied individually at each voxel.
colormap (None or str) – The name of the colormap to use. Matplotlib colormaps are supported
(e.g., ‘inferno’). If None then a RGB colormap is used.
opacity (float) – Takes values from 0 (fully transparent) to 1 (opaque).
affine (array) – optional 4x4 transformation array from native
coordinates to world coordinates.
B (ndarray (n_coeffs, n_vertices)) – Optional SH to SF matrix for projecting odfs given in SH
coefficients on the sphere. If None, then the input is assumed
to be expressed in SF coefficients.
directions (ndarray) – Peak directions. The shape of the array should be (X, Y, Z, D, 3).
indices (tuple) – Indices given in tuple(x_indices, y_indices, z_indices)
format for mapping 2D ODF array to 3D voxel grid.
values (ndarray, optional) – Peak values. The shape of the array should be (X, Y, Z, D).
affine (array, optional) – 4x4 transformation array from native coordinates to world coordinates.
colors (None or string ('rgb_standard') or tuple (3D or 4D) or) –
array/ndarray (N, 3 or 4) or array/ndarray (K, 3 or 4) or
array/ndarray(N, ) or array/ndarray (K, )
If None a standard orientation colormap is used for every line.
If one tuple of color is used. Then all streamlines will have the same
color.
If an array (N, 3 or 4) is given, where N is equal to the number of
points. Then every point is colored with a different RGB(A) color.
If an array (K, 3 or 4) is given, where K is equal to the number of
lines. Then every line is colored with a different RGB(A) color.
If an array (N, ) is given, where N is the number of points then these
are considered as the values to be used by the colormap.
If an array (K,) is given, where K is the number of lines then these
are considered as the values to be used by the colormap.
lookup_colormap (vtkLookupTable, optional) – Add a default lookup table to the colormap. Default is None which calls
fury.actor.colormap_lookup_table().
linewidth (float, optional) – Line thickness. Default is 1.
symmetric (bool, optional) – If True, peaks are drawn for both peaks_dirs and -peaks_dirs. Else,
peaks are only drawn for directions given by peaks_dirs. Default is
True.
Calculate the angle of the cone of uncertainty that represents the
perturbation of the main eigenvector of the diffusion tensor matrix.
Parameters:
evals (ndarray (3, ) or (N, 3)) – Eigenvalues.
evecs (ndarray (3, 3) or (N, 3, 3)) – Eigenvectors.
signal (3D or 4D ndarray) – Predicted signal.
sigma (ndarray) – Standard deviation of the noise.
b_matrix (array (N, 7)) – Design matrix for DTI.
Returns:
angles
Return type:
array
Notes
The uncertainty calculation is based on first-order matrix perturbation
analysis described in [1]. The idea is to estimate the variance of the
main eigenvector which corresponds to the main direction of diffusion,
directly from estimated D and its estimated covariance matrix
\(\Delta D\) (see [2], equation 4). The angle \(\Theta\)
between the perturbed principal eigenvector of D,
\(\epsilon_1+\Delta\epsilon_1\), and the estimated eigenvector
\(\epsilon_1\), measures the angular deviation of the main fiber
direction and can be approximated by:
\[\Theta=tan^{-1}(\|\Delta\epsilon_1\|)\]
Giving way to a graphical construct for displaying both the main
eigenvector of D and its associated uncertainty, with the so-called
“uncertainty cone”.
References
diffusion tensor field maps resulting from MR noise. In 5th Scientific
Meeting of the ISMRM (Vol. 1740).
Variance of estimated DTI-derived parameters via first-order perturbation
methods. Magnetic Resonance in Medicine: An Official Journal of the
International Society for Magnetic Resonance in Medicine, 57(1), 141-149.