unravel.core

Created on Fri Mar 11 11:05:25 2022

@author: DELINTE Nicolas

Functions

angle_difference(vs, vf[, direction])

Computes the angle difference between n vectors.

angular_agreement(phi_maps, volume_shape)

angular_weighting(vs, vf[, nf])

Computes the relative contributions of the segments in vf to vs using angular weighting.

closest_fixel_only(vs, vf[, nf])

Computes the relative contributions of the segments in vf to vs using the closest-fixel-only approach.

compute_subsegments(start, finish[, ...])

Computes the voxels containing a segment (defined by the start and finish) and the segment length that is contained within them.

deltas_to_D(dx, dy, dz[, lamb, vec_len])

Function creating a diffusion tensor from three orthogonal components.

fraction_weighting(point, ff[, nf])

Computes the relative contribution of each fixel k based on its fraction ff in voxel (point).

get_fixel_weight(trk, peaks[, method, ff, ...])

Get the fixel weights from a tract specified in trk_file.

get_fixel_weight_DIAMOND(trk_file, ...[, K, ...])

Get the fixel weights from a tract specified in trk_file and the tensors obtained from DIAMOND.

get_fixel_weight_MF(trk_file, MF_dir, Patient)

Get the fixel weights from a tract specified in trk_file and the peaks obtained from Microsrcuture Fingerprinting.

get_microstructure_map(fixel_weights, ...)

Returns a 3D volume representing the microstructure map

get_streamline_weights(trk, peaks[, ...])

get_weighted_mean(micro_map, fixel_weights)

Returns the mean value of a microstructure map using either a voxel or total segment length (tsl) weighing method.

get_weighted_sums(metric_maps, fixelWeightList)

TODO: unify with get_microstructure_map and total_segment_length Outdated.

main_fixel_map(fixel_weights)

Ouputs a map representing the most aligned fixel.

peak_to_tensor(peaks[, norm, pixdim])

Takes peaks, such as the ones obtained with Microstructure Fingerprinting, and return the corresponding tensor, in the format used in DIAMOND.

plot_streamline_metrics(trk, peaks, metric_maps)

Plots the evolution of a metric along the course of a single streamline.

plot_streamline_metrics_old(streamList, ...)

Plots the evolution of a metric along the course of a single streamline.

relative_angular_weighting(vs, vf[, nf])

Computes the relative contributions of the segments in vList to vs using relative angular weighting, which attributes less weight to fixel perpendicular to the streamline segment.

t6ToMFpeak(t)

(6,17,1,15) with info on 0,2,5 to (17,1,15,3)

tensor_to_peak(t)

Takes peaks, such as the ones obtained with DIAMOND, and returns the corresponding tensor, in the format used in Microstructure Fingerprinting.

total_segment_length(fixel_weights)

tract_to_streamlines(trk)

Return a list with the position of each step of each streamline from a tractogram.

volumetric_agreement(fixel_weights)

voxel_distance(position1, position2)

Returns the distance between two voxels in multiple dimensions.

voxels_from_segment(position1, position2[, ...])

Computes the voxels containing a segment (defined by the position 1 and 2) and the segment length that is contained within them.

weighted_mean_dev(metric_maps, fixelWeightList)

Return the weighted means and standard deviation from list of metric maps and corresponding fixel weights.