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

Error in scatter estimation when using SSRB for attenuation factors #1532

Open
KrisThielemans opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1531
Open

Error in scatter estimation when using SSRB for attenuation factors #1532

KrisThielemans opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1531
Assignees
Labels
Milestone

Comments

@KrisThielemans
Copy link
Collaborator

Scatter estimation happens in 2D, with using SSRB for ProjDataInfoCylindrical to reduce noise (for BlocksOnCylindrical, we just use seg 0).

ScatterEstimation::make_2D_projdata_sptr(const shared_ptr<ProjData> in_3d_sptr)
{
shared_ptr<ProjData> out_2d_sptr;
if (in_3d_sptr->get_proj_data_info_sptr()->get_scanner_sptr()->get_scanner_geometry() == "Cylindrical")
{
shared_ptr<ProjDataInfo> out_info_2d_sptr(
SSRB(*in_3d_sptr->get_proj_data_info_sptr(), in_3d_sptr->get_num_segments(), 1, false));
out_2d_sptr.reset(new ProjDataInMemory(in_3d_sptr->get_exam_info_sptr(), out_info_2d_sptr));
SSRB(*out_2d_sptr, *in_3d_sptr, false);
}
else
{
shared_ptr<ProjDataInfo> out_info_2d_sptr(in_3d_sptr->get_proj_data_info_sptr()->create_shared_clone());
out_info_2d_sptr->reduce_segment_range(0, 0);

For prompts, randoms and efficiencies, we use SSRB in its "adding" mode (do_normalisation=false). However, this is incorrect for the attenuation correction factors. (2D ACFs should correspond to exp(lineintegral(mu)), and hence should be very close to seg 0 of 3D ACFs, i.e we should use averaging, not adding)

atten_projdata_2d_sptr = make_2D_projdata_sptr(tmp_atten_projdata_sptr, out_filename);

git blame confirms that this bug was introduced in 852c10d when cleaning-up the SSRB lines to replace them with make_2D_projdata_sptr (in #1006, merged 27 Jun 2022, rel 5.1.0). Before this PR, all SSRBs were called with false (i.e. add), except for the 2D ACFs, where it uses true (i.e. average).

@KrisThielemans KrisThielemans added this to the v6.3 milestone Nov 5, 2024
@KrisThielemans KrisThielemans self-assigned this Nov 5, 2024
@KrisThielemans KrisThielemans linked a pull request Nov 5, 2024 that will close this issue
2 tasks
@KrisThielemans KrisThielemans linked a pull request Nov 20, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant