STIR  6.2.0
BinNormalisation.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000- 2011, Hammersmith Imanet Ltd
5  Copyright (C) 2014, 2021, 2024, University College London
6  This file is part of STIR.
7 
8  SPDX-License-Identifier: Apache-2.0
9 
10  See STIR/LICENSE.txt for details
11 */
21 #ifndef __stir_recon_buildblock_BinNormalisation_H__
22 #define __stir_recon_buildblock_BinNormalisation_H__
23 
24 #include "stir/RegisteredObject.h"
25 #include "stir/Bin.h"
26 #include "stir/shared_ptr.h"
27 #include "stir/deprecated.h"
28 
29 START_NAMESPACE_STIR
30 
31 template <typename elemT>
32 class RelatedViewgrams;
33 class Succeeded;
34 class ProjDataInfo;
35 class ProjData;
36 class DataSymmetriesForViewSegmentNumbers;
37 class ExamInfo;
51 class BinNormalisation : public RegisteredObject<BinNormalisation>
52 {
53 public:
55 
56  ~BinNormalisation() override;
58  void set_defaults() override;
59  virtual float get_calibration_factor() const { return -1; }
60 
62 
66  virtual inline bool is_trivial() const { return false; }
67 
69 
74  virtual inline bool is_TOF_only_norm() const { return false; }
75 
77 
78  virtual Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&);
79 
81 
86  virtual float get_bin_efficiency(const Bin& bin) const = 0;
87 
89 
97  virtual void apply(RelatedViewgrams<float>&) const;
98 
100 
108  virtual void undo(RelatedViewgrams<float>&) const;
109 
111 
120  void apply(ProjData&,
121  shared_ptr<DataSymmetriesForViewSegmentNumbers> = shared_ptr<DataSymmetriesForViewSegmentNumbers>()) const;
122 
124 
134  void undo(ProjData&, shared_ptr<DataSymmetriesForViewSegmentNumbers> = shared_ptr<DataSymmetriesForViewSegmentNumbers>()) const;
135 
136  void set_exam_info_sptr(const shared_ptr<const ExamInfo> _exam_info_sptr);
137 
138  shared_ptr<const ExamInfo> get_exam_info_sptr() const;
139 
140 protected:
142 
146  virtual void check(const ProjDataInfo& proj_data_info) const;
147 
148  virtual void check(const ExamInfo& exam_info) const;
149  bool _already_set_up;
150  shared_ptr<const ProjDataInfo> proj_data_info_sptr;
151 
152 private:
153  shared_ptr<const ExamInfo> exam_info_sptr;
154 };
155 
156 END_NAMESPACE_STIR
157 
158 #endif
This file declares a deprecation macro.
virtual bool is_trivial() const
check if we would be multiplying with 1 (i.e. do nothing)
Definition: BinNormalisation.h:66
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Abstract base class for implementing bin-wise normalisation of data.
Definition: BinNormalisation.h:51
Declaration of class stiir::RegisteredObject.
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
Declaration of class stir::Bin.
virtual bool is_TOF_only_norm() const
returns if the object can only handle TOF data
Definition: BinNormalisation.h:74
Helper class to provide registry mechanisms to a Base classSuppose you have a hierarchy of classes wi...
Definition: RegisteredObject.h:95
a class for storing information about 1 exam (or scan)
Definition: ExamInfo.h:41
An (abstract base) class that contains information on the projection data.
Definition: ProjDataInfo.h:69
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
The (abstract) base class for the projection data.
Definition: ProjData.h:103