STIR  6.2.0
BinNormalisationFromAttenuationImage.h
Go to the documentation of this file.
1 //
2 //
11 /*
12  Copyright (C) 2003- 2011, 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_BinNormalisationFromAttenuationImage_H__
21 #define __stir_recon_buildblock_BinNormalisationFromAttenuationImage_H__
22 
26 #include "stir/shared_ptr.h"
28 #include <string>
29 
30 START_NAMESPACE_STIR
31 
57  : public RegisteredParsingObject<BinNormalisationFromAttenuationImage, BinNormalisation>
58 {
59 private:
61 
62 public:
64  static const char* const registered_name;
65 
67 
73 
75 
76  BinNormalisationFromAttenuationImage(const std::string& filename,
77  shared_ptr<ForwardProjectorByBin> const& = shared_ptr<ForwardProjectorByBin>());
78 
80 
83  BinNormalisationFromAttenuationImage(const shared_ptr<const DiscretisedDensity<3, float>>& attenuation_image_ptr,
84  shared_ptr<ForwardProjectorByBin> const& = shared_ptr<ForwardProjectorByBin>());
85 
87 
90  Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
91 
92  // import all apply/undo methods from base-class (we'll override some below)
93  using base_type::apply;
94  using base_type::undo;
95 
97 
101  void apply(RelatedViewgrams<float>& viewgrams) const override;
102 
104 
109  void undo(RelatedViewgrams<float>& viewgrams) const override;
110 
111  float get_bin_efficiency(const Bin& bin) const override;
112 
113 private:
114  shared_ptr<const DiscretisedDensity<3, float>> attenuation_image_ptr;
115  shared_ptr<ForwardProjectorByBin> forward_projector_ptr;
116 
117  // parsing stuff
118  void set_defaults() override;
119  void initialise_keymap() override;
120  bool post_processing() override;
121 
122  std::string attenuation_image_filename;
123 };
124 
125 END_NAMESPACE_STIR
126 
127 #endif
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition: BinNormalisationFromAttenuationImage.h:64
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
A BinNormalisation class that gets attenuation correction factors from an attenuation image...
Definition: BinNormalisationFromAttenuationImage.h:56
defines the stir::DiscretisedDensity class
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
Base class for forward projectors which work on &#39;large&#39; collections of bins: given the whole image...
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.