We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a9af62d + d5dbb3a commit 13228e8Copy full SHA for 13228e8
nipype/algorithms/misc.py
@@ -1490,14 +1490,13 @@ def merge_rois(in_files, in_idxs, in_ref, dtype=None, out_file=None):
1490
1491
for cname, iname in zip(in_files, in_idxs):
1492
f = np.load(iname)
1493
- idxs = np.squeeze(f["arr_0"])
+ idxs = np.atleast_1d(np.squeeze(f["arr_0"]))
1494
+ nels = len(idxs)
1495
1496
for d, fname in enumerate(nii):
1497
data = np.asanyarray(nb.load(fname).dataobj).reshape(-1)
1498
cdata = nb.load(cname).dataobj[..., d].reshape(-1)
- nels = len(idxs)
1499
- idata = (idxs,)
1500
- data[idata] = cdata[0:nels]
+ data[idxs] = cdata[:nels]
1501
nb.Nifti1Image(data.reshape(rsh[:3]), aff, hdr).to_filename(fname)
1502
1503
imgs = [nb.load(im) for im in nii]
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments