Skip to content
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

Time Of Flight reconstruction #304

Merged
merged 420 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 174 commits
Commits
Show all changes
420 commits
Select commit Hold shift + click to select a range
d3aa6fc
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth Apr 11, 2019
cb2c46c
Two more changes asked by Codacy
NikEfth Apr 11, 2019
a4b815e
Number of time frames and function declaration (#12)
ALEXJAZZ008008 Apr 22, 2019
7c5ec7b
Fix for TOF-PSF reconstruction
NikEfth Jun 5, 2019
de8282b
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth Aug 8, 2019
3a25017
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth Aug 8, 2019
6d6b44b
Merge with master
NikEfth Nov 7, 2019
2c068c2
fix ProjData::get_num_sinograms() for TOF
KrisThielemans Jan 29, 2020
a296248
Merge branch 'master' into tof_sino_UCL
KrisThielemans Jan 29, 2020
8fa3169
fix sensitivity calculation for lm recon
NikEfth Feb 4, 2020
000a398
Merge remote-tracking branch 'origin/tof_sino_UCL' into tof_sino_UCL
NikEfth Feb 4, 2020
53085f0
Fixed test_zoom_images
NikEfth Feb 4, 2020
31dea95
fix: python
NikEfth Feb 4, 2020
3f4c94d
added ProjData::get_num_non_tof_sinograms and fixed SWIG for tof
KrisThielemans Feb 4, 2020
f22abd6
removed unused ForwardProjectorByBin::forward_project(Bin&,...)
KrisThielemans Feb 7, 2020
8683ef7
removed unused variable
KrisThielemans Feb 7, 2020
fafeefd
implemented codacy recommendations
KrisThielemans Feb 8, 2020
2b0691e
enable tests for filling TOF data
KrisThielemans Feb 8, 2020
4645c15
corrected some diagnostic messages in test_proj_data_in_memory
KrisThielemans Feb 8, 2020
99c8f7f
check TOF range in ProjDataInfo::operator==
KrisThielemans Feb 8, 2020
e4e5804
[TOF] fixed bug in max_unmashed_tof_pos_num
KrisThielemans Feb 8, 2020
d0753e3
renamed Scanner::get_num_max_of_timing_poss to get_max_num_timing_poss
KrisThielemans Feb 8, 2020
5a45c96
remove compiler warnings in ProjDataFromStream
KrisThielemans Feb 8, 2020
b1402b3
fix ProjDataInfo comparison
NikEfth Apr 8, 2020
b70a0c1
fix on previous commit
NikEfth Apr 8, 2020
2bd6cf8
Delete a small duplicate
NikEfth May 25, 2020
d88e98c
Merge remote-tracking branch 'origin/release_4' into tof_sino_UCL
KrisThielemans Jul 11, 2020
0f0cccb
correct ProjData::get_num_non_tof_sinograms()
KrisThielemans Dec 2, 2020
521be8d
If failed to find a TOF bin return min rather than centre
NikEfth Dec 18, 2020
854d121
Merge branch 'tof_sino_UCL' of git@github.com:NikEfth/STIR.git
NikEfth Dec 18, 2020
fc1ca43
Merge remote-tracking branch 'refs/remotes/upstream/master'
NikEfth Dec 18, 2020
fa0daaa
Merge branch 'master' into tof_sino_UCL
NikEfth Dec 18, 2020
66df042
Update LmToProjData.cxx and CListEventCylindricalScannerWithDiscreteD…
NikEfth Dec 18, 2020
9ac474e
Merge branch 'tof_sino_UCL' of git@github.com:NikEfth/STIR.git
NikEfth Dec 18, 2020
7f778d1
Curently Passes:
NikEfth Dec 19, 2020
dc0b293
Update and Pass run_test_simulate_and_recon.sh
NikEfth Dec 19, 2020
11d9b04
Compiles with GESinga TOF support and stir.i updates.
NikEfth Dec 19, 2020
b3f91c0
T.B.C. this value allows the test_ArcCorrection to pass
NikEfth Dec 20, 2020
76994be
Yet another scanner generation fix.
NikEfth Dec 20, 2020
03012cd
Revert "T.B.C. this value allows the test_ArcCorrection to pass"
NikEfth Dec 21, 2020
4a2be32
Reduce the threshold on overlap_interpolate.inl to fix a numerical in…
NikEfth Dec 21, 2020
df86c03
Merge remote-tracking branch 'origin/master' into tof_sino_UCL
KrisThielemans Jan 27, 2021
29c2c9c
Merge remote-tracking branch 'origin/master' into tof_sino_UCL
KrisThielemans Jan 30, 2021
970264b
hopefully more clear printing of TOF info
KrisThielemans Jan 30, 2021
31c3990
allow SSRB tof_mashing for proj_data_info
KrisThielemans Jan 30, 2021
9b0c2c0
Merge branch 'master' into tof_sino_UCL
KrisThielemans Nov 7, 2021
9fcf096
list_proj_data_info and test fixes
KrisThielemans Nov 7, 2021
f0c8efa
another fix for run_test_zoom_image.sh
KrisThielemans Nov 7, 2021
eb8ecd9
Merge remote-tracking branch 'origin/master' into tof_sino_UCL
KrisThielemans Dec 5, 2021
17daf28
made nonTOF GE Signa consistent with TOF version
KrisThielemans Dec 5, 2021
6be8e07
Merge ucl/master into tof_sino_ucl
robbietuk Feb 1, 2022
0981510
Add TOF info to DMI 5-ring
robbietuk Feb 1, 2022
aa5f26e
Merge pull request #19 from robbietuk/TOF/UpdateMaster
NikEfth Feb 2, 2022
72ffac3
Update build-test.yml
KrisThielemans Feb 8, 2022
c2e95ab
Allow view_segment + TOF bin OpenMP (#22)
robbietuk Feb 10, 2022
f2fe075
Simplify apply_tof_kernel_and_symm_transformation geometric computati…
robbietuk Feb 10, 2022
0ab8655
Apply suggestions from code review on TOF PR
KrisThielemans Feb 10, 2022
74baab9
remove file checked in by accident [ci skip]
KrisThielemans Feb 10, 2022
ec0bdcd
[CMAKE] remove outdated DISABLE_HDF5_SUPPORT line [ci skip]
KrisThielemans Feb 10, 2022
f78bd17
fix error introduced in code review suggestion
KrisThielemans Feb 10, 2022
e066ead
TOF erf interpolation class (FastErf) (#24)
robbietuk Feb 15, 2022
16518f9
Merge remote-tracking branch 'origin/master' into tof_sino_UCL
KrisThielemans Feb 26, 2022
6976945
re-enable forward projection without caching if nonTOF
KrisThielemans Feb 26, 2022
439f62c
remove the Discovery STE nonTOF scanner
KrisThielemans Feb 26, 2022
7437adf
update run_test_time_of_flight.sh but still broken
KrisThielemans Feb 26, 2022
8a34b4a
added extra test on TOF projdata
KrisThielemans Feb 28, 2022
68b7dc6
Merge branch 'master' into tof_sino_UCL
robbietuk Apr 6, 2022
37919a6
[ci skip] Set defaults scanner parameters for TOF fields
robbietuk Apr 6, 2022
78a7c1c
default TOF mashing factor to 1 when reading ROOT files
KrisThielemans Apr 6, 2022
6b8ae02
fix Scanner after merge onto TOF
KrisThielemans Apr 6, 2022
1a4faf2
remove remaining half_block in ROOT code
KrisThielemans Apr 6, 2022
aa50db5
fix ProjDataInfoSubsetByView for TOF
KrisThielemans Apr 6, 2022
f5478c6
Merge pull request #28 from robbietuk/TOF/MergeUCLSTIR
KrisThielemans Apr 6, 2022
60f2d37
Some changes for positron range: one medium
eliseemond Jun 18, 2018
974f148
Files for STIR+ROOT check (symmetries, unlisting etc.)
eliseemond Feb 19, 2019
581c2cd
The .hroot files were missing
eliseemond Jul 16, 2019
2884a4d
Gate/STIR time resolution calibration
eliseemond Sep 30, 2019
cb75a8c
Update README.md
eliseemond Sep 30, 2019
7e10e2c
README.md for ROOT consistency check for TOF
eliseemond Sep 30, 2019
f8dee64
Move ROOT-STIR-consistency into recon_tests and enable test [ci skip]
robbietuk Feb 11, 2022
8d8d5b4
Remove consistency configuration and generation files
robbietuk Apr 6, 2022
f59a3ce
Redesign of test_view_offset_root to include TOF tests
robbietuk Apr 9, 2022
140b217
Rename test_view_offset_root -> test_consistency_with_root
robbietuk Apr 9, 2022
b449748
Remove old test test_consistency_root
robbietuk Apr 9, 2022
ecb4fd4
[ci skip] Significant fixes for test_consistency_with_root tests
robbietuk Apr 9, 2022
a7ac52f
[ci skip] The data is TOF by default and guass_sigma_in_mm is not nee…
robbietuk Apr 9, 2022
3ae0730
Rename debug tool and cleanup content for non-TOF tests
robbietuk Apr 10, 2022
21ec98e
Update test data output ti *voxel_data*.txt in .gitignore
robbietuk Apr 10, 2022
9f4f2f7
[ci skip] TOF debug_consistency_with_root improvements
robbietuk May 16, 2022
e244cb4
changed TOF-test threshold to 3D & added 3D plot of all sources in 1 …
NicoleJurjew Aug 12, 2022
84cee72
adapted TOF-test threshold to 3.3
NicoleJurjew Aug 12, 2022
4cc2120
add documentation and changee variable names and plot legend
NicoleJurjew Aug 12, 2022
910ce5e
Merge pull request #26 from NicoleJurjew/adapt_root_consistency_thres…
robbietuk Aug 12, 2022
85d9472
Rename `test_consistency_with_root` to `test_consistency_with_GATE`
robbietuk Aug 17, 2022
855de84
Class and method documentation and code->method refactoring
robbietuk Aug 17, 2022
3df95b1
[ci skip] CTests save data as CSV with tolerance information.
robbietuk Aug 19, 2022
c43e68f
[ci skip] Change python data extraction to use csv
robbietuk Aug 19, 2022
ee64995
TOF threshold is a function of TOF resolution.
robbietuk Aug 19, 2022
e802219
fixes to comments [ci skip]
KrisThielemans Aug 20, 2022
0d59a1d
minor fixes to comments [ci skip]
KrisThielemans Aug 20, 2022
1422b9d
Merge pull request #30 from robbietuk/TOF/test_consistency_with_root
KrisThielemans Aug 20, 2022
dc5016c
fix TOF get_det_pos_pair_for_bin
KrisThielemans Aug 20, 2022
e576981
minor fixes for CListEventCylindricalScannerWithViewTangRingRingEncod…
KrisThielemans Aug 21, 2022
3c9545b
fixes for Bin
KrisThielemans Aug 21, 2022
c3630f1
add RunTests functionality for Bin
KrisThielemans Aug 21, 2022
7debbcf
remove CListEvent::get_swapped() and CListEventROOT::is_swapped()
KrisThielemans Aug 21, 2022
769fecd
fix DetectionPositionPair::timing_pos
KrisThielemans Aug 21, 2022
61de2b1
more fixes and tests for TOF-bin swapping
KrisThielemans Aug 21, 2022
d02feaa
remove untested/unused ProjDataInfoCylindrical* functions
KrisThielemans Aug 21, 2022
f41d184
[GHA] port changes from master for test workflow
KrisThielemans Aug 21, 2022
b6bfb67
Merge pull request #31 from KrisThielemans/TOF_fix_get_det_pos_pair_f…
KrisThielemans Aug 26, 2022
b6eb9ce
Use Bin TOF position in cache
NikEfth Mar 4, 2019
579227a
Rework get_proj_matrix_elems_for_one_bin and simply apply_tof_kernel
robbietuk Feb 21, 2022
9ee89b4
find_basic_bin `-1 * timing_pos_num` if do_symmetry_swap_s && tangen…
robbietuk Feb 22, 2022
4489198
Add SymmetryOperation_PET_CartesianGrid_swap_xmx_ymy_tmt
robbietuk Feb 22, 2022
9f82c8a
Improve test by inspecting elems_with_sym.bin is same as bin
robbietuk Feb 22, 2022
f452d10
Changes to DataSymmetries, if shift_z, set axial_pos_shift to axial p…
robbietuk Feb 23, 2022
1910184
Fix timing_pos_num changes for SymOp swap_xmx_ymy_zq
robbietuk Feb 23, 2022
c35cb4b
Add more tests and fix TOF scanner config
robbietuk Feb 23, 2022
176d080
Turn off data symmetries if tof enabled
robbietuk Feb 26, 2022
2b00be5
[ci skip] Disabled all but shift_z, improve test logic, add new scanner
robbietuk Mar 2, 2022
7416289
Remove error on non-cached forward projector with TOF
robbietuk Mar 2, 2022
27fdcb8
[ci skip] Cleanup and remove tmt symmetry class
robbietuk Mar 2, 2022
79d97c4
Simplify apply_tof_kernal loop
robbietuk Mar 2, 2022
6ee85ab
[ci skip] white space fixes
robbietuk Mar 7, 2022
5f2ce06
more bits for ProjMatrixByBin cache_key
KrisThielemans Mar 10, 2022
0e3dc9c
minor simplification in TOF kernel application
KrisThielemans Mar 10, 2022
1237a85
comment-out failing TOF det_pos test for now
KrisThielemans Mar 10, 2022
02af7d2
corrected assert [skip appveyor]
KrisThielemans Mar 10, 2022
332ea57
Correct bit shift
robbietuk Mar 10, 2022
3506af1
fix ProjData::fill_from in TOF case
KrisThielemans Aug 31, 2022
0690d0f
add to test_proj_data_info.cxx
KrisThielemans Aug 31, 2022
0af3702
simplify and fix ProjData::fill_from/copy_to
KrisThielemans Aug 31, 2022
580b78e
Merge pull request #40 from KrisThielemans/fix_fill_from
KrisThielemans Sep 1, 2022
da618ed
add TOF sim/recon to recon_test_pack
KrisThielemans Sep 3, 2022
19595b9
recon_test_pack: fix simulation scripts for TOF
KrisThielemans Sep 4, 2022
cc8ba97
recon_test_pack: fix run_test_simulate_and_recon.sh for TOF
KrisThielemans Sep 11, 2022
6bacfb0
rewrite of ProjDataFromStream offsets, adding support for "by sinogra…
KrisThielemans Sep 4, 2022
323806d
re-enable test_tof_proj_data_info_det_pos as now fixed
KrisThielemans Sep 4, 2022
91f19a4
Merge remote-tracking branch 'nikos/tof_sino_UCL' into TOF/Symmetries…
KrisThielemans Sep 12, 2022
bcab3d6
sensitivity fixes for the TOF case
KrisThielemans Sep 13, 2022
2606b76
Merge pull request #25 from robbietuk/TOF/Symmetries/Main
KrisThielemans Sep 13, 2022
98643e3
add missing TOF loops in ProjData*
KrisThielemans Sep 19, 2022
2876fcb
fix ProjDataInfo::set_tof_mash_factor
KrisThielemans Sep 19, 2022
c5af80e
fix subsets for TOF
KrisThielemans Sep 19, 2022
370d7fe
add TOF loop in extract_segments
KrisThielemans Sep 19, 2022
75e275f
Merge remote-tracking branch 'origin/master' into merge_master_to_TOF…
KrisThielemans May 8, 2023
932e7ba
fix TOF lm-recon and add test
KrisThielemans May 8, 2023
6f24052
Merge remote-tracking branch 'origin/master' into merge_master_to_TOF…
KrisThielemans May 11, 2023
855f065
correct mCT TOF info
KrisThielemans May 24, 2023
a94ec57
add info for Siemens Vision 600
KrisThielemans May 24, 2023
a01dee3
add parsing of Siemens TOF data
KrisThielemans May 24, 2023
74d0473
change order of TOF bins in Siemens Interfile data
KrisThielemans May 31, 2023
e308ba2
fix Siemens TOF order when parsing interfile headers
KrisThielemans Jul 9, 2023
6575566
define STIR_TOF preprocessor/cmake variable
KrisThielemans Aug 18, 2023
ca03154
enable additive-sino for TOF listmode recon wtih caching
KrisThielemans Aug 18, 2023
d3d0c52
add TOF bin to output of list_lm_events
KrisThielemans Aug 18, 2023
be953b3
ECAT8_32 bit read TOF information
KrisThielemans Jul 9, 2023
fa27110
[GHA] increase disk space on GitHub actions runner
KrisThielemans Aug 19, 2023
cb3934c
unlist all TOF bins in one go by default
KrisThielemans Aug 19, 2023
8dfba7b
add TOF loops in inverse_SSRB
NicoleJurjew Aug 22, 2023
59d1c58
add loops over TOF in interpolate_projdata
NicoleJurjew Aug 22, 2023
3c29ea5
reverse TOF bin order for Siemens files
NicoleJurjew Aug 22, 2023
1d7ecf4
explicitly use segment 0 only in scatter upsampling
NicoleJurjew Aug 22, 2023
b3dad73
Merge pull request #5 from NicoleJurjew/fix_inverseSSRB
KrisThielemans Aug 22, 2023
c5ce566
Merge pull request #44 from KrisThielemans/merge_master_to_TOF_2023_0…
KrisThielemans Sep 6, 2023
51642dc
merging latest master, in particular new templated CListEventScannerW…
Sep 7, 2023
f89c53b
Merging master: correction of conflict in text
danieldeidda Sep 7, 2023
1f28f91
Merging master: update CListRecordROOT.cxx
danieldeidda Sep 7, 2023
62cebdd
reinstate some lines that were lost in merge
KrisThielemans Sep 18, 2023
7fdedf0
fix CListEventScannerWithDiscreteDetectors regressions introduced in …
KrisThielemans Sep 18, 2023
b0062ad
disabled buggy unmashed_tof_bin functionality
KrisThielemans Sep 17, 2023
91d707b
one more regression fix
KrisThielemans Sep 19, 2023
b19b7cf
added functionality to test DetectionPosition
KrisThielemans Sep 19, 2023
c086a1e
added lower-level test on CListEventROOT TOF swapping
KrisThielemans Sep 19, 2023
f3f940b
Merge pull request #47 from KrisThielemans/fixPreviousMerge
KrisThielemans Sep 19, 2023
e480580
Merge remote-tracking branch 'origin/master' into merge_master_to_TOF…
KrisThielemans Sep 19, 2023
747fa97
Merge remote-tracking branch 'origin/master' into merge_master_to_TOF…
KrisThielemans Sep 19, 2023
60762a9
[SWIG] define STIR_TOF
KrisThielemans Sep 20, 2023
1732376
Merge pull request #48 from KrisThielemans/merge_master_to_TOF_2023_0…
KrisThielemans Sep 20, 2023
9b9eca9
small code clean-up
KrisThielemans Sep 20, 2023
4432943
commented out run_tof_test_function in LmToProjData
KrisThielemans Sep 20, 2023
93fe32b
tiny bit of extra documentation and clean-up
KrisThielemans Sep 20, 2023
08bb7a5
Merge remote-tracking branch 'origin/master' (v5.2.0) into TOF branch
KrisThielemans Nov 6, 2023
d3870ed
remove erroneous asserts introduced in previous merge
KrisThielemans Nov 7, 2023
04b6623
[GHA] corrected tmate session if statement
KrisThielemans Nov 21, 2023
56804ac
[GHA] always enable tmate temporarily
KrisThielemans Nov 21, 2023
a4b4493
[GHA] add .v and .s to upload (if recon_test_pack failure)
KrisThielemans Nov 21, 2023
b71683e
remove .ahv files as not used
KrisThielemans Dec 5, 2023
229c07a
handle "compressed" projdatainfo as input
KrisThielemans Dec 18, 2023
b579414
set default for energy fields when reading .hroot
KrisThielemans Dec 22, 2023
f27262c
set test files to have odd number of TOF bins
KrisThielemans Dec 22, 2023
6f03c22
fix ProjDataInfo::operator== and >= to check tof_mash_factor
KrisThielemans Dec 22, 2023
36d25e3
fix BinNormalisationFromProjData::set_up to cope with mixing TOF data
KrisThielemans Dec 22, 2023
bd49727
remove (now) unused use_tof member and keyword
KrisThielemans Dec 22, 2023
2ea7e18
more helpful error message in find_STIR_config_file
KrisThielemans Dec 22, 2023
351c29d
Fix handling of non-TOF sensitivity calculation for projdata
KrisThielemans Dec 23, 2023
3d93969
Merge pull request #55 from KrisThielemans/TOFcompressedlistmode
KrisThielemans Dec 23, 2023
e3a4e28
recon_test_pack: fix run_root_GATE.sh and associated files
KrisThielemans Dec 27, 2023
5e6b25d
let constructors error if max_num_nonarccorrected_data is smaller tha…
KrisThielemans Dec 27, 2023
4222556
fix scatter templates: set max_num_nonarccorrected bins
KrisThielemans Dec 28, 2023
8af448b
minor changes in list-mode tests
KrisThielemans Dec 27, 2023
f017c9a
upgrade STIR_VERSION to 6.0.0
KrisThielemans Dec 27, 2023
3846284
minor corrections in GATE test files
KrisThielemans Dec 28, 2023
6b7a85e
tell git *.l and *.root are binary
KrisThielemans Dec 29, 2023
01075f6
Merge remote-tracking branch 'nikos/tof_sino_UCL' into merge_master_a…
KrisThielemans Dec 30, 2023
06bb31d
use ROOT tests with TOF mashing = 1
KrisThielemans Dec 31, 2023
12e0fff
Merge pull request #52 from KrisThielemans/merge_master_at_v5.2.0_to_TOF
KrisThielemans Dec 31, 2023
52808c3
fix TOF swap in find_cartesian_coordinates_given_scanner_coordinates
KrisThielemans Oct 6, 2023
64962b6
correct typos in test
KrisThielemans Oct 6, 2023
7e6dcf1
Merge pull request #50 from KrisThielemans/TOF_swap_fix
KrisThielemans Dec 31, 2023
d458d36
set VERSION.txt to 6.0.0 as well
KrisThielemans Dec 31, 2023
809e59d
removed script as obsolete and not working anyway
KrisThielemans Dec 31, 2023
910490f
Siemens Vision to Vision 600
KrisThielemans Dec 31, 2023
c7a2b15
removed full_event from CListRecord
KrisThielemans Dec 31, 2023
dd7cca8
Interfile parsing fixes for TOF and clarifications
KrisThielemans Jan 1, 2024
386a797
reinstate check on axial_pos range
KrisThielemans Jan 1, 2024
b0fac1e
clean-up of now obsolete TOF functionality
KrisThielemans Jan 1, 2024
b068bc8
removed unused/unimplemented method
KrisThielemans Jan 1, 2024
0e5b7b3
remove member that clashes with the one in the base class
KrisThielemans Jan 1, 2024
2bcdc3e
reinstated deleting of arrays in SPECTUB destructor
KrisThielemans Jan 2, 2024
005f70a
removed get_bin_ptr and made get_bin()/get_densel() return const&
KrisThielemans Jan 2, 2024
51d8c0b
removed remnants of non-functional methods
KrisThielemans Jan 2, 2024
1d38eb9
removed unused function
KrisThielemans Jan 2, 2024
f396331
removed unused class
KrisThielemans Jan 2, 2024
3ef019c
replaced get_scanner_sptr() with get_scanner() for ListModeData
KrisThielemans Jan 2, 2024
db42d85
added Vereos but disabled for now as unchecked [ci skip]
KrisThielemans Jan 2, 2024
d5aae0d
Merge pull request #59 from KrisThielemans/minor_TOF_fixes
KrisThielemans Jan 2, 2024
c653a1b
Merge remote-tracking branch 'origin/master' into merge_master_to_TOF…
KrisThielemans Jan 2, 2024
d60ba7b
Merge pull request #61 from KrisThielemans/merge_master_to_TOF_2024_0…
KrisThielemans Jan 3, 2024
a82bd90
tiny bit of TOF release notes [ci skip]
KrisThielemans Jan 3, 2024
3e1561a
add KeyParser::add_alias_key
KrisThielemans Jan 3, 2024
4192f33
changed TOF-related keywords for Interfile parsing
KrisThielemans Jan 3, 2024
22949cb
update glossary for TOF and a few other things [ci skip]
KrisThielemans Jan 3, 2024
fde976a
Merge pull request #62 from KrisThielemans/TOF_interfile_keywords
KrisThielemans Jan 4, 2024
27a2516
make ProjDataInfo*NoArcCorr::get_bin_for_det_pair private
KrisThielemans Jan 4, 2024
572509a
document that get_bin_for_det_pair takes mashed_tof_bin arg
KrisThielemans Jan 4, 2024
6f63046
Merge pull request #63 from KrisThielemans/get_bin_for_det_pair_private
KrisThielemans Jan 4, 2024
4a285ad
remove defaults for some TOF-range to avoid unexpected problems
KrisThielemans Jan 4, 2024
53dbdc1
some TOF Codacy warning fixes for the GATE consistency test
Jan 4, 2024
4088ec3
removed some test-scanners from Scanner
KrisThielemans Jan 5, 2024
ddd3e0c
TOF Interfile header writing fix
KrisThielemans Jan 5, 2024
a93870d
change defaults in ProjDataInfo::ask_parameters and remove span=0
KrisThielemans Jan 5, 2024
2cccf63
changed Interfile header keyword to "TOF timing resolution (ps)"
KrisThielemans Jan 5, 2024
293d0f6
decrease precision in checking of TOF keywords
KrisThielemans Jan 5, 2024
0818f69
nicer formatting of Scanner::parameter_info
KrisThielemans Jan 5, 2024
be414b2
add example TOF interfile header
KrisThielemans Jan 5, 2024
d7330dc
use STIR6.0 when output an Interfile header to denote TOF changes
KrisThielemans Jan 5, 2024
c6b36ed
revert change and allow span=0 and use it in the scatter tests
KrisThielemans Jan 5, 2024
0e11a8f
Merge pull request #66 from KrisThielemans/TOF_Interfile_scanner_fixes
KrisThielemans Jan 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ if(NOT DISABLE_CERN_ROOT)
endif()
endif()

if(NOT DISABLE_HDF5_SUPPORT)
find_package(HDF5 COMPONENTS CXX)
endif()

if(NOT DISABLE_AVW)
find_package(AVW)
endif()
Expand Down
38 changes: 38 additions & 0 deletions recon_test_pack/OSMAPOSL_test_lmf.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
OSMAPOSLParameters :=
objective function type:= PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin
PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin Parameters:=
list mode filename := PET_ACQ_small.l.hdr.STIR
max ring difference num to process := 2
projector pair type := Matrix
Projector Pair Using Matrix Parameters :=
Matrix type := Ray Tracing
Ray tracing matrix parameters :=
; use multiple (almost) parallel LORs for every bin in the sinogram
; to avoid discretisation artefacts
number of rays in tangential direction to trace for each bin:= 3
; you could disable some symmetries if you have enough memory
; this would for instance allow you to increase the number of subsets
; do_symmetry_90degrees_min_phi:=0
End Ray tracing matrix parameters :=
End Projector Pair Using Matrix Parameters :=

Bin Normalisation type := From ProjData
Bin Normalisation From ProjData :=
normalisation projdata filename:= my_acfs.hs
End Bin Normalisation From ProjData:=

;num_events_to_store := 100
recompute sensitivity :=1
use subset sensitivities:= 0
sensitivity filename:= my_sens_t_lm_pr_seg2.hv
zoom := 1

additive sinogram := my_MLrandoms_f1.hs

end PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin Parameters:=
enforce initial positivity condition:= 1
number of subsets:= 1
number of subiterations:= 1
save estimates at subiteration intervals:= 1
output filename prefix := my_output_t_lm_pr_seg2
END :=
Empty file modified recon_test_pack/lm_to_projdata.par
100755 → 100644
Empty file.
5 changes: 4 additions & 1 deletion recon_test_pack/root_header.hroot
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ Average depth of interaction (cm) := 0.7
Distance between rings (cm) := 0.40625
Default bin size (cm) := 0.208626
Maximum number of non-arc-corrected bins := 344
Number of TOF time bins := 410
Size of timing bin (in picoseconds) := 10.00
Timing resolution (in picoseconds) := 400.0


%TOF mashing factor:= 82

GATE scanner type := GATE_Cylindrical_PET
GATE_Cylindrical_PET Parameters :=
Expand Down
106 changes: 106 additions & 0 deletions recon_test_pack/run_test_time_of_fligh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#! /bin/sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct name of file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

# A script to check to see if Time Of Flight data are binned and used properly
#
# Copyright (C) 2016, University of Leeds
# Copyright (C) 2017, University of Hull
# This file is part of STIR.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# See STIR/LICENSE.txt for details
#
# Author Nikos Efthimiou
#

# Scripts should exit with error code when a test fails:
if [ -n "$TRAVIS" ]; then
# The code runs inside Travis
set -e
fi

echo This script should work with STIR version '>'3.0. If you have
echo a later version, you might have to update your test pack.
echo Please check the web site.
echo

if [ $# -eq 1 ]; then
echo "Prepending $1 to your PATH for the duration of this script."
PATH=$1:$PATH
fi

# first need to set this to the C locale, as this is what the STIR utilities use
# otherwise, awk might interpret floating point numbers incorrectly
LC_ALL=C
export LC_ALL

echo "=== create template sinogram. We'll use a test_scanner which is small and
has TOF info"
template_sino=my_test_scanner_template.hs
cat > my_input.txt <<EOF
test_scanner
1
82
N



EOF
create_projdata_template ${template_sino} < my_input.txt > my_create_${template_sino}.log 2>&1
if [ $? -ne 0 ]; then
echo "ERROR running create_projdata_template. Check my_create_${template_sino}.log"; exit 1;
fi

export INPUT_ROOT_FILE=test_PET_GATE.root
export EXCLUDE_RANDOM=1
export EXCLUDE_SCATTERED=1

INPUT=root_header.hroot TEMPLATE=$template_sino OUT_PROJDATA_FILE=my_tof_sinogram lm_to_projdata --test_timing_positions lm_to_projdata.par > my_write_TOF_values_${template_sino}.log 2>&1

if [ $? -ne 0 ]; then
echo "ERROR running lm_to_projdata --test_timing_positions. Check my_write_TOF_values_${template_sino}.log"; exit 1;
fi

echo "Comparing values in TOF sinogram ..."
list_projdata_info --all my_tof_sinogram_f179g1d0b0.hs > my_sino_values_$template_sino.log 2>&1
if [ $? -ne 0 ]; then
echo "ERROR running list_projdata_info. Check my_sino_values_$template_sino.log";
exit 1;
fi


TOF_bins=$(grep 'Total number of timing positions' my_sino_values_$template_sino.log | awk -F ':' '{ print $2 }')
echo "Total number of TOF bins:" $TOF_bins

Timming_Locations=$(grep 'Timing location' my_sino_values_$template_sino.log | awk -F ':' '{ print $2 }')
echo "Timming_Locations:" $Timming_Locations

Data_mins=$(grep 'Data min' my_sino_values_$template_sino.log | awk -F ':' '{ print $2 }')
echo "Data mins:" $Data_mins

Data_maxs=$(grep 'Data max' my_sino_values_$template_sino.log | awk -F ':' '{ print $2 }')
echo "Data maxs:" $Data_maxs

for i in $(seq 5)
do
if [ $(( $(($(($i-1)) - $((TOF_bins/2)))) - $((Data_mins[$i])))) -ne 0 ]; then
echo "Wrong values in TOF sinogram. Error. $(( $(($(($i-1)) - $((TOF_bins/2)))) - $((Data_mins[$i]))))"
exit 1
fi
done


echo
echo '--------------- End of Time-Of-Flight tests -------------'
echo
echo "Everything seems to be fine !"
echo 'You could remove all generated files using "rm -f my_* *.log"'
exit 0

70 changes: 70 additions & 0 deletions scripts/plot_TOF_bins.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
%%
%Plot TOF bins.
% Nikos Efthimiou. 2018/11/01
% University of Hull

%This scripts loads LOR files, exported by test_time_of_flight from the disk and plots them.
%%
clc; clear all;
%Path to TOF files.
path_name ='/home/nikos/Desktop/conv_LOR/'
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved

pre_sort_files_in_path = dir(path_name)
nums = []
names = []

for i = 1: size(pre_sort_files_in_path)
cur_file = pre_sort_files_in_path(i).name
if strfind (cur_file, 'glor')
num = sscanf(cur_file,'glor_%d')
% The following number can change accordingly.
if ((mod(num,1)==0) || num == 500000000)
nums{end+1} = int32(num);
names{end+1} = cur_file;
end

end
end

clear cur_file
sorted_filenames = cell(numel(nums),2);
[Sorted_A, Index_A] = sort(cell2mat(nums));
sorted_filenames(:,2) = names(Index_A);

% hold x values
x_values = [];
% hold the tof bins.
y_tf_values = [];
% hold the non tof LOR
y__ntf_values = [];

for i = 1 : size(sorted_filenames,1)
cur_file = sorted_filenames{i,2};

if strfind (cur_file, 'glor')

if strfind(cur_file, '500000000')
cur_full_path = fullfile(path_name, cur_file);

A = importdata(cur_full_path);
y_ntf_values = A(:,2);
else
cur_full_path = fullfile(path_name, cur_file);

A = importdata(cur_full_path);

if size(x_values) == 0
x_values = A(:,1);
end

y_tf_values = [y_tf_values A(:,2)];

end
end
end

sum_of_all_bins = sum(y_tf_values,2);
x_v = x_values/0.299;

%% Create Plot
plot(x_v,y_tf_values(:,:), x_v, sum_of_all_bins, x_v, y_ntf_values)
12 changes: 10 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ option(BUILD_EXECUTABLES
option(BUILD_SHARED_LIBS
"Use shared libraries" OFF)

### Settings for external libraries
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow removed. re-instate I guess (I haven't checked properly)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was weird. I merged with master and still this line did not re-appear. Only when I checked out the file.


if (LLN_FOUND)
set(HAVE_ECAT ON)
message(STATUS "ECAT support enabled.")
Expand Down Expand Up @@ -68,6 +66,16 @@ else()
message(STATUS "RDF support disabled.")
endif()

if (HDF5_FOUND)
set(HAVE_HDF5 ON)
message(STATUS "HDF5 support enabled.")
add_definitions(-D HAVE_HDF5)
include_directories(${HDF5_INCLUDE_DIRS})

else()
message(STATUS "HDF5 support disabled.")
endif()


if (ITK_FOUND)
message(STATUS "ITK libraries added.")
Expand Down
10 changes: 10 additions & 0 deletions src/IO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ if (CERN_ROOT_FOUND)
)
endif()

if (HDF5_FOUND)
list(APPEND ${dir_LIB_SOURCES}
GEHDF5Data
)
endif()

if(AVW_FOUND)
list(APPEND ${dir_LIB_SOURCES}
stir_AVW
Expand All @@ -82,6 +88,10 @@ if (CERN_ROOT_FOUND)
target_link_libraries(IO ${CERN_ROOT_LIBRARIES})
endif()

if (HDF5_FOUND)
target_link_libraries(IO ${HDF5_CXX_LIBRARIES})
endif()

if (AVW_FOUND)
target_link_libraries(IO ${AVW_LIBRARIES})
endif()
Expand Down
29 changes: 29 additions & 0 deletions src/IO/GEHDF5Data.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "stir/IO/GEHDF5Data.h"

START_NAMESPACE_STIR

shared_ptr<Scanner>
GEHDF5Data::get_scanner_sptr() const
{
return this->scanner_sptr;
}

shared_ptr<ExamInfo>
GEHDF5Data::get_exam_info_sptr() const
{
return this->exam_info_sptr;
}

void
GEHDF5Data::open(const std::string& filename)
{
this->file.openFile( filename, H5F_ACC_RDONLY );

warning("CListModeDataGESigna: "
"Assuming this is GESigna, but couldn't find scan start time etc");
this->scanner_sptr.reset(new Scanner(Scanner::PETMR_Signa)); // for now we are assuming that the scanner is a PET/MR Signa
// TODO: read scanner type from the dataset: "/HeaderData/ExamData/scannerDesc"
this->exam_info_sptr.reset(new ExamInfo);
}

END_NAMESPACE_STIR
7 changes: 6 additions & 1 deletion src/IO/IO_registries.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@
#endif
#include "stir/IO/ECAT8_32bitListmodeInputFileFormat.h"

#ifdef HAVE_HDF5
#include "stir/IO/GESignaListmodeInputFileFormat.h"
#endif
//! Addition for SAFIR listmode input file format
#include "stir/IO/SAFIRCListmodeInputFileFormat.h"


//! Addition for ROOT support - Nikos Efthimiou
#ifdef HAVE_CERN_ROOT
#include "stir/IO/ROOTListmodeInputFileFormat.h"
Expand Down Expand Up @@ -139,5 +141,8 @@ static RegisterInputFileFormat<ecat::ecat7::ECAT966ListmodeInputFileFormat> LMdu
static RegisterInputFileFormat<ecat::ecat7::ECAT962ListmodeInputFileFormat> LMdummyECAT962(5);
#endif
static RegisterInputFileFormat<ecat::ECAT8_32bitListmodeInputFileFormat> LMdummyECAT8(6);
#ifdef HAVE_HDF5
static RegisterInputFileFormat<GESignaListmodeInputFileFormat> LMdummyGESigna(7);
#endif

END_NAMESPACE_STIR
3 changes: 2 additions & 1 deletion src/IO/InputStreamFromROOTFile.cxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2015, 2016 University of Leeds
Copyright (C) 2016, UCL
Copyright (C) 2018 University of Hull
Copyright (C) 2016, 2017, 2018 University of Hull
This file is part of STIR.

This file is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -29,6 +29,7 @@ InputStreamFromROOTFile()
{
set_defaults();
reset();
least_significant_clock_bit = 1.0e+12; // TODO remove cst or rename
}


Expand Down
Loading