STIR 6.4.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*/
18
19#ifndef __stir_listmode_SPECTListModeData_H__
20#define __stir_listmode_SPECTListModeData_H__
21
24
25#ifdef BOOST_NO_STDC_NAMESPACE
26namespace std
27{
28using ::time_t;
29}
30#endif
31
32START_NAMESPACE_STIR
33
34class Succeeded;
35class ExamInfo;
36
47class SPECTListModeData : virtual public ListModeData
48{
49public:
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
62protected:
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
73END_NAMESPACE_STIR
74
75#endif
Declaration of class stir::ListModeData.
Declarations of classes stir::SPECTListRecord which is used for list mode data.
ListModeData()
Default constructor.
Definition ListModeData.cxx:27
The base class for reading SPECT list mode data.
Definition SPECTListModeData.h:48
virtual Succeeded get_next_record(SPECTListRecord &event) const =0
Gets the next record in the listmode sequence.
virtual bool has_delayeds() const
Return if the file stores delayed events as well (as opposed to prompts)
Definition SPECTListModeData.h:60
virtual shared_ptr< SPECTListRecord > get_empty_record_sptr() const =0
Get a pointer to an empty record.
A class for a general element of a list mode file.
Definition SPECTListRecord.h:45
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44