STIR 6.4.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
30START_NAMESPACE_STIR
31
47class BinNormalisationFromProjData : public RegisteredParsingObject<BinNormalisationFromProjData, BinNormalisation>
48{
49private:
50 using base_type = BinNormalisation;
51
52public:
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
106
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
113private:
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
122END_NAMESPACE_STIR
123
124#endif
Declaration of class stir::BinNormalisation.
Declaration of class stir::ProjData.
Declaration of class stir::RegisteredParsingObject.
float get_bin_efficiency(const Bin &bin) const override
Return the 'efficiency' factor for a single bin.
Definition BinNormalisationFromProjData.cxx:153
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition BinNormalisationFromProjData.h:54
bool is_trivial() const override
check if we could be multiplying with 1 (i.e. do nothing)
Definition BinNormalisationFromProjData.cxx:125
virtual bool is_TOF_only_norm() const override
returns if the object can only handle TOF data
Definition BinNormalisationFromProjData.cxx:74
void undo(RelatedViewgrams< float > &viewgrams) const override
Undo the normalisation of some data.
Definition BinNormalisationFromProjData.cxx:142
virtual shared_ptr< ProjData > get_norm_proj_data_sptr() const
Get a shared_ptr to the normalisation proj_data.
Definition BinNormalisationFromProjData.cxx:161
BinNormalisationFromProjData()
Default constructor.
Definition BinNormalisationFromProjData.cxx:60
Succeeded set_up(const shared_ptr< const ExamInfo > &exam_info_sptr, const shared_ptr< const ProjDataInfo > &) override
Checks if we can handle certain projection data.
Definition BinNormalisationFromProjData.cxx:82
void apply(RelatedViewgrams< float > &viewgrams) const override
Normalise some data.
Definition BinNormalisationFromProjData.cxx:131
Abstract base class for implementing bin-wise normalisation of data.
Definition BinNormalisation.h:52
virtual void undo(RelatedViewgrams< float > &) const
undo the normalisation of some data
Definition BinNormalisation.cxx:108
virtual void apply(RelatedViewgrams< float > &) const
normalise some data
Definition BinNormalisation.cxx:92
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
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...