UCL / STIR

Software for Tomographic Image Reconstruction
http://stir.sourceforge.net/
Other
113 stars 94 forks source link

EstimateScatter forces the use of ForwardProjectorByBinUsingProjMatrixByBin for mask computation #1527

Open robbietuk opened 5 days ago

robbietuk commented 5 days ago

Attempting to estimate scatter from a CT attenuation map, many small voxels.

This leads to an issue with the ForwardProjectorByBinUsingProjMatrixByBin as https://github.com/UCL/STIR/blob/454be92288d3eac39bbaf79fd8bfdd1c71937521/src/recon_buildblock/DataSymmetriesForBins_PET_CartesianGrid.cxx#L74-L79

I am generally using parallelproj that avoids this issue elsewhere in the code base (no symmetries) but estimate_scatter forces the use of ForwardProjectorByBinUsingProjMatrixByBin when computing the mask projection data.

https://github.com/UCL/STIR/blob/454be92288d3eac39bbaf79fd8bfdd1c71937521/src/scatter_buildblock/ScatterEstimation.cxx#L1238-L1240


Two options

  1. Pre-compute and set the mask projdata before setup is called.
  2. Add a settable member forward projector shared pointer to the EstimateScatter class.

@KrisThielemans thoughts? Estimate scatter is already complex and convoluted, the second option adds more but simplifies. It can default to the current behavior.

KrisThielemans commented 5 days ago

sure, adding a settable member, also parsable, would be good. It doesn't really increase complexity of the code, so I'd be happy to consider a PR :-)

KrisThielemans commented 5 days ago

Of course, the scatter simulation itself would very much benefit from using parallelproj as well, but that's quite a lot of work. (need to "batch all line integrals up", while currently we do them one by one).