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

use listmode time frame for output frame definition if all events are used #1519

Merged
merged 7 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion documentation/release_6.3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ <h3>New functionality</h3>
<li>
Data from GE Discovery MI systems in RDF9 should now be readable. TOF information on these scanners has also been added.
However, projection data is currently still always returned as non-TOF (but list-mode data is read as TOF).<br>
<a href=https://github.com/UCL/STIR/pull/1503>PR #1503</a>
<a href=https://github.com/UCL/STIR/pull/1519>PR #1503</a>
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li>
<tt>stir_timings</tt> has now an extra option to parse a par-file for a projector-pair.
</li>
<li>
Duration in sinogram interfile/exam_info obtained from lm_to_projdata has the correct value if we unlist all the events. This is not true for Root files
<a href=https://github.com/UCL/STIR/pull/1503>PR #1503</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be 1519. Also, please use ROOT, use <tt>lm_to_projdata</tt> and put a <br> after that line.

</li>
</ul>


Expand Down
11 changes: 9 additions & 2 deletions src/listmode_buildblock/LmToProjData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,15 @@ LmToProjData::set_up()
else if (frame_defs.get_num_frames() < 1)
{
// make a single frame starting from 0. End value will be ignored.
vector<pair<double, double>> frame_times(1, pair<double, double>(0, 0));
frame_defs = TimeFrameDefinitions(frame_times);
frame_defs = lm_data_ptr->get_exam_info_sptr()->get_time_frame_definitions();
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved
if (frame_defs.get_num_time_frames() == 0)
{
vector<pair<double, double>> frame_times(1, pair<double, double>(0, 0));
frame_defs = TimeFrameDefinitions(frame_times);
}
if (num_events_to_store != 0)
warning(
"LmToProjData: num_events_to_store has been selected. The frame duration in the Interfile header will be incorrect!");
}

return Succeeded::yes;
Expand Down
Loading