Skip to content

Commit a691f20

Browse files
committed
Merge pull request #1239 from vsaase/bugfixes
Bugfixes
2 parents 46de36f + 6459678 commit a691f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/workflows/dmri/fsl/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def hmc_split(in_file, in_bval, ref_num=0, lowbval=5.0):
249249

250250
volid = lowbs[0]
251251
if (isdefined(ref_num) and (ref_num < len(lowbs))):
252-
volid = [ref_num]
252+
volid = ref_num
253253

254254
if volid == 0:
255255
data = data[..., 1:]
@@ -266,8 +266,8 @@ def hmc_split(in_file, in_bval, ref_num=0, lowbval=5.0):
266266
out_mov = op.abspath('hmc_mov.nii.gz')
267267
out_bval = op.abspath('bval_split.txt')
268268

269-
hdr.set_data_shape(refdata.shape)
270269
refdata = data[..., volid]
270+
hdr.set_data_shape(refdata.shape)
271271
nb.Nifti1Image(refdata, im.get_affine(), hdr).to_filename(out_ref)
272272

273273
hdr.set_data_shape(data.shape)

0 commit comments

Comments
 (0)