Closed nbeliy closed 4 months ago
Hi @nbeliy. Thanks for raising this issue. We are of aware of this bug for the python part (https://github.com/openneuropet/PET2BIDS/issues/272), and are currently working on a solution. Matlab version works fine.
Ah, ok.
If it could help, problem may come from read_ecat.py:408, where data type 6 is interpreted as unsigned int16 (>H
), while nibabel interprets as signed int16. SPM treats all data types as int16.
Nibabel reference some documents on Turku website, but the documents are no longer there.
As I'm here, the lines []():
if ".gz" in ecat_file:
ecat_file = decompress(ecat_file)
may cause a crash if the name of file contains .gz
somewhere in the middle. It will be better to replace the if by:
if ecat_file.endswith(".gz"):
ecat_file = decompress(ecat_file)
Duplicate issue to #272, closing.
Describe the bug Having an ECAT7 image with negative voxels (we have images reconstructed with FBP), the converted images contains only positive and very large values. Where spm's
spm_ecat2nifti
shows -2266.532958984375,ecatpet2bids
produces 72494.859375Positive values are the same, comparing with spm.
To Reproduce Convert ECAT image with negative values
Expected behaviour The negative values must be conserved.
Desktop (please complete the following information): Python 3.8.10 pypet2bids==1.3.9