STIR  6.2.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 */
17 #ifndef __stir_listmode_CListRecordPENN_H__
18 #define __stir_listmode_CListRecordPENN_H__
19 
21 
22 START_NAMESPACE_STIR
23 
31 {
32 public:
33  CListEventPENN(const shared_ptr<Scanner>& scanner_sptr);
35  virtual void get_detection_position(DetectionPositionPair<>&) const;
37  virtual void set_detection_position(const DetectionPositionPair<>&);
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 
52 private:
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 
72 class CListTimePENN : public ListTime
73 {
74 public:
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 
80 private:
81 };
82 
85 class CListRecordPENN : public CListRecord // currently no gating yet
86 {
87 
88 public:
90  bool is_time() const { return false; }
91  /*
92 bool 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 
103 public:
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 
117 private:
118  CListEventPENN event_data;
119  CListTimePENN time_data;
120 };
121 
122 END_NAMESPACE_STIR
123 
124 #endif
Class for storing and using a coincidence event from a list mode file for a cylindrical scanner...
Definition: CListEventCylindricalScannerWithDiscreteDetectors.h:31
Class for handling PENNPet Explorer events.
Definition: CListRecordPENN.h:30
Succeeded set_prompt(const bool _prompt=true)
Changes the event from prompt to delayed or vice versa.
Definition: CListRecordPENN.h:43
Class for records in a PET list mode file.
Definition: CListRecord.h:66
Declarations of class stir::CListEventCylindricalScannerWithDiscreteDetectors.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
A class for storing and using a timing record from a listmode file.
Definition: ListTime.h:46
A class for storing 2 coordinates-sets of a detection, together with a timing-position index (for TOF...
Definition: DetectionPositionPair.h:40