Skip to content

Commit 0e77ba8

Browse files
author
Félix C. Morency
committed
BF: Fixed ECAT7 header and frame offset
1 parent 953ea8b commit 0e77ba8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/ecat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
('scatter_type', np.uint16),
142142
('recon_type', np.uint16),
143143
('recon_views', np.uint16),
144-
('fill', np.uint16)]
144+
('fill', '135S')]
145145
subhdr_dtype = np.dtype(subheader_dtd)
146146

147147
# Ecat Data Types
@@ -644,7 +644,7 @@ def _get_data_dtype(self, frame):
644644

645645
def _get_frame_offset(self, frame=0):
646646
mlist = self._mlist._mlist
647-
offset = mlist[frame][1] * 512
647+
offset = (mlist[frame][1] - 1) * 512
648648
return int(offset)
649649

650650
def raw_data_from_fileobj(self, frame=0):

0 commit comments

Comments
 (0)