SyneRBI / PETRIC

PET Image Reconstruction Challenge 2024
https://www.ccpsynerbi.ac.uk/events/petric/
7 stars 2 forks source link

AttributeError: 'ListmodeToSinograms' object has no attribute 'prompts_and_randoms_from_listmode' #8

Closed paskino closed 4 months ago

paskino commented 4 months ago

I built SIRF 3.7.0 with the branch https://github.com/SyneRBI/SIRF-SuperBuild/pull/897

Executing https://github.com/SyneRBI/Challenge24/blob/nema-data/src/SIRF_data_preparation/prepare_data.py it fails with the following AttributeError which is correct for ListmodeToSinograms

ERROR: ProjDataFromStream: error reading data
0.0

INFO: CListModeDataECAT8_32bit: opening file /home/jovyan/work/Challenge24/src/SIRF_data_preparation/../../../ChallengeData/PET/mMR/NEMA_IQ/20170809_NEMA_60min_UCL.l
Traceback (most recent call last):
  File "/home/jovyan/work/Challenge24/src/SIRF_data_preparation/prepare_data.py", line 25, in <module>
    prepare_challenge_data(data_path, sirf_data_path, challenge_data_path, intermediate_data_path, '20170809_NEMA_',
  File "/home/jovyan/work/Challenge24/lib/sirf_exercises/__init__.py", line 115, in prepare_challenge_data
    prompts, randoms = lm2sino.prompts_and_randoms_from_listmode(listmode_data, 0, 10, acq_data_template)
AttributeError: 'ListmodeToSinograms' object has no attribute 'prompts_and_randoms_from_listmode'
evgueni-ovtchinnikov commented 4 months ago

@paskino looks like your SIRF branch is either not ch2sirf or not recent - run git fetch and git branch in any SIRF folder, please

paskino commented 4 months ago

SIRF branch is v3.7.0 and it is not sufficient. As you suggest, what's needed is code from ch2sirf but that is not up-to-date with SIRF 3.7. I created a PR to update it, https://github.com/SyneRBI/SIRF/pull/1262

paskino commented 4 months ago

close as necessary code is found