11#ifndef __stir_listmode_CListModeDataPETSIRD_H__
12#define __stir_listmode_CListModeDataPETSIRD_H__
18#include "petsird_helpers.h"
20#include "petsird/binary/protocols.h"
21#include "petsird/hdf5/protocols.h"
80 bool is_prompt =
true;
82 std::size_t event_in_block = 0;
84 std::size_t time_block_index = 0;
86 petsird::TimeBlock time_block;
88 petsird::EventTimeBlock event_block;
90 bool has_cached_blocks =
false;
112 Succeeded seek_to_event_block_index(std::size_t target_event_block_index)
const;
120 const std::vector<float>& get_singles_per_bucket()
const {
return singles_per_bucket; }
121 double get_singles_time_start()
const {
return singles_time_start; }
122 double get_singles_time_stop()
const {
return singles_time_stop; }
125 virtual Succeeded open_lm_file()
const override;
127 shared_ptr<petsird::PETSIRDReaderBase> current_lm_data_ptr;
133 mutable unsigned long int curr_event_in_event_block = 0;
135 mutable petsird::TimeBlock curr_time_block;
137 mutable petsird::EventTimeBlock curr_event_block;
140 mutable bool curr_is_prompt =
true;
142 mutable bool m_has_delayeds;
144 shared_ptr<const PETSIRDInfo> petsird_info_sptr;
146 mutable PetsirdCursor m_saved_cursor;
148 mutable std::size_t m_time_block_index = 0;
155 mutable std::vector<PetsirdCursor> m_saved_positions;
157 mutable std::vector<float> singles_per_bucket;
158 mutable double singles_time_start = 0.0;
159 mutable double singles_time_stop = 0.0;
Declaration of class stir::CListModeDataBasedOnCoordinateMap.
Declaration of class stir::CListEventPETSIRD and stir::CListRecordPETSIRD with supporting classes.
Declarations of classes stir::CListRecord, and stir::CListEvent which are used for list mode data.
Declaration of class stir::PETSIRDInfo.
Declaration of class stir::Succeeded.
CListModeDataPETSIRD(const std::string &listmode_filename, bool use_hdf5)
Construct reader.
Definition CListModeDataPETSIRD.cxx:25
virtual shared_ptr< CListRecord > get_empty_record_sptr() const override
Get a pointer to an empty record.
Definition CListModeDataPETSIRD.cxx:81
virtual bool has_delayeds() const override
Return if the file stores delayed events as well (as opposed to prompts).
Definition CListModeDataPETSIRD.h:116
void reopen_and_prime()
Reopens the underlying reader and primes it at the first event block.
Definition CListModeDataPETSIRD.cxx:190
Succeeded set_get_position(const SavedPosition &pos) override
Set the position for reading to a previously saved point.
Definition CListModeDataPETSIRD.cxx:235
Succeeded get_next_record(CListRecord &record_of_general_type) const override
Gets the next record in the listmode sequence.
Definition CListModeDataPETSIRD.cxx:88
SavedPosition save_get_position() override
Save the current reading position.
Definition CListModeDataPETSIRD.cxx:173
Class for records in a PET list mode file.
Definition CListRecord.h:68
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