Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
72e4177
Initial commit.
NikEfth Sep 26, 2016
25a8067
Some functions added in the listmode objective function.
NikEfth Oct 3, 2016
7d0dc00
Merge branch 'UCL_master' into listmode_reconstruction
NikEfth Oct 7, 2016
fc6b0b8
LM reconstruction is working and is able to calculate the sensitivity
NikEfth Oct 9, 2016
4141403
The listmode reconsturction can calculate the sensitiviity image with…
NikEfth Oct 10, 2016
1dfe186
Corrected an error.
NikEfth Oct 10, 2016
00d26eb
Added functions to lm objective function to compute the sensitivity
NikEfth Oct 10, 2016
5dfa94f
Everything is working.
NikEfth Oct 13, 2016
f1e60e6
Removed all the Bin-wise functions.
NikEfth Oct 13, 2016
8098236
I removed few lines which would conflict with the branch which addresses
NikEfth Oct 13, 2016
f10b815
Added tests for lm reconstruction and a couple of fixes
NikEfth Oct 13, 2016
16f72e7
Minor improvements and code clean out.
NikEfth Oct 14, 2016
1aa85c1
Corrected bug in the first and last plane.
NikEfth Oct 14, 2016
fd5ef3b
Finished the test for listmode reconstruction.
NikEfth Oct 14, 2016
cde4c01
Removed large file.
NikEfth Oct 14, 2016
9aa0127
Applied Kris's comments:
NikEfth Oct 14, 2016
fe2cae0
run_test_listmode would perform two iterations.
NikEfth Oct 14, 2016
f6a9045
additive sinogram added in the tests.
NikEfth Oct 14, 2016
01c8aa7
Corrected one small bug
NikEfth Oct 14, 2016
d7d05ca
Tests for listmode reconstruction finished.
NikEfth Oct 16, 2016
23045f3
Corrected a small error.
NikEfth Oct 16, 2016
7645e91
Added explicit exit status.
NikEfth Oct 16, 2016
39fa774
minor corrections
NikEfth Oct 16, 2016
00da13a
Merged branch master into UCL_master
NikEfth Oct 18, 2016
f4ea07e
BUG fix: If the additive data are not set then don't perform any tests.
NikEfth Oct 19, 2016
971eb57
Listmode data can handle compression (span).
NikEfth Oct 21, 2016
77ff2c1
Minor bug corrections and cosmetics.
NikEfth Oct 23, 2016
adb1025
Removed a redundant variable.
NikEfth Oct 23, 2016
b138623
Axial compression for CListmodeDataROOT has been commented out.
NikEfth Oct 23, 2016
3fc9612
CListModeData::get_proj_data_info_sptr() became pure virtual
NikEfth Oct 24, 2016
d955723
minor correction
NikEfth Oct 24, 2016
dcbdf36
One more minor bug found
NikEfth Oct 24, 2016
484b793
merge with UCL_master to resolve conflicts.
NikEfth Oct 24, 2016
762ef6b
Merged branch listmode_reconstruction into listmode_reconstruction
NikEfth Dec 21, 2016
f409f8c
First commit with code for TOF-lm reconstruction.
NikEfth Dec 21, 2016
f14178f
More code
NikEfth Dec 22, 2016
0dd73ee
compiles but new scanner is not ready
NikEfth Dec 22, 2016
61e5432
Experimenting on the integration boundaries
NikEfth Dec 23, 2016
aae2d7b
Forgot the function full_event()
NikEfth Dec 23, 2016
b3f7047
small bugfix
NikEfth Dec 23, 2016
af479ce
keep forgetting code.
NikEfth Dec 23, 2016
bbdf718
floats
NikEfth Dec 24, 2016
a22566f
initialisation of least_significant_clock_bit
NikEfth Dec 24, 2016
f292a2d
init least_significant bit
NikEfth Dec 24, 2016
17898cb
invert bins
NikEfth Dec 24, 2016
fd0cb5e
:)
NikEfth Dec 24, 2016
62116f3
Faster scanner for 50, 20, 10 timing resolutions
NikEfth Dec 25, 2016
b7f1db9
Faster 100 ps scanner
NikEfth Dec 27, 2016
216a3cd
TOF tests part 1
NikEfth Jan 2, 2017
54fdbba
Correction on ROOT half_block rotation bug.
NikEfth Jan 16, 2017
da95f75
Merged branch bug_root_gate_rotation_2 into tof_lm
NikEfth Jan 16, 2017
5be23f0
Simplification of the TOF algorithm
NikEfth Jan 17, 2017
d257628
New scanners.
NikEfth Jan 17, 2017
ed6b89c
correction
NikEfth Jan 17, 2017
ca66bf1
Mostly everything but ProjDataFromStream
NikEfth Jan 21, 2017
a7c718e
Merge remote-tracking branch 'origin/master' into tof_sino
NikEfth Jan 30, 2017
fe31466
LmToProjData is TOF compatible
NikEfth Feb 6, 2017
58e4894
use boost:lexical_cast as opposed to C++11's to:string
Ottavia Feb 8, 2017
d0f1a27
Merged GE_Signa branch
Ottavia Feb 8, 2017
58a41a3
Merge branch 'GE_Signa' into tof_sino
Ottavia Feb 8, 2017
f6df4d5
Added and defined the get_proj_data_info_sptr for GE Signa
Ottavia Feb 8, 2017
f6d6d97
Merge branch 'GE_Signa' into tof_sino
eliseemond Feb 9, 2017
dcbc022
Revered CListTime, changede the get_tof_mash_factor with get_num_tof_pos
NikEfth Feb 12, 2017
c35c701
Amended CListEvent at LmToProjData
NikEfth Feb 12, 2017
3554ec9
Merge pull request #1 from NikEfth/tof_sino_UCL
NikEfth Feb 17, 2017
7b9d884
Merge changes on HDF5 into tof_sino
KrisThielemans Feb 17, 2017
4c5c1dd
Merge branch 'tof_sino' of github.com:NikEfth/HSTIR_outwards into tof…
NikEfth Feb 17, 2017
2d95fa0
Merge remote-tracking branch 'nikos/tof_sino' into tof_sino
KrisThielemans Feb 21, 2017
4407f03
cleaned the hdf5
NikEfth Feb 23, 2017
1f14f44
Added get_tof_bin and evaluation of delta time in picoseconds in CLis…
Ottavia Feb 23, 2017
a6b96ed
Moved TOF initialisation in ProjDataStream
NikEfth Feb 23, 2017
ac79a3e
fix in activate_TOF
NikEfth Feb 23, 2017
d8553d5
swapped has been moved to CListEvent
NikEfth Feb 23, 2017
f0d9dbc
Merge branch 'tof_sino' of github.com:NikEfth/HSTIR_outwards into tof…
KrisThielemans Feb 23, 2017
b5f5dfc
Merge branch 'tof_sino' of github.com:UCL/UCL-STIR into tof_sino
KrisThielemans Feb 23, 2017
44f317e
Additional fix for HDF5 library before merge with UCL-STIR/tof_sino repo
eliseemond Feb 23, 2017
3a26c73
Corrected num_events to store in lm_to_proj_data
NikEfth Feb 23, 2017
65a2c09
Merge pull request #2 from NikEfth/tof_sino_UCL
NikEfth Feb 23, 2017
8bfe0f7
Merge branch 'tof_sino' of github.com:NikEfth/HSTIR_outwards into tof…
NikEfth Feb 23, 2017
d5f9e50
Removed get_rof_mash_factor() as trigger, leftovers
NikEfth Feb 23, 2017
502743a
Fix to read template header in boundary conditions
eliseemond Mar 3, 2017
f6a19ff
timing position index added to Segment + forward/back projection for …
eliseemond Mar 22, 2017
dcd3194
Fourier Rebinning: throws error for TOF data
eliseemond Mar 22, 2017
6f61824
Fixes for TOF OSEM reconstructions + modified some test and utility f…
eliseemond Mar 31, 2017
1cda37c
Fix for sensitivity calculation (use of non-TOF backprojector) and ca…
eliseemond Apr 11, 2017
3d21216
Fix for sensitivity calculation 2
eliseemond Apr 11, 2017
22dbe61
Fix for clone() + clean-up + removed duplicate of proj_data_info in P…
eliseemond Apr 13, 2017
a177b60
Fix to add the possibility to use a TOF template to calculate sensiti…
eliseemond May 6, 2017
623e88b
Fix for last commit (min & max timing_pos_num correctly set depending…
eliseemond May 7, 2017
f9cb151
Fix2
eliseemond May 7, 2017
c23a604
Fix for Swig
eliseemond May 31, 2017
5788bbd
Merge remote-tracking branch 'UCL-STIR/LmToProj-fix' into tof_sino_UCL
eliseemond Jun 6, 2017
4dc60a9
Fix for GCC-c++11 in test_time_of_flight
eliseemond Jun 19, 2017
46d0712
Merge remote-tracking branch 'origin/master' into tof_sino
Ottavia Jun 27, 2017
61cf1ec
needed to add forward_project for a single bin, but currently just ex…
Ottavia Jun 27, 2017
ac5156d
Merge branch 'GE_Signa' into tof_sino
Ottavia Jun 27, 2017
037916d
Merge branch 'master' of https://github.com/eliseemond/STIR into tof_…
eliseemond Jul 12, 2017
1153858
Merge branch 'tof_sino_UCL' into tof_sino_UCL_STIR
eliseemond Jul 12, 2017
a897f19
Fix for TOF unlisting (tested on ROOT files and for Signa listmode) -…
eliseemond Jul 19, 2017
d2f39d9
New improved and cleaner apply_tof_kernel() and minor corrections
NikEfth Jul 19, 2017
915ce90
Forgot to remove some silly comments.
NikEfth Jul 19, 2017
2945fee
Fix of previous commit
eliseemond Jul 20, 2017
b013561
Merge remote-tracking branch 'origin/tof_sino' into tof_sino_UCL
eliseemond Jul 20, 2017
27e5691
Merge branch 'master' into tof_sino
KrisThielemans Jul 20, 2017
e77feab
Merge branch 'master' into tof_sino
eliseemond Jul 21, 2017
ddeca6e
Merge branch 'master' into tof_sino
KrisThielemans Jul 21, 2017
59cf315
Merge branch 'master' into tof_sino
KrisThielemans Sep 6, 2017
fa6e5bb
Bug fixes for TOF
KrisThielemans Sep 9, 2017
8241496
More TOF fixes
KrisThielemans Sep 9, 2017
5c68b72
replace auto_ptr with unique_ptr
KrisThielemans Sep 9, 2017
64b6e6c
Merge remote-tracking branch 'origin/master' into tof_sino
KrisThielemans Sep 10, 2017
b7f5729
Patch to make TOF reconstruction work
NikEfth Sep 11, 2017
cabd3ab
Add facility to LmToProjData to process multiple TOF bins in one go
Ottavia Sep 12, 2017
913c60b
Merge branch 'master' into tof_sino
KrisThielemans Sep 13, 2017
6cf4a0a
Merge branch 'tof_sino_lm_to_projdata_multiple_tof_bins' of https://g…
KrisThielemans Sep 13, 2017
74e2de4
Minor edits
NikEfth Sep 13, 2017
062b091
Merge remote-tracking branch 'origin/tof_sino_UCL' into tof_sino_UCL
NikEfth Sep 13, 2017
b091861
Adds a unit test to check the consistency between root listmode
eliseemond Sep 15, 2017
ff37a12
Merge branch 'tof_sino_UCL' of https://github.com/NikEfth/HSTIR_outwa…
eliseemond Sep 15, 2017
89fc82b
Removed code from LM objective function for separate projectors
NikEfth Sep 19, 2017
ba61f34
Changes to be able to reconstruct both TOF proj and lm data from ROOT…
Sep 19, 2017
7b3b599
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth Sep 21, 2017
d161949
Merge remote-tracking branch 'origin/tof_sino_UCL' into tof_sino_UCL
NikEfth Sep 21, 2017
031e347
Important bug fix and change in CListRecord and CListEventCylindrical…
NikEfth Sep 22, 2017
c75d71c
Bug fix ProjDataInfoCylindricalNoArcCorr: scanner_sptr should be deleted
NikEfth Sep 22, 2017
aee5de7
Remove tof_mash_factor from get_bin_for_det_pos_pair as ...
NikEfth Sep 27, 2017
fc84e85
fix for distributable computation at send_viewgrams()
NikEfth Sep 27, 2017
3dda018
Workaround for incomparable results between lm and proj recon.
NikEfth Sep 29, 2017
96a30a9
Fix calculation of sensitivity for TOF projection data
eliseemond Sep 30, 2017
e264723
Fix segmentation fault due to double deletion of shared_ptr in CListE…
eliseemond Oct 3, 2017
a740037
Rolling back to previous version-ProjData recons
eliseemond Oct 4, 2017
e8099b7
Merge remote-tracking branch 'UCL-STIR/master' into tof_sino_UCL_STIR
eliseemond Oct 4, 2017
29dc9b4
Fix for TOF sensitivity distributable computation
eliseemond Oct 5, 2017
995bbdb
Modification of last commit
eliseemond Oct 5, 2017
e236207
Display TOF sinograms
NikEfth Oct 10, 2017
3dbdc48
Merge remote-tracking branch 'origin/tof_sino_UCL' into tof_sino_UCL
NikEfth Oct 10, 2017
11e84a7
Allows the use of 4D sinograms with Swig
eliseemond Oct 11, 2017
6d5be5b
Merge remote-tracking branch 'UCLmaster/master' into tof_sino
Mar 7, 2018
56fbb65
Merge remote-tracking branch 'Nikos_HSTIR/tof_sino_UCL' into tof_sino
Mar 7, 2018
c2f2fb2
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth May 30, 2018
5dec40a
Merge with upstream/master
NikEfth Oct 12, 2018
69651e5
Corrections of errors from merging
NikEfth Oct 15, 2018
b26607d
Significant speed-up on the application of the kernel
NikEfth Oct 17, 2018
84e963f
Further speed up, by optimisation and cache
NikEfth Oct 17, 2018
711b966
Further optimisation and speed up
NikEfth Oct 17, 2018
34dedf2
Don't pass the symm operations in the apply_tof_kernel()
NikEfth Oct 17, 2018
f983539
Close github issues
NikEfth Oct 18, 2018
c996e12
Reduce test time
NikEfth Oct 18, 2018
81d2f50
Revert kernel caching, ProjDataInfo comparison improvement
NikEfth Oct 20, 2018
460173d
correction of the LOR bin after symmetry
NikEfth Oct 20, 2018
2056815
Revert some changes made in previous commits:
NikEfth Oct 24, 2018
ccb6a24
Bug fixes
NikEfth Nov 11, 2018
15bb3c8
Merge remote-tracking branch 'upstream/master' into tof_sino_UCL
NikEfth Nov 11, 2018
b2778ed
Keep only two set_params and constructors for Scanner
NikEfth Nov 12, 2018
0d58b91
Fix tests and clean up
NikEfth Dec 6, 2018
f9d87a5
fix application of tof mashing
NikEfth Dec 6, 2018
4236a05
remove two control variables.
NikEfth Dec 6, 2018
0d0db6f
Reduce the scanner in test_ArcCorrection
NikEfth Dec 6, 2018
728699d
Reduced scanner in DataSymmetriesForBins_PET_CartesianGridTests
NikEfth Dec 6, 2018
2a6d383
comments1
NikEfth Jan 29, 2019
4f1dad8
Merge remote-tracking branch 'upstream/master' into tof_review
NikEfth Feb 8, 2019
3dae02c
Application of comments
NikEfth Feb 8, 2019
0d8d318
Merge pull request #8 from NikEfth/tof_review
NikEfth Feb 8, 2019
f29e92a
Somehow the option to disable HDF5 got disappeared.
NikEfth Feb 13, 2019
442eaf3
Corrections: all recon_test_pack should pass
NikEfth Mar 3, 2019
63d3848
Fix run_test_simulate_and_recon_with_motion
NikEfth Mar 3, 2019
8e059c1
Fix double free error in SPECT reconstruction
NikEfth Mar 3, 2019
b4651a6
Minor fixes to make Codacy happy(-ier).
NikEfth Mar 3, 2019
929e01f
Modification for Codacy
NikEfth Mar 4, 2019
ad90682
AppVeyor failed test_proj_dat_in_memory, prob. due to memory limitations
NikEfth Mar 5, 2019
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
ea5d0b9
add .clang-format, precommit hooks and minimal doc
KrisThielemans Oct 22, 2020
4bda591
remove use of sudo for pip instructions
KrisThielemans Oct 22, 2020
713759f
reduced keys .clang-format [ci skip]
KrisThielemans Oct 22, 2020
661a14d
fix pre-commit
casperdcl Oct 22, 2020
f07b9c3
add CI test
casperdcl Oct 22, 2020
3d41bcd
use pre-commit action
casperdcl Oct 22, 2020
3a83d34
add pre-commit on PR
casperdcl Oct 22, 2020
4ec1ce5
CI: rename Test/Lint => Check/pre-commit
casperdcl Oct 22, 2020
d406f45
use explicit commit for clang-format
ashgillman May 26, 2021
42416cf
run clang-format
web-flow May 26, 2021
59ab3ea
ENH: Add Vision defintion
ashgillman Aug 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
Language : Cpp
# BasedOnStyle : GNU
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakTemplateDeclarations: true
BraceWrapping:
SplitEmptyFunction: false
ColumnLimit: 130
IndentPPDirectives: AfterHash
PointerAlignment: Left
SortIncludes: false
SortUsingDeclarations: false
SpaceBeforeParens: ControlStatements
Standard: Cpp11
...
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# currently empty attributes (using pre-commit)
[attr]cppfiles
[attr]cfiles
[attr]pyfiles
*.cpp cppfiles
*.cxx cppfiles
*.h cppfiles
*.inl cppfiles
*.txx cppfiles
*.c cfiles
*.py pyfiles
*.v -text -diff
*.s -text -diff
*.scn -text -diff
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check
on:
- push
- pull_request
jobs:
check:
runs-on: ubuntu-latest
name: pre-commit
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: sudo apt-get install -yqq clang-format
- uses: pre-commit/action@v2.0.0
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ install_manifest.txt
# other stuff
.cache
*.idea
*.user
*.user

build
out
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: git://github.com/doublify/pre-commit-clang-format
rev: 62302476d0da01515660132d76902359bed0f782
hooks:
- id: clang-format
files: \.(c|cc|cxx|cpp|h|hpp|hxx|inl|txx)$
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,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
9,206 changes: 9,206 additions & 0 deletions CMakeLists.txt.user.4.10-pre1

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions documentation/devel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Information specific for developers

Please check files here for information/code practices for developers.

- Do read our [contribution guidelines](../../CONTRIBUTING.md)
- Set your editor settings appropriately: [instructions](editor-settings.md)
- Install git hooks for serious development: [instructions](git-hooks.md)
- Read the documentation, including the STIR developers guide
5 changes: 5 additions & 0 deletions documentation/devel/editor-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Developer documentation: editor settings

White-spaces and indentation with multiple developers are a pain. Please adhere to
our white-space policy, which we try to enforce via [clang-format](https://clang.llvm.org/docs/ClangFormat.html).
Check that site for integration with your editor/IDE.
28 changes: 28 additions & 0 deletions documentation/devel/git-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Developer documentation: how to install (software for) git hooks

You first need to have Python and pip

## Install [pre-commit](https://pre-commit.com)
See https://pre-commit.com/#install but the following might work.

pip install pre-commit

If this fails with a permission error, try adding `--user` to the command.

If that fails with a message about `PyYAML` and `distutils`, try

pip install --ignore-installed PyYAML

## Install clang-format
### debian/Ubuntu
sudo apt install clang-format
### MacOS
brew install clang-format
### Others
search the internet and tell us

## Enable pre-commit hooks
```sh
cd /whereever/STIR
pre-commit install
```
59 changes: 23 additions & 36 deletions examples/C++/General_Reconstruction/General_Reconstruction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,40 @@
#include <iostream>
START_NAMESPACE_STIR

General_Reconstruction::
General_Reconstruction()
{
this->set_defaults();
}
General_Reconstruction::General_Reconstruction() { this->set_defaults(); }

void
General_Reconstruction::set_defaults()
{

}
General_Reconstruction::set_defaults() {}

void
General_Reconstruction::initialise_keymap()
{
this->parser.add_start_key("General reconstruction");
this->parser.add_stop_key("End General reconstruction");
General_Reconstruction::initialise_keymap() {
this->parser.add_start_key("General reconstruction");
this->parser.add_stop_key("End General reconstruction");

this->parser.add_parsing_key("reconstruction method", &this->reconstruction_method_sptr);
this->parser.add_parsing_key("reconstruction method", &this->reconstruction_method_sptr);
}

bool
General_Reconstruction::post_processing()
{
return false;
General_Reconstruction::post_processing() {
return false;
}

Succeeded
General_Reconstruction::process_data()
{
HighResWallClockTimer t;
t.reset();
t.start();

//return reconstruction_object.reconstruct() == Succeeded::yes ?
// EXIT_SUCCESS : EXIT_FAILURE;
if (reconstruction_method_sptr->reconstruct() == Succeeded::yes)
{
t.stop();
std::cout << "Total Wall clock time: " << t.value() << " seconds" << std::endl;
return Succeeded::yes;
}
else
{
t.stop();
return Succeeded::no;
}
General_Reconstruction::process_data() {
HighResWallClockTimer t;
t.reset();
t.start();

// return reconstruction_object.reconstruct() == Succeeded::yes ?
// EXIT_SUCCESS : EXIT_FAILURE;
if (reconstruction_method_sptr->reconstruct() == Succeeded::yes) {
t.stop();
std::cout << "Total Wall clock time: " << t.value() << " seconds" << std::endl;
return Succeeded::yes;
} else {
t.stop();
return Succeeded::no;
}
}

END_NAMESPACE_STIR
27 changes: 11 additions & 16 deletions examples/C++/General_Reconstruction/General_Reconstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,26 @@
#include "stir/CartesianCoordinate3D.h"
#include "Reconstruction.h"


START_NAMESPACE_STIR

class Succeeded;

class General_Reconstruction : public ParsingObject
{
class General_Reconstruction : public ParsingObject {
public:
//!
//! \brief General_Reconstuction
//! \details Default constructor
General_Reconstruction();
//!
//! \brief General_Reconstuction
//! \details Default constructor
General_Reconstruction();

virtual Succeeded process_data();
protected:
virtual Succeeded process_data();

void set_defaults();
void initialise_keymap();
bool post_processing();
protected:
void set_defaults();
void initialise_keymap();
bool post_processing();

private:

shared_ptr < Reconstruction < DiscretisedDensity < 3, float > > >
reconstruction_method_sptr;

shared_ptr<Reconstruction<DiscretisedDensity<3, float>>> reconstruction_method_sptr;
};

END_NAMESPACE_STIR
Expand Down
35 changes: 15 additions & 20 deletions examples/C++/src/demo1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
\brief A simple program that backprojects some projection data.

It illustrates
- basic interaction with the user,
- reading of images and projection data
- construction of a specified type of back-projector,
- how to use back-project all projection data
- output of images
- basic interaction with the user,
- reading of images and projection data
- construction of a specified type of back-projector,
- how to use back-project all projection data
- output of images

See README.txt in the directory where this file is located.

\author Kris Thielemans
\author Kris Thielemans
*/
/*
Copyright (C) 2004- 2011, Hammersmith Imanet Ltd

This software is distributed under the terms
This software is distributed under the terms
of the GNU General Public Licence (GPL)
See STIR/LICENSE.txt for details
*/
Expand All @@ -33,25 +33,20 @@
#include "stir/utilities.h"
#include "stir/Succeeded.h"

int main()
{
int
main() {
using namespace stir;

/////////////// input sinogram
const std::string input_filename =
ask_filename_with_extension("Input file",".hs");
const std::string input_filename = ask_filename_with_extension("Input file", ".hs");

shared_ptr<ProjData>
proj_data_sptr(ProjData::read_from_file(input_filename));
shared_ptr<ProjDataInfo>
proj_data_info_sptr(proj_data_sptr->get_proj_data_info_sptr()->clone());
shared_ptr<ProjData> proj_data_sptr(ProjData::read_from_file(input_filename));
shared_ptr<ProjDataInfo> proj_data_info_sptr(proj_data_sptr->get_proj_data_info_sptr()->clone());

/////////////// template image (for sizes etc)
const std::string template_filename =
ask_filename_with_extension("Template image file",".hv");
const std::string template_filename = ask_filename_with_extension("Template image file", ".hv");

shared_ptr<DiscretisedDensity<3,float> >
density_sptr(read_from_file<DiscretisedDensity<3,float> >(template_filename));
shared_ptr<DiscretisedDensity<3, float>> density_sptr(read_from_file<DiscretisedDensity<3, float>>(template_filename));

density_sptr->fill(0);

Expand Down
40 changes: 17 additions & 23 deletions examples/C++/src/demo2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
\file
\ingroup examples
\brief A small modification of demo1.cxx to ask the user for the
back projector she wants to use.
back projector she wants to use.

It illustrates
- how to ask the user for objects for which different types
exist (e.g. back-projector, forward-projectors, image processors
etc), anything based on the RegisteredObject hierarchy.
- that STIR is able to select basic processing units at run-time
- how to use the (very) basic display facilities in STIR
- how to ask the user for objects for which different types
exist (e.g. back-projector, forward-projectors, image processors
etc), anything based on the RegisteredObject hierarchy.
- that STIR is able to select basic processing units at run-time
- how to use the (very) basic display facilities in STIR

See README.txt in the directory where this file is located.

\author Kris Thielemans
\author Kris Thielemans
*/
/*
Copyright (C) 2004- 2012, Hammersmith Imanet Ltd

This software is distributed under the terms
This software is distributed under the terms
of the GNU General Public Licence (GPL)
See STIR/LICENSE.txt for details
*/
Expand All @@ -34,31 +34,25 @@
#include "stir/Succeeded.h"
#include "stir/display.h"

int main()
{
int
main() {
using namespace stir;

/////////////// input sinogram
const std::string input_filename =
ask_filename_with_extension("Input file",".hs");
const std::string input_filename = ask_filename_with_extension("Input file", ".hs");

shared_ptr<ProjData>
proj_data_sptr(ProjData::read_from_file(input_filename));
shared_ptr<ProjDataInfo>
proj_data_info_sptr(proj_data_sptr->get_proj_data_info_sptr()->clone());
shared_ptr<ProjData> proj_data_sptr(ProjData::read_from_file(input_filename));
shared_ptr<ProjDataInfo> proj_data_info_sptr(proj_data_sptr->get_proj_data_info_sptr()->clone());

/////////////// template image (for sizes etc)
const std::string template_filename =
ask_filename_with_extension("Template image file",".hv");
const std::string template_filename = ask_filename_with_extension("Template image file", ".hv");

shared_ptr<DiscretisedDensity<3,float> >
density_sptr(read_from_file<DiscretisedDensity<3,float> >(template_filename));
shared_ptr<DiscretisedDensity<3, float>> density_sptr(read_from_file<DiscretisedDensity<3, float>>(template_filename));

density_sptr->fill(0);

/////////////// back project
shared_ptr<BackProjectorByBin> back_projector_sptr
(BackProjectorByBin::ask_type_and_parameters());
shared_ptr<BackProjectorByBin> back_projector_sptr(BackProjectorByBin::ask_type_and_parameters());

back_projector_sptr->set_up(proj_data_info_sptr, density_sptr);

Expand Down
Loading