STIR  6.2.0
ExamInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2021 National Physical Laboratory
3  Copyright (C) 2013, 2018, 2020-2021 University College London
4  This file is part of STIR.
5 
6  SPDX-License-Identifier: Apache-2.0
7 
8  See STIR/LICENSE.txt for details
9 */
19 #ifndef __stir_ExamInfo_H__
20 #define __stir_ExamInfo_H__
21 
22 #include "stir/PatientPosition.h"
24 #include "stir/ImagingModality.h"
25 #include "stir/Radionuclide.h"
26 #include "stir/shared_ptr.h"
27 
28 #include "stir/shared_ptr.h"
29 
30 START_NAMESPACE_STIR
31 
41 class ExamInfo
42 {
43 
44 public:
46 
51  explicit ExamInfo(const ImagingModality modality = ImagingModality::Unknown)
52  : imaging_modality(modality),
53  start_time_in_secs_since_1970(0.),
54  calibration_factor(-1.F),
55  low_energy_thres(-1.F),
56  up_energy_thres(-1.F)
57 
58  {}
59 
60  std::string originating_system;
61 
62  ImagingModality imaging_modality;
63 
64  PatientPosition patient_position;
65 
66  TimeFrameDefinitions time_frame_definitions;
67 
68  Radionuclide radionuclide;
69 
70  // double branching_ratio;
71 
72  const TimeFrameDefinitions& get_time_frame_definitions() const { return time_frame_definitions; }
73  TimeFrameDefinitions& get_time_frame_definitions() { return time_frame_definitions; }
74 
75  double start_time_in_secs_since_1970;
76 
78 
79  inline float get_low_energy_thres() const;
82  inline float get_high_energy_thres() const;
84  inline float get_calibration_factor() const;
86  inline Radionuclide get_radionuclide() const;
88 
90 
91  inline void set_low_energy_thres(float new_val);
94  inline void set_high_energy_thres(float new_val);
95 
97  inline void set_calibration_factor(const float cal_val);
99  inline void set_radionuclide(const Radionuclide& arg);
101  inline void set_energy_information_from(const ExamInfo&);
103 
104  inline bool has_energy_information() const { return (low_energy_thres > 0.f) && (up_energy_thres > 0.f); }
105 
107  inline ExamInfo* clone() const;
109  inline shared_ptr<ExamInfo> create_shared_clone() const;
110 
111  void set_time_frame_definitions(const TimeFrameDefinitions& new_time_frame_definitions)
112  {
113  time_frame_definitions = new_time_frame_definitions;
114  }
115 
117  bool operator==(const ExamInfo& p1) const;
118 
120  shared_ptr<ExamInfo> create_shared_clone() { return shared_ptr<ExamInfo>(new ExamInfo(*this)); }
121 
123 
124  std::string parameter_info() const;
125 
126 protected:
127  float calibration_factor;
128 
129 private:
137  float low_energy_thres;
138 
146  float up_energy_thres;
147 };
148 
149 END_NAMESPACE_STIR
150 
151 #include "stir/ExamInfo.inl"
152 
153 #endif // __stir_ExamInfo_H__
Definition: PatientPosition.h:28
Class used for storing time frame durations.
Definition: TimeFrameDefinitions.h:38
ExamInfo(const ImagingModality modality=ImagingModality::Unknown)
Default constructor.
Definition: ExamInfo.h:51
Declaration of class stir::PatientPosition.
Declaration of class stir::TimeFrameDefinitions.
Declaration of class stir::Radionuclide.
Declaration of class stir::ImagingModality.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
A class for storing radionuclide information.
Definition: Radionuclide.h:33
shared_ptr< ExamInfo > create_shared_clone()
Clone and create shared_ptr of the copy.
Definition: ExamInfo.h:120
This file declares the class stir::ExamInfo.
Class for encoding the modality.
Definition: ImagingModality.h:34
a class for storing information about 1 exam (or scan)
Definition: ExamInfo.h:41