STIR 6.4.0
BinNormalisationFromECAT7.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
5 This file is part of STIR.
6
7 SPDX-License-Identifier: Apache-2.0
8
9 See STIR/LICENSE.txt for details
10*/
19
20#ifndef __stir_recon_buildblock_BinNormalisationFromECAT7_H__
21#define __stir_recon_buildblock_BinNormalisationFromECAT7_H__
22
26#include "stir/ProjData.h"
27#include "stir/shared_ptr.h"
30#include "stir/Scanner.h"
31#include "stir/IO/stir_ecat7.h"
32#include "stir/Array.h"
33#include <string>
34
35#ifndef HAVE_LLN_MATRIX
36# error This file can only be compiled when HAVE_LLN_MATRIX is #defined
37#endif
38
39START_NAMESPACE_STIR
40START_NAMESPACE_ECAT
41START_NAMESPACE_ECAT7
42
76 : public RegisteredParsingObject<BinNormalisationFromECAT7, BinNormalisation, BinNormalisationWithCalibration>
77{
78private:
79 using base_type = BinNormalisationWithCalibration;
80
81public:
83 static const char* const registered_name;
84
86
92
94 BinNormalisationFromECAT7(const std::string& filename);
95
96 virtual Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
97 float get_uncalibrated_bin_efficiency(const Bin& bin) const override;
98
99 bool use_detector_efficiencies() const;
100 bool use_dead_time() const;
101 bool use_geometric_factors() const;
102 bool use_crystal_interference_factors() const;
103
104private:
105 Array<1, float> axial_t1_array;
106 Array<1, float> axial_t2_array;
107 Array<1, float> trans_t1_array;
108 shared_ptr<SinglesRates> singles_rates_ptr;
109 Array<2, float> geometric_factors;
110 Array<2, float> efficiency_factors;
111 Array<2, float> crystal_interference_factors;
112 shared_ptr<Scanner> scanner_ptr;
113 int num_transaxial_crystals_per_block;
114 // TODO move to Scanner
115 int num_axial_blocks_per_singles_unit;
116 shared_ptr<const ProjDataInfo> proj_data_info_ptr;
117 ProjDataInfoCylindricalNoArcCorr const* proj_data_info_cyl_ptr;
118 shared_ptr<const ProjDataInfoCylindricalNoArcCorr> proj_data_info_cyl_uncompressed_ptr;
119 int span;
120 int mash;
121 int num_blocks_per_singles_unit;
122
123 bool _use_detector_efficiencies;
124 bool _use_dead_time;
125 bool _use_geometric_factors;
126 bool _use_crystal_interference_factors;
127
128 void read_norm_data(const std::string& filename);
129 float get_dead_time_efficiency(const DetectionPosition<>& det_pos, const double start_time, const double end_time) const;
130
131 // parsing stuff
132 virtual void set_defaults() override;
133 virtual void initialise_keymap() override;
134 virtual bool post_processing() override;
135
136 std::string normalisation_ECAT7_filename;
137};
138
139END_NAMESPACE_ECAT7
140END_NAMESPACE_ECAT
141END_NAMESPACE_STIR
142
143#endif
defines the stir::Array class for multi-dimensional (numeric) arrays
Declaration of class stir::BinNormalisationWithCalibration.
Declaration of class stir::BinNormalisation.
Declaration of class stir::ProjDataInfoCylindricalNoArcCorr.
Declaration of class stir::ProjData.
Declaration of class stir::RegisteredParsingObject.
Declaration of class stir::Scanner.
Declaration of class stir::SinglesRates.
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
A class for storing coordinates of a detection.
Definition DetectionPosition.h:61
Projection data info for data which are not arc-corrected.
Definition ProjDataInfoCylindricalNoArcCorr.h:83
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition BinNormalisationFromECAT7.h:83
BinNormalisationFromECAT7()
Default constructor.
Definition BinNormalisationFromECAT7.cxx:177
virtual Succeeded set_up(const shared_ptr< const ExamInfo > &exam_info_sptr, const shared_ptr< const ProjDataInfo > &) override
initialises the object and checks if it can handle such projection data
Definition BinNormalisationFromECAT7.cxx:188
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...
Declaration of routines which convert CTI things into our building blocks and vice versa.