STIR 6.4.0
CListRecordPENN.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2020-2022 University of Pennsylvania
3 This file is part of STIR.
4
5 SPDX-License-Identifier: Apache-2.0
6
7 See STIR/LICENSE.txt for details
8*/
16
17#ifndef __stir_listmode_CListRecordPENN_H__
18#define __stir_listmode_CListRecordPENN_H__
19
21
22START_NAMESPACE_STIR
23
31{
32public:
33 CListEventPENN(const shared_ptr<Scanner>& scanner_sptr);
38
39 void init_from_data(bool d, int dt, int xa, int xb, int za, int zb, int ea, int eb);
40
41 inline bool is_prompt() const { return delay == false; }
42
43 inline Succeeded set_prompt(const bool _prompt = true)
44 {
45 if (_prompt)
46 delay = false;
47 else
48 delay = true;
49 return Succeeded::yes;
50 }
51
52private:
53 std::vector<int> segment_sequence;
54 std::vector<int> sizes;
55
56 int delay;
57#ifdef STIR_TOF
58 short int tof_bin;
59 short int orig_tof_bin;
60#endif
61 int d1, d2;
62 int z1, z2;
63#if 0
64 // Most likely, most people will not need these.
65 unsigned short int orig_z1, orig_z2;
66#endif
67 int quarter_of_detectors;
68};
69
72class CListTimePENN : public ListTime
73{
74public:
75 Succeeded init_from_data_ptr(const void* const ptr) { return Succeeded::yes; }
76 bool is_time() const { return false; }
77 inline unsigned long get_time_in_millisecs() const { return 0; }
78 inline Succeeded set_time_in_millisecs(const unsigned long time_in_millisecs) { return Succeeded::yes; }
79
80private:
81};
82
85class CListRecordPENN : public CListRecord // currently no gating yet
86{
87
88public:
90 bool is_time() const { return false; }
91 /*
92bool is_gating_input() const
93{ return this->is_time(); }
94*/
95 bool is_event() const { return true; }
96 virtual CListEventPENN& event() { return this->event_data; }
97 virtual const CListEventPENN& event() const { return this->event_data; }
98 virtual CListTimePENN& time() { return this->time_data; }
99 virtual const CListTimePENN& time() const { return this->time_data; }
101 bool operator==(const CListRecord& e2) const {}
102
103public:
104 CListRecordPENN(const shared_ptr<Scanner>& scanner_sptr)
105 : event_data(scanner_sptr)
106 {}
107
108 virtual Succeeded init_from_data(int is_delay, int dt, int xa, int xb, int za, int zb, int ea, int eb)
109 {
110
111 this->event_data.init_from_data(is_delay, dt, xa, xb, za, zb, ea, eb);
112 // this->time_data.init_from_data(ta, tb);
113
114 return Succeeded::yes;
115 }
116
117private:
118 CListEventPENN event_data;
119 CListTimePENN time_data;
120};
121
122END_NAMESPACE_STIR
123
124#endif
Declarations of class stir::CListEventCylindricalScannerWithDiscreteDetectors.
Class for storing and using a coincidence event from a list mode file for a cylindrical scanner.
Definition CListEventCylindricalScannerWithDiscreteDetectors.h:33
virtual void get_detection_position(DetectionPositionPair<> &) const
This routine returns the corresponding detector pair.
Definition CListRecordPENN.cxx:29
virtual void set_detection_position(const DetectionPositionPair<> &)
This routine sets in a coincidence event from detector "indices".
Definition CListRecordPENN.cxx:42
Succeeded set_prompt(const bool _prompt=true)
Changes the event from prompt to delayed or vice versa.
Definition CListRecordPENN.h:43
A class for storing 2 coordinates-sets of a detection, together with a timing-position index (for TOF...
Definition DetectionPositionPair.h:41
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44