Skip to content

Commit

Permalink
Merge pull request #708 from CHrlS98/aodf-metrics
Browse files Browse the repository at this point in the history
Refactor asym_odf_metrics script
  • Loading branch information
arnaudbore committed May 17, 2023
2 parents bed1c34 + f82234c commit 127dc51
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 368 deletions.
Empty file removed scilpy/direction/__init__.py
Empty file.
322 changes: 0 additions & 322 deletions scilpy/direction/peaks.py

This file was deleted.

10 changes: 4 additions & 6 deletions scilpy/reconst/multi_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import multiprocessing

from scilpy.direction.peaks import peak_directions_asym
from scipy.sparse.linalg import ArpackNoConvergence
from dipy.direction.peaks import peak_directions
from dipy.reconst.multi_voxel import MultiVoxelFit
Expand Down Expand Up @@ -110,16 +109,15 @@ def peaks_from_sh_parallel(args):
peak_indices = np.zeros((data_shape, npeaks), dtype='int')
peak_indices.fill(-1)

peak_dir_func = peak_directions if is_symmetric else peak_directions_asym

for idx in range(len(shm_coeff)):
if shm_coeff[idx].any():
odf = np.dot(shm_coeff[idx], B)
odf[odf < absolute_threshold] = 0.

dirs, peaks, ind = peak_dir_func(odf, sphere,
relative_peak_threshold,
min_separation_angle)
dirs, peaks, ind = peak_directions(odf, sphere,
relative_peak_threshold,
min_separation_angle,
is_symmetric)

if peaks.shape[0] != 0:
n = min(npeaks, peaks.shape[0])
Expand Down
Loading

0 comments on commit 127dc51

Please sign in to comment.