Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSRB for ACFs in scatter estimation #1531

Merged
merged 10 commits into from
Nov 20, 2024
3 changes: 2 additions & 1 deletion src/include/stir/scatter/ScatterEstimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ class ScatterEstimation : public ParsingObject

//! make projdata 2D shared pointer
shared_ptr<ProjData> make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr);
shared_ptr<ProjData> make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr, string template_filename);
shared_ptr<ProjData>
make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr, string template_filename, const bool do_normalisation = false);

//!
//! \brief set_up
Expand Down
8 changes: 5 additions & 3 deletions src/scatter_buildblock/ScatterEstimation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ ScatterEstimation::make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr)
}

shared_ptr<ProjData>
ScatterEstimation::make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr, string template_filename)
ScatterEstimation::make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr,
string template_filename,
const bool do_normalisation)
{
shared_ptr<ProjData> out_2d_sptr;
if (in_3d_sptr->get_proj_data_info_sptr()->get_scanner_sptr()->get_scanner_geometry() == "Cylindrical")
Expand All @@ -198,7 +200,7 @@ ScatterEstimation::make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr,
this->input_projdata_2d_sptr->get_exam_info_sptr(),
this->input_projdata_2d_sptr->get_proj_data_info_sptr()->create_shared_clone());

SSRB(*out_2d_sptr, *in_3d_sptr, false);
SSRB(*out_2d_sptr, *in_3d_sptr, do_normalisation);
}
else
{
Expand Down Expand Up @@ -658,7 +660,7 @@ ScatterEstimation::set_up_iterative(shared_ptr<IterativeReconstruction<Discretis
info("ScatterEstimation: Running SSRB on attenuation correction coefficients ...");

std::string out_filename = "tmp_atten_sino_2d.hs";
atten_projdata_2d_sptr = make_2D_projdata_sptr(tmp_atten_projdata_sptr, out_filename);
atten_projdata_2d_sptr = make_2D_projdata_sptr(tmp_atten_projdata_sptr, out_filename, true);
}
else
{
Expand Down
Loading