STIR  6.2.0
RadionuclideDB.h
Go to the documentation of this file.
1 
11 /*
12  Copyright (C) 2021, National Physical Laboratory
13  Copyright (C) 2021, 2022, University College London
14  See STIR/LICENSE.txt for details
15 */
16 
17 #ifndef __stir_RADIONUCLIDEDB_H
18 #define __stir_RADIONUCLIDEDB_H
19 
20 #include "stir/Radionuclide.h"
21 #include "stir/ImagingModality.h"
22 
23 #ifdef nlohmann_json_FOUND
24 # include <nlohmann/json.hpp>
25 #endif
26 
89 START_NAMESPACE_STIR
90 
91 class RadionuclideDB
92 {
93 public:
95 
100  RadionuclideDB();
101 
103 
108  void read_from_file(const std::string& filename);
109 
111 
120  Radionuclide get_radionuclide(ImagingModality rmodality, const std::string& rname);
121 
122 protected:
123 private:
124  std::string database_filename;
125  std::string radionuclide_lookup_table_filename;
126 
127 #ifdef nlohmann_json_FOUND
128  nlohmann::json radionuclide_json;
129 #endif
130 
132 
138  Radionuclide get_radionuclide_from_json(ImagingModality rmodality, const std::string& rname) const;
139 
141 
145  std::string get_radionuclide_name_from_lookup_table(const std::string& rname) const;
146 };
147 
148 END_NAMESPACE_STIR
149 #endif // __stir_RADIONUCLIDEDB_H
Declaration of class stir::Radionuclide.
Declaration of class stir::ImagingModality.
unique_ptr< DataT > read_from_file(const FileSignature &signature, FileT file)
Function that reads data from file using the default InputFileFormatRegistry, using the provided File...
Definition: read_from_file.h:46