STIR 6.4.0
BinNormalisationPETFromComponents.h
Go to the documentation of this file.
1//
2//
11/*
12 Copyright (C) 2022, University College London
13 This file is part of STIR.
14
15 SPDX-License-Identifier: Apache-2.0
16
17 See STIR/LICENSE.txt for details
18*/
19
20#ifndef __stir_recon_buildblock_BinNormalisationPETFromComponents_H__
21#define __stir_recon_buildblock_BinNormalisationPETFromComponents_H__
22
24#include "stir/ML_norm.h"
25#include "stir/ProjData.h"
26#include "stir/shared_ptr.h"
27
28START_NAMESPACE_STIR
29
74class BinNormalisationPETFromComponents : public BinNormalisation
75{
76private:
77 using base_type = BinNormalisation;
78
79public:
80 // need to have this here as it's a pure virtual in BinNormalisation.
81 // it is normally implemented via RegisteredParsingObject, but
82 // we currently do no derive from that.
83 std::string get_registered_name() const override { return this->registered_name; }
84
86
91
93
95 bool is_trivial() const override;
96
98
99 Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
100
101 // import all apply/undo methods from base-class (we'll override some below)
102 using base_type::apply;
103 using base_type::undo;
104
106
109 void apply(RelatedViewgrams<float>& viewgrams) const override;
110
112
115 void undo(RelatedViewgrams<float>& viewgrams) const override;
116
117 float get_bin_efficiency(const Bin& bin) const override;
118
119#if 0
121 virtual shared_ptr<ProjData> get_norm_proj_data_sptr() const;
122#endif
123
125
126 void
127 allocate(shared_ptr<const ProjDataInfo>, bool do_eff, bool do_geo, bool do_block = false, bool do_symmetry_per_block = false);
128
129 DetectorEfficiencies& crystal_efficiencies()
130 {
131 return efficiencies;
132 }
133 GeoData3D& geometric_factors()
134 {
135 return geo_data;
136 }
137 BlockData3D& block_factors()
138 {
139 return block_data;
140 }
141
143
144 void set_defaults() override;
145
146protected:
147 DetectorEfficiencies efficiencies;
148 GeoData3D geo_data;
149 BlockData3D block_data;
150
152
153 bool has_crystal_efficiencies() const;
154 bool has_geometric_factors() const;
155 bool has_block_factors() const;
157
158private:
159 static const char* const registered_name;
160 shared_ptr<ProjDataInMemory> invnorm_proj_data_sptr;
161 bool _already_allocated;
162 bool _is_trivial;
163 void create_proj_data();
164};
165
166END_NAMESPACE_STIR
167
168#endif
Declaration of class stir::BinNormalisation.
Preliminary things for ML normalisation factor estimation.
Declaration of class stir::ProjData.
A BinNormalisation class that uses component-based normalisation for PET.
Definition BinNormalisationPETFromComponents.h:75
BinNormalisationPETFromComponents()
Default constructor.
Definition BinNormalisationPETFromComponents.cxx:46
std::string get_registered_name() const override
Returns the name of the type of the object.
Definition BinNormalisationPETFromComponents.h:83
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
A class for storing viewgrams which are related by symmetry.
Definition RelatedViewgrams.h:41
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...