UCL / UCL/STIR

LM reconstrcution using frame definition file

Open
#77 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
160
Forks
113
Avg merge
12d 15h
Merged PRs (30d)
1

Description

I recently came across to two different problems:
The first is when I define a frame definition file inside the parameter file the reconstruction does not work.
This happens because for some reason do_time_frames stays "false". In order to make it work I add the following at the beginning of "compute_sub_gradient_without_penalty_plus_sensitivity()":

if (this->frame_defs_filename.size()!=0)
{
this->frame_defs = TimeFrameDefinitions(this->frame_defs_filename);
this->do_time_frame = true;
}

the second problem happens when I want to reconstruct a frame which is in the middle of the LM file. So when I define a frame like:

0 t1
1 t2

t1 has to be skipped and the reconstruction should start from t1 to t2, however, what is happening is that all the events from the beginning of the LM file are being taken into account. I was thinking that the following bit was enough:

if(record.is_time() && end_time > 0.01)
{

current_time = record.time().get_time_in_secs();
if (this->do_time_frame && current_time >= end_time)
break; // get out of while loop
if (current_time < start_time)

continue;}

but it is not so. As a consequence, I added the condition:

if(record.time ().get_time_in_secs ()<=start_time){
continue;
}

also inside

if (record.is_event() && record.event().is_prompt())
{

this seems to solve the problem.
Kind regards
Daniel

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.

Research direction

Start by reading compute_sub_gradient_without_penalty_plus_sensitivity() and the TimeFrameDefinitions handling mentioned in the report. Reproduce reconstruction with a frame definition embedded in the parameter file, then with a frame in the middle of the list-mode file. Done means both cases honor the requested frame bounds without requiring manual changes at the function entry point.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.