STIR  6.2.0
LmToProjDataWithRandomRejection.h
Go to the documentation of this file.
1 //
2 //
13 /*
14  Copyright (C) 2003- 2012, Hammersmith Imanet Ltd
15  Copyright (C) 2019, National Physical Laboratory
16  Copyright (C) 2019, 2021, University College London
17  This file is part of STIR.
18 
19  SPDX-License-Identifier: Apache-2.0
20 
21  See STIR/LICENSE.txt for details
22 */
23 
24 #ifndef __stir_listmode_LmToProjDataWithRandomRejection_H__
25 #define __stir_listmode_LmToProjDataWithRandomRejection_H__
26 
28 #include <boost/random/uniform_01.hpp>
29 #include <boost/random/mersenne_twister.hpp>
30 
31 START_NAMESPACE_STIR
32 
68 template <typename LmToProjDataT>
69 class LmToProjDataWithRandomRejection : public LmToProjDataT
70 {
71 
72 public:
74  LmToProjDataWithRandomRejection(const char* const par_filename);
76 
77  LmToProjDataWithRandomRejection(const char* const par_filename, const unsigned int seed);
78 
79  // void set_seed(const unsigned int seed);
80  float set_reject_if_above(const float);
81 
82  Succeeded set_up() override;
83 
84 protected:
86 
87  void start_new_time_frame(const unsigned int new_frame_num) override;
88 
89  void get_bin_from_event(Bin& bin, const ListEvent&) const override;
90 
91  // \name parsing variables
93 
95  unsigned int seed;
96  float reject_if_above;
98 
99 private:
100  typedef LmToProjDataT base_type;
101  typedef boost::mt19937 random_generator_type;
102  random_generator_type random_generator;
103 
104  void set_defaults() override;
105  void initialise_keymap() override;
106  bool post_processing() override;
107 };
108 
109 END_NAMESPACE_STIR
110 
111 #endif
Declaration of the stir::LmToProjData class which is used to bin listmode data to (3d) sinograms...
unsigned int seed
used to seed the pseudo-random number generator
Definition: LmToProjDataWithRandomRejection.h:95
Class for storing and using gamma events from a list mode file.
Definition: ListEvent.h:45
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
Class for binning list mode data into projection data using the bootstrap procedure.
Definition: LmToProjDataWithRandomRejection.h:69
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43