direction
direction.peaks

Non Linear Direction Finder. 

Get the directions of odf peaks. 

Fit the model to data and computes peaks and metrics 
Reshape peaks for visualization. 
PeaksAndMetrics
Non Linear Direction Finder.
A function which can be evaluated on a sphere.
Only return peaks greater than relative_peak_threshold * m
where m
is the largest peak.
The minimum distance between directions. If two peaks are too close only the larger of the two is returned.
A discrete Sphere. The points on the sphere will be used for initial estimate of maximums.
Relative tolerance for optimization.
Points on the sphere corresponding to N local maxima on the sphere.
Value of sphere_eval at each point on directions.
Get the directions of odf peaks.
Peaks are defined as points on the odf that are greater than at least one neighbor and greater than or equal to all neighbors. Peaks are sorted in descending order by their values then filtered based on their relative size and spacing on the sphere. An odf may have 0 peaks, for example if the odf is perfectly isotropic.
The odf function evaluated on the vertices of sphere
The Sphere providing discrete directions for evaluation.
Only peaks greater than min + relative_peak_threshold * scale
are
kept, where min = max(0, odf.min())
and
scale = odf.max()  min
.
The minimum distance between directions. If two peaks are too close only the larger of the two is returned.
If True, v is considered equal to v.
N vertices for sphere, one for each peak
peak values
peak indices of the directions on the sphere
If the odf has any negative values, they will be clipped to zeros.
Fit the model to data and computes peaks and metrics
model will be used to fit the data.
Diffusion data.
The Sphere providing discrete directions for evaluation.
Only return peaks greater than relative_peak_threshold * m
where m
is the largest peak.
directions. If two peaks are too close only the larger of the two is returned.
If mask is provided, voxels that are False in mask are skipped and no peaks are returned.
If True, the odfs are returned.
If True, the odf as spherical harmonics coefficients is returned
Voxels with gfa less than gfa_thr are skipped, no peaks are returned.
If true, all peak values are calculated relative to max(odf).
Maximum SH order in the SH fit. For sh_order, there will be
(sh_order + 1) * (sh_order + 2) / 2
SH coefficients (default 8).
None
for the default DIPY basis,
tournier07
for the Tournier 2007 [2] basis, and
descoteaux07
for the Descoteaux 2007 [1] basis
(None
defaults to descoteaux07
).
Maximum number of peaks found (default 5 peaks).
Matrix that transforms spherical harmonics to spherical function
sf = np.dot(sh, B)
.
Inverse of B.
If True, use multiprocessing to compute peaks and metric
(default False). Temporary files are saved in the default temporary
directory of the system. It can be changed using import tempfile
and tempfile.tempdir = '/path/to/tempdir'
.
If parallel is True, the number of subprocesses to use
(default multiprocessing.cpu_count()). If < 0 the maximal number of
cores minus num_processes + 1
is used (enter 1 to use as many
cores as possible). 0 raises an error.
An object with gfa
, peak_directions
, peak_values
,
peak_indices
, odf
, shm_coeffs
as attributes
Reshape peaks for visualization.
Reshape and convert to float32 a set of peaks for visualisation with mrtrix or the fibernavigator.
The peaks to be reshaped and converted to float32.
peaks : nd array (…, 3*N)