File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,12 @@ def __init__(
58
58
>>> os.chdir(tmpdir)
59
59
>>> old_rasb = str(data_dir / 'dwi.tsv')
60
60
>>> old_rasb_mat = np.loadtxt(str(data_dir / 'dwi.tsv'), skiprows=1)
61
+ >>> from dmriprep.utils.vectors import bvecs2ras
61
62
>>> check = DiffusionGradientTable(
62
63
... dwi_file=str(data_dir / 'dwi.nii.gz'),
63
64
... rasb_file=str(data_dir / 'dwi.tsv'))
65
+ >>> # Conform to the orientation of the image:
66
+ >>> old_rasb_mat[:, :3] = bvecs2ras(check.affine, old_rasb_mat[:, :3])
64
67
>>> affines = np.zeros((old_rasb_mat.shape[0], 4, 4))
65
68
>>> aff_file_list = []
66
69
>>> for ii, aff in enumerate(affines):
@@ -69,7 +72,7 @@ def __init__(
69
72
... aff_file_list.append(aff_file)
70
73
>>> check._transforms = aff_file_list
71
74
>>> out_rasb_mat = check.reorient_rasb()
72
- >>> assert np.allclose(old_rasb_mat, out_rasb_mat)
75
+ >>> np.allclose(old_rasb_mat, out_rasb_mat)
73
76
True
74
77
"""
75
78
self ._transforms = transforms
You can’t perform that action at this time.
0 commit comments