STIR 6.4.0
CListModeDataGEHDF5.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2013-2020 University College London
3 Copyright (C) 2017-2019 University of Leeds
4*/
16
17#ifndef __stir_listmode_CListModeDataGEHDF5_H__
18#define __stir_listmode_CListModeDataGEHDF5_H__
19
23#include "stir/shared_ptr.h"
24#include <iostream>
25#include <string>
26
27START_NAMESPACE_STIR
28namespace GE
29{
30namespace RDF_HDF5
31{
32
34
40{
41public:
43 CListModeDataGEHDF5(const std::string& listmode_filename);
44
45 std::string get_name() const override;
46
47 virtual std::time_t get_scan_start_time_in_secs_since_1970() const;
48
49 shared_ptr<CListRecord> get_empty_record_sptr() const override;
50
51 Succeeded get_next_record(CListRecord& record) const override;
52
53 Succeeded reset() override;
54
56
58
60
61 bool has_delayeds() const override { return false; }
62
63private:
64 // shared_ptr<GEHDF5Wrapper> input_sptr;
65
66 typedef CListRecordGEHDF5 CListRecordT;
67 std::string listmode_filename;
68 shared_ptr<InputStreamWithRecordsFromHDF5<CListRecordT>> current_lm_data_ptr;
69 unsigned long first_time_stamp;
70 unsigned long lm_duration_in_millisecs;
71
72 Succeeded open_lm_file();
73};
74
75} // namespace RDF_HDF5
76} // namespace GE
77END_NAMESPACE_STIR
78
79#endif
Declaration of class stir::CListModeData.
Classes for listmode records of GE RDF9 data.
Declaration of class stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5.
The base class for reading PET (i.e. coincidence) list mode data.
Definition CListModeData.h:51
Class for records in a PET list mode file.
Definition CListRecord.h:67
Succeeded set_get_position(const SavedPosition &) override
Set the position for reading to a previously saved point.
Definition CListModeDataGEHDF5.cxx:120
Succeeded reset() override
Call this function if you want to re-start reading at the beginning.
Definition CListModeDataGEHDF5.cxx:108
bool has_delayeds() const override
returns false, as GEHDF5 listmode data does not store delayed events (and prompts)
Definition CListModeDataGEHDF5.h:61
CListModeDataGEHDF5(const std::string &listmode_filename)
Constructor taking a filename.
Definition CListModeDataGEHDF5.cxx:39
shared_ptr< CListRecord > get_empty_record_sptr() const override
Get a pointer to an empty record.
Definition CListModeDataGEHDF5.cxx:59
SavedPosition save_get_position() override
Save the current reading position.
Definition CListModeDataGEHDF5.cxx:114
std::string get_name() const override
Returns the name of the list mode data.
Definition CListModeDataGEHDF5.cxx:47
Succeeded get_next_record(CListRecord &record) const override
Gets the next record in the listmode sequence.
Definition CListModeDataGEHDF5.cxx:101
A class for a general element (or "record") of a GE RDF9 listmode file.
Definition CListRecordGEHDF5.h:196
unsigned int SavedPosition
Use this typedef for save/set_get_position.
Definition ListModeData.h:129
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...