Open KrisThielemans opened 1 year ago
As briefly discussed with @varzakis : strategy for testing would be to use generate_image
with a (small) cylinder on-axis at x,y=0, which should place it in the STIR "centre", forward project with SPECTUB
and check if all views are the same. My prediction is that there will be (max 1 pixel) sin-curve in the sinogram, indicating half-a-pixel offset.
When even-sized, STIR PET images are non-symmetric, running from (-N/2),...(N/2-1) * voxel_size. This is taken into account in the PET projectors. However, the SPECT projectors take the centre in the middle as far as I understand. This means that our
origin
is wrong, and therefore LPS coordinates are also half a voxel off.Changing this would also need changing https://github.com/UCL/STIR/blob/4a9391257c76e8b8b1b68c22bc81fa92033bff77/src/buildblock/VoxelsOnCartesianGrid.cxx#L303, which means it would be backwards incompatible in 2 ways: