File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,10 @@ def _read():
144
144
streamlines = ArraySequence (tck_reader )
145
145
tractogram = Tractogram (streamlines )
146
146
147
+ # By definition.
147
148
tractogram .affine_to_rasmm = np .eye (4 )
149
+ hdr [Field .VOXEL_TO_RASMM ] = np .eye (4 )
150
+
148
151
return cls (tractogram , header = hdr )
149
152
150
153
def save (self , fileobj ):
@@ -230,8 +233,11 @@ def _write_header(fileobj, header):
230
233
from the beginning of the TCK header).
231
234
"""
232
235
# Fields to exclude
233
- exclude = [Field .MAGIC_NUMBER , Field .NB_STREAMLINES , Field .ENDIANNESS ,
234
- "count" , "datatype" , "file" ]
236
+ exclude = [Field .MAGIC_NUMBER , # Handled separately.
237
+ Field .NB_STREAMLINES , # Handled separately.
238
+ Field .ENDIANNESS , # Handled separately.
239
+ Field .VOXEL_TO_RASMM , # Streamlines are always in RAS+ mm.
240
+ "count" , "datatype" , "file" ] # Fields being replaced.
235
241
236
242
lines = []
237
243
lines .append (header [Field .MAGIC_NUMBER ])
You can’t perform that action at this time.
0 commit comments