STIR  6.2.0
LmToProjDataBootstrap.h
Go to the documentation of this file.
1 //
2 //
13 /*
14  Copyright (C) 2003- 2011, Hammersmith Imanet
15  Copyright (C) 2019, National Physical Laboratory
16  Copyright (C) 2019, University College of 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_LmToProjDataBootstrap_H__
25 #define __stir_listmode_LmToProjDataBootstrap_H__
26 
28 #include <vector>
29 
30 START_NAMESPACE_STIR
31 
67 template <typename LmToProjDataT>
68 class LmToProjDataBootstrap : public LmToProjDataT
69 {
70 
71 public:
73  LmToProjDataBootstrap(const char* const par_filename);
75 
76  LmToProjDataBootstrap(const char* const par_filename, const unsigned int seed);
77 
78  Succeeded set_up() override;
79 
80 protected:
82 
83  void start_new_time_frame(const unsigned int new_frame_num) override;
84 
85  void get_bin_from_event(Bin& bin, const ListEvent&) const override;
86 
87  // \name parsing variables
89 
91  unsigned int seed;
93 
94 private:
95  typedef LmToProjDataT base_type;
96  typedef std::vector<unsigned char> replication_type;
97 
98  replication_type num_times_to_replicate;
99  mutable replication_type::const_iterator num_times_to_replicate_iter;
100  void set_defaults() override;
101  void initialise_keymap() override;
102  bool post_processing() override;
103 };
104 
105 END_NAMESPACE_STIR
106 
107 #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: LmToProjDataBootstrap.h:91
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: LmToProjDataBootstrap.h:68
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43