STIR icon indicating copy to clipboard operation
STIR copied to clipboard

ring-diff arrays are not set appropriately for blocksoncylindrical

Open KrisThielemans opened this issue 2 years ago • 5 comments

See comments in #1006, e.g. https://github.com/UCL/STIR/issues/1006#issuecomment-1162064887_

KrisThielemans avatar Jun 27 '22 17:06 KrisThielemans

This can be closed, right?

markus-jehl avatar Sep 27 '22 15:09 markus-jehl

I think so, but cannot check at the moment. @danieldeidda do you remember?

KrisThielemans avatar Sep 27 '22 19:09 KrisThielemans

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

danieldeidda avatar Sep 28 '22 08:09 danieldeidda

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).

KrisThielemans avatar Sep 28 '22 10:09 KrisThielemans

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.

markus-jehl avatar Sep 28 '22 13:09 markus-jehl