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

writing of Interfile header fails for TOF data with 1 TOF bin #1504

Open
KrisThielemans opened this issue Sep 5, 2024 · 0 comments
Open
Assignees
Labels

Comments

@KrisThielemans
Copy link
Collaborator

STIR/src/IO/interfile.cxx

Lines 1204 to 1205 in e168b07

const bool is_TOF = pdfs.get_proj_data_info_sptr()->get_num_tof_poss() > 1;
output_header << "number of dimensions := " + std::to_string(is_TOF ? 5 : 4) + "\n";

can be inconsistent with subsequent code if data is TOF anyway (e.g. if tof_mashing_factor == num_tof_bins, or if there's just 1 TOF bin), and the resulting header will be incorrect.

We should use ProjDataInfo::is_tof_data() instead.

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

No branches or pull requests

1 participant