Skip to content

Commit 29aeddf

Browse files
author
Félix C. Morency
committed
RF: Return scaled data and use raw_data in ECAT7 writer
1 parent 307a0e8 commit 29aeddf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

nibabel/ecat.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,9 @@ def data_from_fileobj(self, frame=0):
669669
header = self._header
670670
subhdr = self.subheaders[frame]
671671
raw_data = self.raw_data_from_fileobj(frame)
672-
return raw_data
673-
#data = raw_data * header['ecat_calibration_factor']
674-
#data = data * subhdr['scale_factor']
675-
#return data
672+
data = raw_data * header['ecat_calibration_factor']
673+
data = data * subhdr['scale_factor']
674+
return data
676675

677676

678677

@@ -934,7 +933,7 @@ def to_file_map(self, file_map=None):
934933
imgf.seek(pos + 2)
935934

936935
#Get frame and its data type
937-
image = self.get_frame(index)
936+
image = self._subheader.raw_data_from_fileobj(index)
938937
dtype = image.dtype
939938

940939
#Write frame images

0 commit comments

Comments
 (0)