Skip to content

Commit

Permalink
Small update of read_bvals_bvecs
Browse files Browse the repository at this point in the history
  • Loading branch information
karp2601 authored and karp2601 committed Dec 12, 2024
1 parent e256482 commit c043822
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/scil_viz_gradients_screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os

from dipy.data import get_sphere
from dipy.io.gradients import read_bvals_bvecs

from scilpy.gradients.bvec_bval_tools import identify_shells
from scilpy.io.utils import (add_overwrite_arg,
Expand Down Expand Up @@ -120,11 +121,8 @@ def main():
if len(args.in_gradient_scheme) == 2:
in_gradient_schemes = args.in_gradient_scheme
in_gradient_schemes.sort() # [bval, bvec]
# bvecs/bvals (FSL) format, X Y Z AND b (or transpose)
points = np.genfromtxt(in_gradient_schemes[1])
if points.shape[0] == 3:
points = points.T
bvals = np.genfromtxt(in_gradient_schemes[0])
bvals, points = read_bvals_bvecs(in_gradient_schemes[0],
in_gradient_schemes[1])
centroids, shell_idx = identify_shells(bvals)
else:
# MRtrix format X, Y, Z, b
Expand Down

0 comments on commit c043822

Please sign in to comment.