STIR 6.4.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*/
20
21#ifndef __stir_recon_buildblock_BinNormalisation_H__
22#define __stir_recon_buildblock_BinNormalisation_H__
23
25#include "stir/Bin.h"
26#include "stir/shared_ptr.h"
27#include "stir/deprecated.h"
28
29START_NAMESPACE_STIR
30
31template <typename elemT>
32class RelatedViewgrams;
33class Succeeded;
34class ProjDataInfo;
35class ProjData;
36class DataSymmetriesForViewSegmentNumbers;
37class ExamInfo;
51class BinNormalisation : public RegisteredObject<BinNormalisation>
52{
53public:
54 BinNormalisation();
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
140protected:
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
152private:
153 shared_ptr<const ExamInfo> exam_info_sptr;
154};
155
156END_NAMESPACE_STIR
157
158#endif
Declaration of class stir::Bin.
Declaration of class stiir::RegisteredObject.
virtual bool is_TOF_only_norm() const
returns if the object can only handle TOF data
Definition BinNormalisation.h:74
virtual void check(const ProjDataInfo &proj_data_info) const
check if the argument is the same as what was used for set_up()
Definition BinNormalisation.cxx:70
void set_defaults() override
Definition BinNormalisation.cxx:39
virtual void undo(RelatedViewgrams< float > &) const
undo the normalisation of some data
Definition BinNormalisation.cxx:108
virtual float get_bin_efficiency(const Bin &bin) const =0
Return the 'efficiency' factor for a single bin.
virtual void apply(RelatedViewgrams< float > &) const
normalise some data
Definition BinNormalisation.cxx:92
virtual bool is_trivial() const
check if we would be multiplying with 1 (i.e. do nothing)
Definition BinNormalisation.h:66
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
a class for storing information about 1 exam (or scan)
Definition ExamInfo.h:42
An (abstract base) class that contains information on the projection data.
Definition ProjDataInfo.h:70
The (abstract) base class for the projection data.
Definition ProjData.h:105
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
This file declares a deprecation macro.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...