STIR 6.4.0
CListModeDataECAT8_32bit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2013-2014 University College London
3 This file is part of STIR.
4
5 SPDX-License-Identifier: Apache-2.0
6
7 See STIR/LICENSE.txt for details
8*/
16
17#ifndef __stir_listmode_CListModeDataECAT8_32bit_H__
18#define __stir_listmode_CListModeDataECAT8_32bit_H__
19
23#include "stir/shared_ptr.h"
25#include <iostream>
26#include <vector>
27
28START_NAMESPACE_STIR
29namespace ecat
30{
31
33
43{
44public:
46 CListModeDataECAT8_32bit(const std::string& listmode_filename_prefix);
47
48 std::string get_name() const override;
49
50 shared_ptr<CListRecord> get_empty_record_sptr() const override;
51
52 Succeeded get_next_record(CListRecord& record) const override;
53
54 Succeeded reset() override;
55
57
59
61
62 bool has_delayeds() const override { return true; }
63
64private:
65 typedef CListRecordECAT8_32bit CListRecordT;
66 std::string listmode_filename;
67 shared_ptr<InputStreamWithRecords<CListRecordT, bool>> current_lm_data_ptr;
68
69 InterfileListmodeHeaderSiemens interfile_parser;
70
71 // std::vector<int> segment_table;
72
73 Succeeded open_lm_file();
74};
75
76} // namespace ecat
77END_NAMESPACE_STIR
78
79#endif
Declaration of class stir::CListModeData.
Classes for listmode events for the ECAT 8 format.
Declaration of class stir::InputStreamWithRecords.
This file declares the classes stir::InterfileHeaderSiemens, stir::InterfileRawDataHeaderSiemens,...
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
a class for Interfile keywords (and parsing) specific to Siemens listmode data (in PETLINK format)
Definition InterfileHeaderSiemens.h:195
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
bool has_delayeds() const override
returns true, as ECAT listmode data stores delayed events (and prompts)
Definition CListModeDataECAT8_32bit.h:62
SavedPosition save_get_position() override
Save the current reading position.
Definition CListModeDataECAT8_32bit.cxx:101
Succeeded set_get_position(const SavedPosition &) override
Set the position for reading to a previously saved point.
Definition CListModeDataECAT8_32bit.cxx:107
CListModeDataECAT8_32bit(const std::string &listmode_filename_prefix)
Construct fron the filename of the Interfile header.
Definition CListModeDataECAT8_32bit.cxx:30
std::string get_name() const override
Returns the name of the list mode data.
Definition CListModeDataECAT8_32bit.cxx:49
shared_ptr< CListRecord > get_empty_record_sptr() const override
Get a pointer to an empty record.
Definition CListModeDataECAT8_32bit.cxx:55
Succeeded get_next_record(CListRecord &record) const override
Gets the next record in the listmode sequence.
Definition CListModeDataECAT8_32bit.cxx:88
Succeeded reset() override
Call this function if you want to re-start reading at the beginning.
Definition CListModeDataECAT8_32bit.cxx:95
A class for a general element of a listmode file for a Siemens scanner using the ECAT8 32bit format.
Definition CListRecordECAT8_32bit.h:196
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...