UCL / STIR

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

SPECT image xy-origin is half a pixel off for even-sized images #1235

Open KrisThielemans opened 1 year ago

KrisThielemans commented 1 year ago

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:

KrisThielemans commented 11 months 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.

See also https://stir.sourceforge.net/wiki/index.php/STIR_FAQ#How_does_the_STIR_coordinate_system_work_.28e.g._for_generate_image.29