File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 88
88
89
89
90
90
def get_affine_trackvis_to_rasmm (header ):
91
+ """ Get affine mapping trackvis voxelmm space to RAS+ mm space
92
+
93
+ The streamlines in a trackvis file are in 'voxelmm' space, where the
94
+ coordinates refer to the corner of the voxel.
95
+
96
+ Compute the # affine matrix that will bring them back to RAS+ mm space,
97
+ where the coordinates refer to the center of the voxel.
98
+
99
+ Parameters
100
+ ----------
101
+ header : dict
102
+ Dict containing trackvis header.
103
+
104
+ Returns
105
+ -------
106
+ aff_tv2ras : shape (4, 4) array
107
+ Affine array mapping coordinates in 'voxelmm' space to RAS+ mm space.
108
+ """
91
109
# TRK's streamlines are in 'voxelmm' space, we will compute the
92
110
# affine matrix that will bring them back to RAS+ and mm space.
93
111
affine = np .eye (4 )
You can’t perform that action at this time.
0 commit comments