-
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
Improvements to scatter estimation interpolation #1161
Comments
@NikEfth : @KrisThielemans mentioned that you are currently working on something related, so it would be good to hear your take on this! |
Hi @markus-jehl and @KrisThielemans, In the past, I was working on energy-based scatter estimation. The method returned down-sampled 3D sinograms which I then had to interpolate back to the original size. I had tried many things but the one that worked the best was to split the interpolation into 2 steps. First, I interpolate the views and tangs from the downsampled to the full geometry in an in-segment fashion (not to be confused with direct, as obliques were included, too). Then I convert the partially upsampled sinograms to michelograms and interpolate between rings. The results are good and you are welcome to give it a try. Of note is that in the 2D the typical output is the scatter and additive sinograms. Here the scatter is not exported as essentially the scaled are scattered. So to regenerate your figure above use the scaled from the folder extras. I could make this more consistent tbh. |
I am sorry, In my previous reply, I forgot to mention the BlocksOnCylindrical case. I am looking forward to your results! |
Hi Nikos, |
Is this the branch I should be using? https://github.com/NikEfth/STIR/tree/scatter_3d Have been pulled away on something else and will try this in spare moments - expect a bit of a delay until I have results :-) |
This will be #1156 presumably. As far as I can see, this PR doesn't resolve the issue of gaps in axial direction as it still uses STIR/src/buildblock/interpolate_projdata.cxx Line 444 in 9ed30a6
Of course, the NeuroLF doesn' t have any, so it might be sufficient for @markus-jehl |
@KrisThielemans: I've started looking into interpolate_projdata.cxx a bit and trying to work out the best way to implement this. The approach in the description of this issue would certainly be the nicest, but that only works if there is an interpolator that can work on irregular input data (currently it uses BSplinesRegularGrid) - is there one and how well do you think it will work if there are only around 7 slices in the input proj data? Alternatively, I can just add some axial smoothing to interpolate_axial_position.cxx, which seems fairly straight-forward. Also, should this line not be adding the offset instead of subtracting?
In all other places in this function, the offset is added. @NikEfth: I tried your branch and setting 3D, but all my RAM was being filled up and it took forever. Probably I would have needed to reduce the segment numbers etc. to get it working, but since all I need is a bit of axial smoothing on the direct scatter estimate I thought it's easier to do that directly. |
Sigh. That's a pity I was really looking forward to these results. |
but the way we construct the downsampled scanner is "regular" (i.e. no gaps there), so I still think this should work. Of course, this would be inappropriate for scanners with huge gaps (as then we'd potentially be computing scatter inside a large gaps, and never use it again). In any case, the (spatially invariant) smoothing approach assumes that the output sampling is regular, which is fine for you, but not for other scanners.
I will have to check that later (but I hope this stuff is tested elsewhere) |
This is a problem I had to face when a small number of blocks are off, too. |
as far as I can see, the only thing we need is changing the interpolator to cope with non-uniform output. All the rest will still work. |
on it :-) |
In scatter estimation the projection data are interpolated during
![image](https://user-images.githubusercontent.com/87262701/219045859-3f7f61f6-3b6f-464d-9287-cfced4f83117.png)
upsample_and_fit_scatter_estimate
, which callsinterpolate_projdata
. This function usessample_function_on_regular_grid
for Cylindrical scanners andinterpolate_axial_position
for BlocksOnCylindrical scanners. In the axial direction, this results in very unsmooth scatter estimates for BlocksOnCylindrical scanners:Therefore, it would be nice to rewrite the
interpolate_projdata
function to take the scanner geometry into account when calling the interpolator (basically replacingsample_function_on_regular_grid
with e.g.sample_function_on_ProjData
.The text was updated successfully, but these errors were encountered: