STIR  6.2.0
BinNormalisationFromECAT8.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2000-2007, Hammersmith Imanet Ltd
3  Copyright (C) 2013-2014, 2020, 2023 University College London
4 
5  Largely a copy of the ECAT7 version.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
20 #ifndef __stir_recon_buildblock_BinNormalisationFromECAT8_H__
21 #define __stir_recon_buildblock_BinNormalisationFromECAT8_H__
22 
26 #include "stir/ProjData.h"
27 #include "stir/shared_ptr.h"
29 #include "stir/data/SinglesRates.h"
30 #include "stir/Scanner.h"
31 #include "stir/Array.h"
33 #include <string>
34 
35 using std::string;
36 
37 START_NAMESPACE_STIR
38 START_NAMESPACE_ECAT
39 
88  : public RegisteredParsingObject<BinNormalisationFromECAT8, BinNormalisation, BinNormalisationWithCalibration>
89 {
90 private:
92 
93 public:
95  static const char* const registered_name;
96 
98 
104 
106  BinNormalisationFromECAT8(const string& filename);
107 
108  Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
109  float get_uncalibrated_bin_efficiency(const Bin& bin) const override;
110 
111  bool use_detector_efficiencies() const;
112  bool use_dead_time() const;
113  bool use_geometric_factors() const;
114  bool use_crystal_interference_factors() const;
115  bool use_axial_effects_factors() const;
116 
117 private:
118  Array<1, float> axial_t1_array;
119  Array<1, float> axial_t2_array;
120  Array<1, float> trans_t1_array;
121  shared_ptr<SinglesRates> singles_rates_ptr;
122  Array<2, float> geometric_factors;
123  Array<2, float> efficiency_factors;
124  Array<2, float> crystal_interference_factors;
125  Array<1, float> axial_effects;
127  Array<2, int> sino_index;
129  int num_Siemens_sinograms;
130 
131  shared_ptr<Scanner> scanner_ptr;
132  int num_transaxial_crystals_per_block;
133  // TODO move to Scanner
134  int num_axial_blocks_per_singles_unit;
135  shared_ptr<const ProjDataInfo> proj_data_info_ptr;
136  shared_ptr<const ProjDataInfo> norm_proj_data_info_sptr;
137  ProjDataInfoCylindricalNoArcCorr const* proj_data_info_cyl_ptr;
138  shared_ptr<const ProjDataInfoCylindricalNoArcCorr> proj_data_info_cyl_uncompressed_ptr;
139  int mash;
140  int num_blocks_per_singles_unit;
141  float calib_factor, cross_calib_factor;
142 
143  bool _use_gaps;
144  bool _use_detector_efficiencies;
145  bool _use_dead_time;
146  bool _use_geometric_factors;
147  bool _use_crystal_interference_factors;
148  bool _use_axial_effects_factors;
149  bool _write_components_to_file;
150 
151  void read_norm_data(const string& filename);
152  float get_dead_time_efficiency(const DetectionPosition<>& det_pos, const double start_time, const double end_time) const;
153 
155  void construct_sino_lookup_table();
156  float find_axial_effects(int ring1, int ring2) const;
157  // parsing stuff
158  void set_defaults() override;
159  void initialise_keymap() override;
160  bool post_processing() override;
161 
162  string normalisation_ECAT8_filename;
163 };
164 
165 END_NAMESPACE_ECAT
166 END_NAMESPACE_STIR
167 
168 #endif
Declaration of class stir::SinglesRates.
Declaration of class stir::ProjDataInfoCylindricalNoArcCorr.
Definition: BinNormalisationWithCalibration.h:42
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Declaration of class stir::ProjData.
defines the Array class for multi-dimensional (numeric) arrays
Declaration of class stir::BinNormalisation.
Declaration of class stir::Scanner.
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 BinNormalisation class that gets the normalisation factors from an ECAT8 3D normalisation file...
Definition: BinNormalisationFromECAT8.h:87
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition: BinNormalisationFromECAT8.h:95
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Projection data info for data which are not arc-corrected.
Definition: ProjDataInfoCylindricalNoArcCorr.h:82
Declaration of class stir::RegisteredParsingObject.
Declaration of class stir::BinNormalisationWithCalibration.
Declaration of routines which convert ECAT things into our building blocks and vice versa...