STIR 6.4.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
25START_NAMESPACE_STIR
26
27class CListModeDataLMF;
28
30
33{
34public:
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
48private:
50}; /*-coincidence event*/
51
52class CListRecordLMF;
53
55
58{
59public:
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
66private:
67 unsigned long time; // in millisecs TODO
68};
69
71
78class CListRecordLMF : public CListRecord, public ListTime, public CListEvent
79{
80public:
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
105private:
106 friend class CListModeDataLMF;
107
108 CListEventDataLMF event_data;
109 CListTimeDataLMF time_data;
110
111 bool is_time_flag;
112};
113
114END_NAMESPACE_STIR
115
116#endif
Declarations of classes stir::CListRecord, and stir::CListEvent which are used for list mode data.
defines the stir::CartesianCoordinate3D<coordT> class
Declaration of class stir::ProjDataInfoCylindrical.
Declaration of class stir::Succeeded.
Class for storing and using a coincidence event from a listmode file.
Definition CListRecordLMF.h:33
Class for storing and using a coincidence event from a list mode file.
Definition CListRecord.h:53
A class that reads the listmode data from an LMF file.
Definition CListModeDataLMF.h:35
A class for a general element of a listmode file.
Definition CListRecordLMF.h:79
Succeeded set_prompt(const bool prompt=true)
Changes the event from prompt to delayed or vice versa.
Definition CListRecordLMF.h:103
Class for records in a PET list mode file.
Definition CListRecord.h:67
A class for storing and using a timing 'event' from a listmode file.
Definition CListRecordLMF.h:58
a templated class for 3-dimensional coordinates.
Definition CartesianCoordinate3D.h:53
A class for LORs.
Definition LORCoordinates.h:296
A class for storing and using a timing record from a listmode file.
Definition ListTime.h:47
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44