Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KrisThielemans opened this issue Aug 20, 2023 · 1 comment
Open

Comments

@KrisThielemans
Copy link
Collaborator

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

x_size_used = 2*static_cast<int>(ceil(FOVradius_in_mm / get_voxel_size().x())) + 1;
, which means it would be backwards incompatible in 2 ways:

  • 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
@KrisThielemans
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant