Unsharp does not work when n_slices < 6
Unsharp masking is unusable if we try to reconstruct less than 6 slices at once (illegal memory access in cuda).
It somehow makes sense as unsharp (like phase retrieval) is done in the radios domain. Thus, when the shape is (1, Nx)
then the 2D convolution has boundary issues.
For phase retrieval, problem was tackled by using a "phase margin". In this case, we can either:
- Use another margin ("unsharp margin"). Very expensive to implement (this was basically the reason for having
CudaFullFieldPipelineLimitedMemory
). - Reconstruct a minimum of slices to avoid this problem
- Use 1D convolution
The most satisfactory IMO is (3): the filter is separable so 1D convolution should still make sense (unlike for phase retrieval where the filter is not separable).
Edited by Pierre Paleo