STIR  6.2.0
ChainedBinNormalisation.h
Go to the documentation of this file.
1 //
2 //
11 /*
12  Copyright (C) 2003- 2005, Hammersmith Imanet Ltd
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_ChainedBinNormalisation_H__
21 #define __stir_recon_buildblock_ChainedBinNormalisation_H__
22 
25 
26 START_NAMESPACE_STIR
27 
70 class ChainedBinNormalisation : public RegisteredParsingObject<ChainedBinNormalisation, BinNormalisation>
71 {
72 private:
74 
75 public:
77  static const char* const registered_name;
78 
80 
86 
87  ChainedBinNormalisation(shared_ptr<BinNormalisation> const& apply_first, shared_ptr<BinNormalisation> const& apply_second);
88 
90 
91  Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
92 
93  // import all apply/undo methods from base-class (we'll override some below)
94  using base_type::apply;
95  using base_type::undo;
96 
98 
101  void apply(RelatedViewgrams<float>& viewgrams) const override;
102 #if 0
103  virtual void apply(ProjData&) const override;
104 #endif
105 
106  virtual void apply_only_first(RelatedViewgrams<float>& viewgrams) const;
107 
108  virtual void apply_only_first(ProjData&) const;
109 
110  virtual void apply_only_second(RelatedViewgrams<float>& viewgrams) const;
111 
112  virtual void apply_only_second(ProjData&) const;
113 
115 
118  void undo(RelatedViewgrams<float>& viewgrams) const override;
119 #if 0
120  virtual void undo(ProjData&) const override;
121 #endif
122 
123  virtual void undo_only_first(RelatedViewgrams<float>& viewgrams) const;
124 
125  virtual void undo_only_first(ProjData&) const;
126 
127  virtual void undo_only_second(RelatedViewgrams<float>& viewgrams) const;
128 
129  virtual void undo_only_second(ProjData&) const;
130 
131  float get_bin_efficiency(const Bin& bin) const override;
132 
135  virtual bool is_first_trivial() const;
138  virtual bool is_second_trivial() const;
139 
141 
144  virtual bool is_TOF_only_norm() const override;
145 
146  virtual shared_ptr<BinNormalisation> get_first_norm() const;
147 
148  virtual shared_ptr<BinNormalisation> get_second_norm() const;
149 
150 private:
151  shared_ptr<BinNormalisation> apply_first;
152  shared_ptr<BinNormalisation> apply_second;
153  // parsing stuff
154  void set_defaults() override;
155  void initialise_keymap() override;
156  bool post_processing() override;
157 };
158 
159 END_NAMESPACE_STIR
160 
161 #endif
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition: ChainedBinNormalisation.h:77
Declaration of class stir::BinNormalisation.
Abstract base class for implementing bin-wise normalisation of data.
Definition: BinNormalisation.h:51
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
A BinNormalisation class that simply multiplies the factors given by 2 BinNormalisation objects...
Definition: ChainedBinNormalisation.h:70
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
The (abstract) base class for the projection data.
Definition: ProjData.h:103