-
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
BlocksOnCylindrical get_sampling_in_m returns ring spacing instead of taking gaps into account #1396
Comments
@KrisThielemans @danieldeidda STIR/src/include/stir/ProjDataInfoGeneric.inl Lines 88 to 94 in 8ced2d7
Compared to what is done for Cylindrical scanners: STIR/src/buildblock/ProjDataInfo.cxx Lines 103 to 104 in 8ced2d7
Why are we not using the same implementation for BlocksOnCylindrical? This would have worked: |
I see a number of other Checking the history here, @danieldeidda put those lines in, simplifying @roemicha cde7f2d's copy of the cylindrical case. The simpler code would do exactly the same as the cylindrical case I believe (if span=1). (I guess both cases were implemented in a specific way to speed it up a bit, although not so sure if it actually does). Another question I suppose is if the down/upsampling code should really call this function. I suppose maybe it needs to for the interpolation, but it certainly shouldn't have caused a drift. |
I agree that the cleanest would be to remove all overloads. When the crazy hierarchy is fixed then the implementation can move from the Cylindrical to the Generic projdata. Will give it a try. Currently the interpolation code is calling this function to check that the input projdata are homogeneously sampled - otherwise the index conversion would be much more complex and computationally demanding. |
yes. That check could be written in terms of |
Yes, the check could also just use |
ok. sorry. Obviously best to fix this one in any case. Looks like we can do it in 2 separate PRs then, which is great. |
As part of the scatter speedup work with downsampled scanners (#1291), I noticed that there was always a large artifact at the bottom of the scatter estimate (~15% error), irrespective of how much downsampling was used. This turned out to be caused by the interpolation step that is done in the final step of the scatter estimation (that interpolation is actually not required, since the scatter is already upsampled to the original scanner dimensions). There, the input and output are direct sinograms of the same size and the check inside upsample_and_fit_scatter_estimate, whether the input is regularly sampled succeeds because get_sampling_in_m trivially returns the ring spacing. However, since here the input is the full BlocksOnCylindrical scanner and no longer the downsampled scanner, it should actually fail because there are gaps between axial blocks:
As a result, the bottom of the simulated cylinder is now ~1mm off after this second interpolation step and causes the horizontal artifact:
The text was updated successfully, but these errors were encountered: