UCL / STIR

Software for Tomographic Image Reconstruction
http://stir.sourceforge.net/
Other
111 stars 93 forks source link

create_projdata_template with span=2 can give wrong num_axial_positions #1467

Open KrisThielemans opened 3 months ago

KrisThielemans commented 3 months ago

https://github.com/UCL/STIR/blob/7b1854b9ec55f25515f17b0f7649563b0026ed89/recon_test_pack/simulate_PET_data_for_tests.sh#L81-L89 create a DSTE with span=2 (as default for GE scanners) with max_ring_diff=2. This results in

matrix axis label [4] := segment
!matrix size [4] := 3
matrix axis label [2] := axial coordinate
!matrix size [2] := { 43,47,43}
minimum ring difference per segment := { -2,-1,2}
maximum ring difference per segment := { -2,1,2}

However, the scanner has 24 rings, so the first and last number of axial coordinates are too large. (They are appropriate for max_rd=3 I guess), and in fact should be even, resulting in a warning of a half-ring shift in the m coordinate.

This is probably an old bug, but I spotted the warning about the shift when debugging FBP3DRP in #1464

KrisThielemans commented 3 months ago

I still don't know why FBP3DRP failed in #1461 as no relevant code was changed there, except possibly the template for test_simulate_and_recon.sh. However, checking what was happening in the debugger, the find_rmin_rmax code in FBP3DRPReconstruction didn't seem to cope with the span=2, max_rd=2 case, so that should probably throw an error.