STIR 6.4.0
CListModeDataLMF.h
Go to the documentation of this file.
1//
2//
11/*
12 Copyright (C) 2003- 2004, Hammersmith Imanet Ltd
13
14 SPDX-License-Identifier: Apache-2.0
15 See STIR/LICENSE.txt for details
16*/
17
18#ifndef __stir_listmode_CListModeDataLMF_H__
19#define __stir_listmode_CListModeDataLMF_H__
20
22#include "stir/shared_ptr.h"
23#include "LMF/lmf.h" // TODO adjust location
24//#include "LMF/LMF_ClearPET.h" // TODO don't know which is needed
25//#include "LMF/LMF_Interfile.h"
26
27#include <stdio.h>
28#include <string>
29#include <vector>
30
31START_NAMESPACE_STIR
32
35{
36public:
38 CListModeDataLMF(const std::string& listmode_filename);
39
40 // Destructor closes the file and destroys various structures
42
43 virtual std::time_t get_scan_start_time_in_secs_since_1970() const { return std::time_t(-1); } // TODO
44
45 virtual shared_ptr<CListRecord> get_empty_record_sptr() const;
46
48 virtual bool has_delayeds() const { return true; } // TODO always?
49
50 virtual Succeeded get_next_record(CListRecord& event) const;
51
52 virtual Succeeded reset();
53
54 virtual SavedPosition save_get_position();
55
56 virtual Succeeded set_get_position(const SavedPosition&);
57
58private:
59 string listmode_filename;
60 // TODO we really want to make this a shared_ptr I think to avoid memory leaks when throwing exceptions
61 struct LMF_ccs_encodingHeader* pEncoH;
62 FILE* pfCCS;
63
64 // possibly use this from LMF2Projection
65 // SCANNER_CHECK_LIST scanCheckList;
66 std::vector<unsigned long> saved_get_positions;
67};
68
69END_NAMESPACE_STIR
70
71#endif
Declaration of class stir::CListModeData.
CListModeDataLMF(const std::string &listmode_filename)
Constructor taking a filename.
Definition CListModeDataLMF.cxx:33
virtual bool has_delayeds() const
LMF listmode data stores delayed events as well (as opposed to prompts)
Definition CListModeDataLMF.h:48
virtual shared_ptr< CListRecord > get_empty_record_sptr() const
Get a pointer to an empty record.
Definition CListModeDataLMF.cxx:72
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 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...