Better generic/blocks-on-cylindrical support: ROOT support and enabled TOF - #1746
Better generic/blocks-on-cylindrical support: ROOT support and enabled TOF#1746KrisThielemans wants to merge 17 commits into
Conversation
try to future-proof changes in the hierarchy
add "blocks" keywords to .hroot
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 14 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
- add RunTests::check_if_equal for LORInAxialAndNoArcCorrSinogramCoordinates (and DetectoinPositionPair) - add text output to stream for LORInAxialAndNoArcCorrSinogramCoordinates - use the latter in Python
- add basic checks on crystal/blocks spacing when constructing the geometry (call error() when they fail). - add check on ring-distance (call warning() when it fails) See UCL#1753 - add block-info for GE Signa PET/MR The checks will be performed when calling Scanner::set_up(). WARNING: set_up() now needs to be called explicitly. (We used to call it in the constructor, but can no longer do that as it might then throw in unexpected cases).
no longer set tof_mashing=0 and remove some checks that were throwing errors if TOF data was detected. adapt test_time_of_flight.cxx to test the Blocks case. This needed coping with LOR end-points not necessarily corresponding to the detectors.
If the scanner was recognised, but the axial_distance_between_crystals_in_cm was not explicitly given, it was initialised from the transaxial distance. Fixes UCL#1752
|
All ctests work on my machine. However, the headers of the test files on Zenodo need updating, so CI will currently still fail. We could fix the headers during CI, but I suppose it's better to upload a new version on Zenodo anyway. IMPORTANT: to get all the tests to work, I had to enable TOF for blocks-on-cylindrical (and fix a few bugs elsewhere). |
|
I can work on this after Thursday |
|
CI failures:
|
| else | ||
| set_scanner_geometry(scanner_geometry_v); | ||
|
|
||
| set_up(); |
There was a problem hiding this comment.
Probably best to re-instate this, but I had some trouble during testing.
|
I had to call |
valgrind detected that ProjectorByBinPairUsingParallelproj::_already_set_up was used before initialisatoin in set_defaults(). It shouldn't matter as it was afterwards set to false anyway. Nevertheless, best to fix it.
8d9852f to
134646f
Compare
|
|
future-proof and simplify code in a few places
Also run on non-arccorrected data, as that's what we do these days.
* Ask scanner if has been set_up before constructing ProjDataInfo * Make sure set_up() is called in every test.
|
I was a bit surprised that I still think it's better to test with "blocks" .hroot. (I suppose we could test with both, but I'm not sure that's really a good idea). |
|
Appveyor build for VS 2019 fails while compiling https://ci.appveyor.com/project/KrisThielemans/stir/builds/54710682/job/jucuo2u66rcx3u2d#L2838 All other compilers including VS 2022 are fine. It's trying to instantiate It looks like this is caused by and the RunTests addition in this PR
template <class T>
bool
RunTests::check_if_equal(const LORInAxialAndNoArcCorrSinogramCoordinates<T>& a,
const LORInAxialAndNoArcCorrSinogramCoordinates<T>& b,
const std::string& str)Looks like a compiler bug to me. |
c0ae735 to
5bb772b
Compare
5bb772b to
52f74f9
Compare
|
Aside from problems with downloading files from Zenodo, this is all fine now. I'll revert the change that removed the call to @VietAnhDao @emikhay this PR that should help you with GATE simulations for blocks and hence NeuroLF. As long as you edit the .hroot file. Summary of all changes is in the release_6.5.htm. Commit is 0eedd70. |

Add support for blocks on cylindrical scanners for reading GATE ROOT list-mode files.
Currently no tests for it yet. Help appreciated. @NikEfth @VietAnhDao