STIR  6.2.0
TimeGateDefinitions.h
Go to the documentation of this file.
1 //
2 /*
3  Copyright (C) 2000- 2008, Hammersmith Imanet Ltd
4  Copyright (C) 2009 - 2013, King's College London
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10  */
22 #ifndef __stir_TimeGateDefinitions_H__
23 #define __stir_TimeGateDefinitions_H__
24 
25 #include "stir/common.h"
26 #include <string>
27 #include <vector>
28 #include <utility>
29 
30 START_NAMESPACE_STIR
43 {
44 public:
47  TimeGateDefinitions(const std::vector<unsigned int>& gate_num_vector, const std::vector<double>& duration_vector);
48  TimeGateDefinitions(const std::vector<std::pair<unsigned int, double>>& gate_sequence);
49  explicit TimeGateDefinitions(const std::string& gdef_filename);
50 
52 
64  void read_gdef_file(const std::string& gdef_filename);
65 
67 
68  double get_gate_duration(unsigned int num) const;
69  unsigned int get_gate_num(unsigned int num) const;
70 
72 
74  unsigned int get_num_gates() const;
76  unsigned int get_num_time_gates() const;
77 
78 private:
80  std::vector<std::pair<unsigned int, double>> _gate_sequence;
81 };
82 
83 END_NAMESPACE_STIR
84 #endif
Class used for storing time gate durations.
Definition: TimeGateDefinitions.h:42
basic configuration include file