SPECT image xy-origin is half a pixel off for even-sized images
Opened this issue · 1 comments
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
STIR/src/buildblock/VoxelsOnCartesianGrid.cxx
Line 303 in 4a93912
- default num_voxels_xy would no longer be odd (i.e. would be 1 smaller)
- origin would be different when using an even number of voxels
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.