STIR 6.4.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
31START_NAMESPACE_STIR
32
68template <typename LmToProjDataT>
69class LmToProjDataWithRandomRejection : public LmToProjDataT
70{
71
72public:
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
84protected:
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
99private:
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
109END_NAMESPACE_STIR
110
111#endif
Declaration of the stir::LmToProjData class which is used to bin listmode data to (3d) sinograms.
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
Class for storing and using gamma events from a list mode file.
Definition ListEvent.h:46
void start_new_time_frame(const unsigned int new_frame_num) override
will be called when a new time frame starts
Definition LmToProjDataWithRandomRejection.cxx:128
LmToProjDataWithRandomRejection(const char *const par_filename)
Constructor that parses from a file.
Definition LmToProjDataWithRandomRejection.cxx:54
unsigned int seed
used to seed the pseudo-random number generator
Definition LmToProjDataWithRandomRejection.h:95
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44