-
Notifications
You must be signed in to change notification settings - Fork 95
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
parallelproj pre-1.9.0 truncates kernel for large TOF bin size #1452
Comments
This causes problems for normal reconstructions, as we're (by default) assuming that the non-TOF sensitivity is equal to the TOF sensitivity image, but that isn't the case with parallelproj. In the above extreme case, this seems to give serious artefacts. |
@gschramm is this known behaviour? Are you using a Gaussian kernel, as opposed to its integral (erf)? I'm not sure what the best way around this is for now. I thought to (very crudely) pass sqrt(CTR^2+(TOF_bin_size/2)^2) to parallelproj (after conversion to sigma). What do you think? |
Hm, that is indeed very strange. The TOF projectors are supposed to correctly integrate the Gaussian over the bins (resulting in the difference of two error functions) - see e.g. here. Could it be that this is related to our "truncation strategy"? By default, we neglect "voxel - tof bin center" pairs that are too far apart. In the practical implementation, we calculate the "relevant" TOF bins for every voxel along an LOR (TOF bins where the contributions are supposed to be > 0). The function computing the "relevant TOF bins" is here. Can you try with a bigger value for |
I guess the "effective" sigma, that is used to calculate the "relevant TOF bins" should be: So far, I always assumed |
If you're using erf, then the sum over all TOF bins should be non-TOF (except the edges). so maybe it is the truncation strategy indeed. Is it possible to update that to take bin width into account? Then there should be no need for effective sigma (we don't need it in the RT matrix). We regularly run with larger TOF-mashing to save time and memory... |
Hi Kris, I will fix that on the C/CUDA level of parallelproj (using the effective sigma for the truncation). With "effective sigma" + n_sigmas=3 and a point source, If that acceptable? |
sure. there will always be numerical differences. thanks! I probably should have created this issue on parallelproj repo, but I thought it was a STIR bug... |
Hi Kris, I submitted this PR to fix the kernel truncation issue (merges the According to my tests, the residual underestimation of the TOF sum, due to kernel truncation when using 3 sigmas, is between:
The negative bias in the case of tof bin with << sigma tof) can be calculated analytically (erf(n_sigmas/sqrt(2)). |
just added the "global correction". this means that for voxels that line up with the center of the TOF bins, |
Fixed in parallelproj 1.9.0. Thanks @gschramm ! Maybe we should require that version... |
I have weird results when reconstructing TOF data (forward projected with parallelproj via STIR) in a toy scanner. I know parallelproj does not (yet) attempt to make the sum over all TOF bins equal to the non-TOF result, but seem to find that the TOF bin size is ignored. In the example below, I set a really high CTR (10 ps), which effectively should use the TOF bin size, but it doesn't.
parallelproj result:
ray-tracing matrix result:
proj_data_info.get_sampling_in_k(stir.Bin(0,0,0,0,0))
returns 146.75mm, which seems to fit with the ray-tracing result (image radius 130mm)(Tested with parallelproj 1.7.3, CPU version)
The text was updated successfully, but these errors were encountered: