problems with passing calibration info to exam_info of image

Open
#1,301 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start with get_exam_info_uptr_for_target in src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx and inspect the other duplicated implementations that use BinNormalisation. Trace IterativeReconstruction::get_initial_data_ptr and the equivalent analytic reconstruction path to determine where the method should be called. Done means the implementations no longer recurse, calibration reaches exam_info, and the duplicated logic is consolidated.

Written by the indexing model from the issue text.

Description

We have in a lot of the log-likelihood classes an implementation of the virtual get_exam_info_uptr_for_target. They are all duplicates and have the following https://github.com/UCL/STIR/blob/fd9ad11c13d8f6cb868c8a32568d6e48a8d79589/src/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx#L805-L809
This means that the function will call itself in a never-ending loop.

I presume that the code is meant to be something like

auto exam_info_uptr = base_type::get_exam_info_uptr_for_target();

It appears the function is never called. Presumably it should have been called in IterativeReconstruction::get_initial_data_ptr (and equivalent for analytic reconstructions).

Its intention was to be able to pass the calibration factor of the norm file to the exam_info such that we can know if a reconstructed image was calibrated. This is therefore currently not happening.

So, there are 3 problems:

  • the implementations will hang
  • it's never called
  • the code is duplicated (as it should sit everywhere we have a BinNormalisation)
Dominant language
C++
Stars
160
Forks
113
Avg merge
12d 15h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UCL/STIR

All issues in UCL/STIR

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.