Skip to content

Scanner coincidence window depends on TOF data #1481

@KrisThielemans

Description

@KrisThielemans

We currently cannot set the coincidence window, even if we know it, or it is contained in the data (for instance, for Siemens data we ignore the field, and for GE data we don't read it either). The current code is

Scanner::get_coincidence_window_width_in_ps() const
{
const auto w = this->get_size_of_timing_pos();
if (this->is_tof_ready())
return this->get_max_num_timing_poss() * w;

with
Scanner::is_tof_ready() const
{
return (max_num_of_timing_poss > 0 && size_timing_pos > 0.0f && timing_resolution > 0.0f);
}

This therefore only works for TOF data. (It is also potentially dangerous if someone would create a wrong scanner object with fewer (uncompressed) TOF bins than actually used, but that seems up to them and could be addressed via documentation)

The coincidence window is currently only used in the RFS calculation

coincidence_time_window = scanner.get_coincidence_window_width_in_ps() / 1e12F;
. This is currently only used for GE data (but it would therefore fail when using trimmed data, or for the Omni as that's non-TOF).

After thinking about this a bit, my impression is that we don't need a separate coincidence_window member in Scanner, as even for non-TOF, we can say the num_timing_poss=1 and set the TOF bin width to the coincidence window. We can therefore already set it in the Scanner initialisation as well as parse this from the header etc.

Of course, it's going to be hard to find timing resolution for non-TOF scanners, so the condition on is_tof_ready would have to be changed. This is already done in #1430:

Scanner::is_tof_ready() const
{
return (max_num_of_timing_poss > 0 && size_timing_pos > 0.0f ); //&& timing_resolution > 0.0f);
}

In any case, it'd be nice to check the computed value with whatever the scanner reports (if it does).

@danieldeidda if you know the relevant info for the Mediso AnyScan, you can already add it in your Interfile headers, and (ideally) Scanner.cxx.

@NikEfth are we missing something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions