Open KrisThielemans opened 2 years ago
This can be closed, right?
I think so, but cannot check at the moment. @danieldeidda do you remember?
not sure, the comments say that this was going to be done in another PR but there was no error related to this as that change was reverted
This was about the initialisation of segment_axial_pos_to_ring1_plus_ring2
, in particular https://github.com/UCL/STIR/blob/4142d5969e4320e32ed9dbe463b0fd50f36fb3f6/src/buildblock/ProjDataInfoCylindrical.cxx#L291-L293. The use of m_offset
is unsafe for a blocks/generic scanner (due to irregular sampling). I believe that the end result of the calculation would still be fine, but this would need to be checked.
For instance for span=1 (which is currently used for blocks/generic), get_ring_pair_for_segment_axial_pos_num(ring1, ring2, seg, axial_pos)
can be tested as
seg = ring1 - ring2
(or maybe reversed) and axial_pos = min(ring1, ring2)
.
This was tested for the NeuroLF scanner geometry, and the function indeed returns the correct results: for seg=5 and axial_pos=5 it returns 5 and 10, and for seg=2 and axial_pos=14 it returns 14 and 16.
See comments in #1006, e.g. https://github.com/UCL/STIR/issues/1006#issuecomment-1162064887_