UCL/STIR

switch proj-matrix caching off in calculate_attenuation_coefficients

Opened this issue · 0 comments

It doesn't make sense to cache the projection matrix for this one-off calculation. This would be easy to do along the same lines as

if (auto sens_bp_pm_sptr = std::dynamic_pointer_cast<BackProjectorByBinUsingProjMatrixByBin>(this->sens_backprojector_sptr))
{
// There is no point caching the projection matrix as we will use it only once
// Furthermore, disabling the cache will mean less memory used
// (and we don't have to release it)
sens_bp_pm_sptr->get_proj_matrix_sptr()->enable_cache(false);
}