STIR  6.2.0
CListRecordLMF.h
Go to the documentation of this file.
1 //
2 //
11 /*
12  Copyright (C) 2003- 2011, Hammersmith Imanet Ltd
13 
14  SPDX-License-Identifier: Apache-2.0
15 */
16 
17 #ifndef __stir_listmode_CListRecordLMF_H__
18 #define __stir_listmode_CListRecordLMF_H__
19 
23 #include "stir/Succeeded.h"
24 
25 START_NAMESPACE_STIR
26 
27 class CListModeDataLMF;
28 
30 
33 {
34 public:
35  inline bool is_prompt() const { return true; } // TODO
36  inline Succeeded set_prompt(const bool prompt = true) // TODO
37  {
38  return Succeeded::no;
39  }
40 
41  inline LORAs2Points<float> get_LOR() const { return this->lor; }
42 
43  CartesianCoordinate3D<float> pos1() const { return lor.p1(); }
44  CartesianCoordinate3D<float>& pos1() { return lor.p1(); }
45  CartesianCoordinate3D<float> pos2() const { return lor.p2(); }
46  CartesianCoordinate3D<float>& pos2() { return lor.p1(); }
47 
48 private:
50 }; /*-coincidence event*/
51 
52 class CListRecordLMF;
53 
55 
58 {
59 public:
60  inline unsigned long get_time_in_millisecs() const { return time; } // TODO
61  inline Succeeded set_time_in_millisecs(const unsigned long time_in_millisecs) // TODO
62  {
63  return Succeeded::no;
64  }
65 
66 private:
67  unsigned long time; // in millisecs TODO
68 };
69 
71 
78 class CListRecordLMF : public CListRecord, public ListTime, public CListEvent
79 {
80 public:
81  CListRecordLMF& operator=(const CListEventDataLMF& event)
82  {
83  is_time_flag = false;
84  event_data = event;
85  }
86  bool is_time() const { return is_time_flag == true; }
87  bool is_event() const { return is_time_flag == false; }
88  virtual CListEvent& event() { return *this; }
89  virtual const CListEvent& event() const { return *this; }
90  virtual ListTime& time() { return *this; }
91  virtual const ListTime& time() const { return *this; }
92 
93  bool operator==(const CListRecord& e2) const;
94 
95  // time
96  inline double get_time_in_secs() const { return time_data.get_time_in_secs(); }
97  inline Succeeded set_time_in_secs(const double time_in_secs) { return time_data.set_time_in_secs(time_in_secs); }
98  inline unsigned int get_gating() const { return time_data.get_gating(); }
99  inline Succeeded set_gating(unsigned int g) { return time_data.set_gating(g); }
100 
101  // event
102  inline bool is_prompt() const { return event_data.is_prompt(); }
103  inline Succeeded set_prompt(const bool prompt = true) { return event_data.set_prompt(prompt); }
104 
105 private:
106  friend class CListModeDataLMF;
107 
108  CListEventDataLMF event_data;
109  CListTimeDataLMF time_data;
110 
111  bool is_time_flag;
112 };
113 
114 END_NAMESPACE_STIR
115 
116 #endif
Declaration of class stir::Succeeded.
Succeeded set_prompt(const bool prompt=true)
Changes the event from prompt to delayed or vice versa.
Definition: CListRecordLMF.h:103
Declaration of class stir::ProjDataInfoCylindrical.
Class for records in a PET list mode file.
Definition: CListRecord.h:66
Class for storing and using a coincidence event from a list mode file.
Definition: CListRecord.h:52
A class for storing and using a timing &#39;event&#39; from a listmode file.
Definition: CListRecordLMF.h:57
A class that reads the listmode data from an LMF file.
Definition: CListModeDataLMF.h:34
Class for storing and using a coincidence event from a listmode file.
Definition: CListRecordLMF.h:32
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
defines the stir::CartesianCoordinate3D<coordT> class
Declarations of classes stir::CListRecord, and stir::CListEvent which are used for list mode data...
A class for storing and using a timing record from a listmode file.
Definition: ListTime.h:46
A class for a general element of a listmode file.
Definition: CListRecordLMF.h:78