STIR  6.2.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 */
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"
29 #include "stir/data/SinglesRates.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 
39 START_NAMESPACE_STIR
40 START_NAMESPACE_ECAT
41 START_NAMESPACE_ECAT7
42 
76  : public RegisteredParsingObject<BinNormalisationFromECAT7, BinNormalisation, BinNormalisationWithCalibration>
77 {
78 private:
80 
81 public:
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 
104 private:
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 
139 END_NAMESPACE_ECAT7
140 END_NAMESPACE_ECAT
141 END_NAMESPACE_STIR
142 
143 #endif
Declaration of class stir::SinglesRates.
A BinNormalisation class that gets the normalisation factors from an ECAT7 3D normalisation file...
Definition: BinNormalisationFromECAT7.h:75
Declaration of routines which convert CTI things into our building blocks and vice versa...
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.
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition: BinNormalisationFromECAT7.h:83
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 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.