You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dipy currently uses the 3 float defining the direction as the dictionary key to get the neighboring directions (cdf = self._adj_matrix[tuple(*direction)]). This call is slow and is done at each tracking steps. The solution would be to replace the 3 floats by an int. The 3 floats are already associated to an int as each direction is one of the vertices of the sphere.
A potential solution would be to keep track of both the floats and index on the sphere during the tracking, instead of solely the direction. This is fine for all direction getters that used a discrete sphere. However, not all direction getters use a discrete sphere (e.g. EuDX / PeaksAndMetricsDirectionGetter). We will need to be careful and well encapsulate this behavior in the direction getter.
Description
Following discussion in PR #1342.
Dipy currently uses the 3 float defining the direction as the dictionary key to get the neighboring directions (
cdf = self._adj_matrix[tuple(*direction)]
). This call is slow and is done at each tracking steps. The solution would be to replace the 3 floats by an int. The 3 floats are already associated to an int as each direction is one of the vertices of the sphere.A potential solution would be to keep track of both the floats and index on the sphere during the tracking, instead of solely the direction. This is fine for all direction getters that used a discrete sphere. However, not all direction getters use a discrete sphere (e.g. EuDX / PeaksAndMetricsDirectionGetter). We will need to be careful and well encapsulate this behavior in the direction getter.
File
dipy/direction/probabilistic_direction_getter.py
Functions
ProbabilisticDirectionGetter.get_direction(.)
DeterministicMaximumDirectionGetter.get_direction(.)
The text was updated successfully, but these errors were encountered: