STIR 6.4.0
BinNormalisationFromGEHDF5.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2000-2007, Hammersmith Imanet Ltd
3 Copyright (C) 2013-2014, 2020 University College London
4 Copyright (C) 2017-2019 University of Leeds
5
6 Largely a copy of the ECAT7 version.
7
8 SPDX-License-Identifier: Apache-2.0
9
10 See STIR/LICENSE.txt for details
11*/
21
22#ifndef __stir_recon_buildblock_BinNormalisationFromGEHDF5_H__
23#define __stir_recon_buildblock_BinNormalisationFromGEHDF5_H__
24
28#include "stir/ProjData.h"
29#include "stir/shared_ptr.h"
32#include "stir/Scanner.h"
33#include "stir/Array.h"
34#include <string>
35
36using std::string;
37
38START_NAMESPACE_STIR
39
40class ProjDataInMemory;
41
42namespace GE
43{
44namespace RDF_HDF5
45{
46
47class GEHDF5Wrapper;
48
75 : public RegisteredParsingObject<BinNormalisationFromGEHDF5, BinNormalisation, BinNormalisationWithCalibration>
76{
77private:
78 using base_type = BinNormalisationWithCalibration;
79
80public:
82 static const char* const registered_name;
83
85
91
93 BinNormalisationFromGEHDF5(const string& filename);
94
95 Succeeded set_up(const shared_ptr<const ExamInfo>& exam_info_sptr, const shared_ptr<const ProjDataInfo>&) override;
96 float get_uncalibrated_bin_efficiency(const Bin& bin) const override;
97
98 bool use_detector_efficiencies() const;
99 bool use_dead_time() const;
100 bool use_geometric_factors() const;
101 bool use_crystal_interference_factors() const;
102
103private:
104 Array<1, float> axial_t1_array;
105 Array<1, float> axial_t2_array;
106 Array<1, float> trans_t1_array;
107 shared_ptr<SinglesRates> singles_rates_ptr;
108 Array<2, float> efficiency_factors;
109 shared_ptr<ProjDataInMemory> geo_eff_factors_sptr;
110 shared_ptr<Scanner> scanner_ptr;
111 int num_transaxial_crystals_per_block;
112 // TODO move to Scanner
113 int num_axial_blocks_per_singles_unit;
114 shared_ptr<const ProjDataInfo> proj_data_info_ptr;
115 ProjDataInfoCylindricalNoArcCorr const* proj_data_info_cyl_ptr;
116 shared_ptr<const ProjDataInfoCylindricalNoArcCorr> proj_data_info_cyl_uncompressed_ptr;
117 int span;
118 int mash;
119 int num_blocks_per_singles_unit;
120
121 bool _use_detector_efficiencies;
122 bool _use_dead_time;
123 bool _use_geometric_factors;
124
125 void read_norm_data(const string& filename);
126 float get_dead_time_efficiency(const DetectionPositionPair<>& detection_position_pair,
127 const double start_time,
128 const double end_time) const;
129
130 float get_geometric_efficiency_factors(const DetectionPositionPair<>& detection_position_pair) const;
131 float get_efficiency_factors(const DetectionPositionPair<>& detection_position_pair) const;
132 // parsing stuff
133 void set_defaults() override;
134 void initialise_keymap() override;
135 bool post_processing() override;
136
137 string normalisation_GEHDF5_filename;
138 shared_ptr<GEHDF5Wrapper> m_input_hdf5_sptr;
139};
140
141} // namespace RDF_HDF5
142} // namespace GE
143END_NAMESPACE_STIR
144
145#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 2 coordinates-sets of a detection, together with a timing-position index (for TOF...
Definition DetectionPositionPair.h:41
BinNormalisationFromGEHDF5()
Default constructor.
Definition BinNormalisationFromGEHDF5.cxx:219
static const char *const registered_name
Name which will be used when parsing a BinNormalisation object.
Definition BinNormalisationFromGEHDF5.h:82
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 BinNormalisationFromGEHDF5.cxx:230
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
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...