Skip to content

FIX: The GradientTable object should be immutable; the bvalues aren't #1484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions nipype/interfaces/dipy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,8 @@ class DipyDiffusionInterface(DipyBaseInterface):
def _get_gradient_table(self):
bval = np.loadtxt(self.inputs.in_bval)
bvec = np.loadtxt(self.inputs.in_bvec).T
try:
from dipy.data import GradientTable
gtab = GradientTable(bvec)
gtab.bvals = bval
except NameError:
from dipy.core.gradients import gradient_table
gtab = gradient_table(bval, bvec)
from dipy.core.gradients import gradient_table
gtab = gradient_table(bval, bvec)

gtab.b0_threshold = self.inputs.b0_thres
return gtab
Expand Down