SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

stir.AcquisitionData.get_subset() fails on get_output() of ListmodeToSinograms, even with stir.AcquisitionData.set_storage_scheme("memory") #1217

Open epapoutsellis opened 8 months ago

epapoutsellis commented 8 months ago

I would like to perform stochastic optimisation using CIL for the NEMA dataset. I use this notebook.

If I run acq_data.get_subset(i) then I get this error

ERROR: write_basic_interfile_PDFS_header: Error casting the projdata to one of its geometries: Cylindrical/BlocksOnCylindrical/Genreic
KrisThielemans commented 8 months ago

I think this is the known problem that we cannot write subset-data yet. https://github.com/UCL/STIR/issues/1003

I also think in the past we solved this by setting stir.AcquisitionData.set_storage_scheme("memory") (before getting the subset)?

KrisThielemans commented 8 months ago

Cause: https://github.com/SyneRBI/SIRF/blob/e34ae2916cb99546018987ba5c9590cb95b2c3ff/src/xSTIR/cSTIR/stir_data_containers.cpp#L382-L386 but this currently fails as STIR cannot write subset data yet.

evgueni-ovtchinnikov commented 8 months ago

@epapoutsellis have you tried storing acquisitions in memory as Kris suggested:

I also think in the past we solved this by setting stir.AcquisitionData.set_storage_scheme("memory") (before getting the subset)?

KrisThielemans commented 7 months ago

@epapoutsellis I think this was resolved as above? I cannot quite remember...

KrisThielemans commented 5 months ago

Setting to memory does not help when using ListmodeToSinograms.get_output(). Current work-around is to create stir.AcquisitionData from the corresponding file.