From 1c967dd813632236bfc2fdf9fb031df473725f4c Mon Sep 17 00:00:00 2001 From: Matt Cieslak Date: Mon, 14 Sep 2020 09:27:52 -0400 Subject: [PATCH] Change reader to also support tck files from mrtrix3-dev tckedit --- nibabel/streamlines/tck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nibabel/streamlines/tck.py b/nibabel/streamlines/tck.py index ff12bc2322..17741928d1 100644 --- a/nibabel/streamlines/tck.py +++ b/nibabel/streamlines/tck.py @@ -319,7 +319,8 @@ def _read_header(fileobj): offset_data = f.tell() # Build header dictionary from the buffer. - hdr = dict(item.split(': ') for item in buf.rstrip().split('\n')[:-1]) + hdr = dict(item.split(': ') for item in buf.rstrip().split('\n') + if ': ' in item) hdr[Field.MAGIC_NUMBER] = magic_number # Check integrity of TCK header.