STIR  6.2.0
BinNormalisationFromProjData.h
Go to the documentation of this file.
1 //
2 //
11 /*
12  Copyright (C) 2000- 2011, Hammersmith Imanet Ltd
13  Copyright (C) 2023, University College London
14  This file is part of STIR.
15 
16  SPDX-License-Identifier: Apache-2.0
17 
18  See STIR/LICENSE.txt for details
19 */
20 
21 #ifndef __stir_recon_buildblock_BinNormalisationFromProjData_H__
22 #define __stir_recon_buildblock_BinNormalisationFromProjData_H__
23 
26 #include "stir/ProjData.h"
27 #include "stir/shared_ptr.h"
28 #include <string>
29 
30 START_NAMESPACE_STIR
31 
47 class BinNormalisationFromProjData : public RegisteredParsingObject<BinNormalisationFromProjData, BinNormalisation>
48 {
49 private:
51 
52 public:
54  static const char* const registered_name;
55 
57 
63 
65  BinNormalisationFromProjData(const std::string& filename);
66 
68 
69  BinNormalisationFromProjData(const shared_ptr<ProjData>& norm_proj_data_ptr);
70 
72 
77  bool is_trivial() const override;
78 
80 
83  virtual bool is_TOF_only_norm() const override;
84 
86 
88  Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
89 
90  // import all apply/undo methods from base-class (we'll override some below)
91  using base_type::apply;
92  using base_type::undo;
93 
95 
99  void apply(RelatedViewgrams<float>& viewgrams) const override;
100 
102 
107  void undo(RelatedViewgrams<float>& viewgrams) const override;
108  float get_bin_efficiency(const Bin& bin) const override;
109 
111  virtual shared_ptr<ProjData> get_norm_proj_data_sptr() const;
112 
113 private:
114  shared_ptr<ProjData> norm_proj_data_ptr;
115  void set_defaults() override;
116  void initialise_keymap() override;
117  bool post_processing() override;
118 
119  std::string normalisation_projdata_filename;
120 };
121 
122 END_NAMESPACE_STIR
123 
124 #endif
A BinNormalisation class that gets the normalisation factors from a ProjData object.
Definition: BinNormalisationFromProjData.h:47
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Declaration of class stir::ProjData.
Declaration of class stir::BinNormalisation.
Abstract base class for implementing bin-wise normalisation of data.
Definition: BinNormalisation.h:51
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition: BinNormalisationFromProjData.h:54
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 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.