Halftomo: support CoR on the left
release_2020.4
branch
This MR adds support for CoR on the left of the detector.
To do:
-
Implement in SinoProcessing
andCudaSinoProcessing
-
Unit tests -
Integrate in pipeline ( ProcessConfig
) -
Test on real data (see MM dataset)
Notes
The "CoR on the left" implementation consists in the following:
- Flip the image horizontally
- Build the sinogram with
cor = n_x - 1 - cor
- Flip the output horizontally
This enables to fall-back to the standard case.
This is admittedly not very elegant, but the code for "standard case" is already quite difficult to read with all those indices manipulations, so adding more complexity might be a bad idea. Besides, this case should be quite rare (the first occurrence was because radios were flipped horizontally in the acquisition chain, not even because CoR was genuinely on the left !).
This implementation should have no performance penalties with numpy (using array views).
The Cuda backend, however, needs two calls to a reverse
kernel. To avoid this, a second dedicated kernel should be written in halftomo.cu
. Let's leave this as an exercise.