STIR  6.2.0
SPECTListModeData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2019, National Physical Laboratory
3  Copyright (C) 2019, University College of London
4  This file is part of STIR.
5 
6  SPDX-License-Identifier: Apache-2.0
7 
8  See STIR/LICENSE.txt for details
9 */
19 #ifndef __stir_listmode_SPECTListModeData_H__
20 #define __stir_listmode_SPECTListModeData_H__
21 
24 
25 #ifdef BOOST_NO_STDC_NAMESPACE
26 namespace std
27 {
28 using ::time_t;
29 }
30 #endif
31 
32 START_NAMESPACE_STIR
33 
34 class Succeeded;
35 class ExamInfo;
36 
47 class SPECTListModeData : virtual public ListModeData
48 {
49 public:
51 
54  virtual shared_ptr<SPECTListRecord> get_empty_record_sptr() const = 0;
55 
57  virtual Succeeded get_next_record(SPECTListRecord& event) const = 0;
58 
60  virtual bool has_delayeds() const { return false; }
61 
62 protected:
63  virtual shared_ptr<ListRecord> get_empty_record_helper_sptr() const
64  {
65  shared_ptr<SPECTListRecord> sptr(this->get_empty_record_sptr());
66  shared_ptr<ListRecord> sptr1(static_pointer_cast<ListRecord>(sptr));
67  return sptr1;
68  }
69 
70  virtual Succeeded get_next(ListRecord& event) const { return this->get_next_record(reinterpret_cast<SPECTListRecord&>(event)); }
71 };
72 
73 END_NAMESPACE_STIR
74 
75 #endif
STL namespace.
A class for a general element of a list mode file.
Definition: SPECTListRecord.h:44
The base class for reading list mode data.
Definition: ListModeData.h:123
virtual bool has_delayeds() const
Return if the file stores delayed events as well (as opposed to prompts)
Definition: SPECTListModeData.h:60
The base class for reading SPECT list mode data.This class (and SPECTListRecord) is specific to SPECT...
Definition: SPECTListModeData.h:47
A class for a general element of a list mode file.
Definition: ListRecord.h:44
Declaration of class stir::ListModeData.
Declarations of classes stir::SPECTListRecord which is used for list mode data.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43