STIR 6.5.0
CListModeDataSAFIR.h
Go to the documentation of this file.
1/*
2
3 Copyright 2015 ETH Zurich, Institute of Particle Physics
4 Copyright 2020 Positrigo AG, Zurich
5
6 SPDX-License-Identifier: Apache-2.0
7 See STIR/LICENSE.txt for detail.
8 */
9
18
19#ifndef __stir_listmode_CListModeDataSAFIR_H__
20#define __stir_listmode_CListModeDataSAFIR_H__
21
22#include <string>
23
25#include "stir/ProjData.h"
26#include "stir/ProjDataInfo.h"
29#include "stir/shared_ptr.h"
30
31START_NAMESPACE_STIR
32
40template <class CListRecordT>
41class CListModeDataSAFIR : public CListModeDataBasedOnCoordinateMap
42{
43public:
49 CListModeDataSAFIR(const std::string& listmode_filename,
50 const std::string& crystal_map_filename,
51 const std::string& template_proj_data_filename,
52 const double lor_randomization_sigma = 0.0);
53
54 CListModeDataSAFIR(const std::string& listmode_filename, const shared_ptr<const ProjDataInfo>& proj_data_info_sptr);
55
56 shared_ptr<CListRecord> get_empty_record_sptr() const override;
57 Succeeded get_next_record(CListRecord& record_of_general_type) const override;
58
59 bool has_delayeds() const override { return false; }
60
61 Succeeded reset() override;
62
63 SavedPosition save_get_position() override { return static_cast<SavedPosition>(current_lm_data_ptr->save_get_position()); }
64
65 Succeeded set_get_position(const SavedPosition& pos) override { return current_lm_data_ptr->set_get_position(pos); }
66
67protected:
68 virtual Succeeded open_lm_file() const override;
69 mutable shared_ptr<InputStreamWithRecords<CListRecordT, bool>> current_lm_data_ptr;
70};
71
72END_NAMESPACE_STIR
73#endif // CLISTMODEDATASAFIR_H
Declaration of class stir::CListModeDataBasedOnCoordinateMap.
Declarations of classes stir::CListRecord, and stir::CListEvent which are used for list mode data.
Declaration of class stir::InputStreamWithRecords.
Declaration of class stir::ProjDataInfo.
Declaration of class stir::ProjData.
SavedPosition save_get_position() override
Save the current reading position.
Definition CListModeDataSAFIR.h:63
bool has_delayeds() const override
Return if the file stores delayed events as well (as opposed to prompts).
Definition CListModeDataSAFIR.h:59
Succeeded get_next_record(CListRecord &record_of_general_type) const override
Gets the next record in the listmode sequence.
Definition CListModeDataSAFIR.cxx:97
shared_ptr< CListRecord > get_empty_record_sptr() const override
Get a pointer to an empty record.
Definition CListModeDataSAFIR.cxx:87
CListModeDataSAFIR(const std::string &listmode_filename, const std::string &crystal_map_filename, const std::string &template_proj_data_filename, const double lor_randomization_sigma=0.0)
Definition CListModeDataSAFIR.cxx:40
Succeeded set_get_position(const SavedPosition &pos) override
Set the position for reading to a previously saved point.
Definition CListModeDataSAFIR.h:65
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
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...