77
77
('well_counter_corr_factor' , np .float32 ),
78
78
('data_units' , '32S' ),
79
79
('septa_state' ,np .uint16 ),
80
- ('fill' , np . uint16 )
80
+ ('fill' , '12S' )
81
81
]
82
82
hdr_dtype = np .dtype (main_header_dtd )
83
83
142
142
('scatter_type' , np .uint16 ),
143
143
('recon_type' , np .uint16 ),
144
144
('recon_views' , np .uint16 ),
145
- ('fill' , '135S' )]
145
+ ('fill' , '174S' ),
146
+ ('fill2' , '96S' )]
146
147
subhdr_dtype = np .dtype (subheader_dtd )
147
148
148
149
# Ecat Data Types
@@ -422,7 +423,7 @@ def get_mlist(self, fileobj):
422
423
if not self .hdr .endianness is native_code :
423
424
dt = dt .newbyteorder (self .hdr .endianness )
424
425
nframes = self .hdr ['num_frames' ]
425
- mlist = np .zeros ((nframes ,4 ))
426
+ mlist = np .zeros ((nframes ,4 ), dtype = 'uint32' )
426
427
record_count = 0
427
428
done = False
428
429
@@ -658,7 +659,7 @@ def raw_data_from_fileobj(self, frame=0):
658
659
if not self ._header .endianness is native_code :
659
660
dtype = dtype .newbyteorder (self ._header .endianness )
660
661
shape = self .get_shape (frame )
661
- offset = self ._get_frame_offset (frame )
662
+ offset = self ._get_frame_offset (frame ) + 512
662
663
fid_obj = self .fileobj
663
664
raw_data = array_from_file (shape , dtype , fid_obj , offset = offset )
664
665
## put data into neurologic orientation
@@ -672,9 +673,10 @@ def data_from_fileobj(self, frame=0):
672
673
header = self ._header
673
674
subhdr = self .subheaders [frame ]
674
675
raw_data = self .raw_data_from_fileobj (frame )
675
- data = raw_data * header ['ecat_calibration_factor' ]
676
- data = data * subhdr ['scale_factor' ]
677
- return data
676
+ return raw_data
677
+ #data = raw_data * header['ecat_calibration_factor']
678
+ #data = data * subhdr['scale_factor']
679
+ #return data
678
680
679
681
680
682
0 commit comments