Learning algorithms for tractography
Detect corresponding tracks from list tracks1 to list tracks2 where tracks1 & tracks2 are lists of tracks
Parameters: | indices : sequence
tracks1 : sequence
tracks2 : sequence
|
---|---|
Returns: | track2track : array (N,2) where N is len(indices) of int
|
Notes
To find the corresponding tracks we use mam_distances with ‘avg’ option. Then we calculate the argmin of all the calculated distances and return it for every index. (See 3rd column of arr in the example given below.
Examples
>>> import numpy as np
>>> import dipy.tracking.learning as tl
>>> A=np.array([[0,0,0],[1,1,1],[2,2,2]])
>>> B=np.array([[1,0,0],[2,0,0],[3,0,0]])
>>> C=np.array([[0,0,-1],[0,0,-2],[0,0,-3]])
>>> bundle1=[A,B,C]
>>> bundle2=[B,A]
>>> indices=[0,1]
>>> arr=tl.detect_corresponding_tracks(indices,bundle1,bundle2)
Detect corresponding tracks from 1 to 2 where tracks1 & tracks2 are sequences of tracks
Parameters: | indices : sequence
tracks1 : sequence
indices2 : sequence
tracks2 : sequence
|
---|---|
Returns: | track2track : array (N,2) where N is len(indices)
|
See also
distances.mam_distances
Notes
To find the corresponding tracks we use mam_distances with ‘avg’ option. Then we calculate the argmin of all the calculated distances and return it for every index. (See 3rd column of arr in the example given below.
Examples
>>> import numpy as np
>>> import dipy.tracking.learning as tl
>>> A=np.array([[0,0,0],[1,1,1],[2,2,2]])
>>> B=np.array([[1,0,0],[2,0,0],[3,0,0]])
>>> C=np.array([[0,0,-1],[0,0,-2],[0,0,-3]])
>>> bundle1=[A,B,C]
>>> bundle2=[B,A]
>>> indices=[0,1]
>>> indices2=indices
>>> arr=tl.detect_corresponding_tracks_plus(indices,bundle1,indices2,bundle2)