Skip to content

Commit f5dec18

Browse files
Merge pull request #545 from MarcCote/bf_543
MRG: always save data in <f4 Fix for big-endian streamlines.
2 parents c6e06d9 + c8b3479 commit f5dec18

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nibabel/streamlines/tck.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,8 @@ def save(self, fileobj):
220220
tractogram = self.tractogram.to_world(lazy=True)
221221

222222
for t in tractogram:
223-
s = t.streamline.astype(dtype)
224-
data = np.r_[s, self.FIBER_DELIMITER]
225-
f.write(data.tostring())
223+
data = np.r_[t.streamline, self.FIBER_DELIMITER]
224+
f.write(data.astype(dtype).tostring())
226225
nb_streamlines += 1
227226

228227
header[Field.NB_STREAMLINES] = nb_streamlines

0 commit comments

Comments
 (0)