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

Scanner coincidence window depends on TOF data #1481

Open
KrisThielemans opened this issue Jul 24, 2024 · 4 comments
Open

Scanner coincidence window depends on TOF data #1481

KrisThielemans opened this issue Jul 24, 2024 · 4 comments
Labels

Comments

@KrisThielemans
Copy link
Collaborator

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?

@danieldeidda
Copy link
Collaborator

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.

I think I am confused, then what do I set it to if there is no member? also what is the keyword to save into the header?

@KrisThielemans
Copy link
Collaborator Author

If you'd fill in

 Maximum number of (unmashed) TOF time bins := 264
 Size of unmashed TOF time bins (ps)        := 17.9039
 TOF timing resolution (ps)                 := 214

(these are values for the Vision 600), it'll compute the coincidence window from the above as per the code.

@danieldeidda
Copy link
Collaborator

So are you saying to have these even with scanners with no ToF?

@KrisThielemans
Copy link
Collaborator Author

yes, maximum number, size of bin = coincidence window, tof timing resolution: something very big. (not used for the coincidence window calculation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants