STIR  6.2.0
ListModeData_dummy.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2022, MGH / HST A. Martinos Center for Biomedical Imaging
3  This file is part of STIR.
4 
5  SPDX-License-Identifier: Apache-2.0
6 
7  See STIR/LICENSE.txt for details
8 */
17 #ifndef __stir_listmode_ListModeData_dummy_H__
18 #define __stir_listmode_ListModeData_dummy_H__
19 
20 #include "stir/error.h"
21 
22 START_NAMESPACE_STIR
45 {
46 public:
47  ListModeData_dummy(shared_ptr<const ExamInfo> exam_info, shared_ptr<const ProjDataInfo> proj_data_info)
48  {
49  this->exam_info_sptr = exam_info;
50  this->proj_data_info_sptr = proj_data_info;
51  }
52 
53  std::string get_name() const override { return std::string("ListModeData_dummy"); }
54 
55  Succeeded reset() override
56  {
57  error("ListModeData_dummy does not have reset()");
58  return Succeeded::no;
59  }
60 
62  {
63  error("ListModeData_dummy does not have save_get_position()");
64  return 0;
65  }
66 
68  {
69  error("ListModeData_dummy does not have set_get_position()");
70  return Succeeded::no;
71  }
72 
73  bool has_delayeds() const override
74  {
75  error("ListModeData_dummy does not have has_delayeds()");
76  return false;
77  }
78 
79 protected:
80  shared_ptr<ListRecord> get_empty_record_helper_sptr() const override
81  {
82  error("ListModeData_dummy does not have get_empty_record_helper_sptr()");
83  return nullptr;
84  }
85  Succeeded get_next(ListRecord& event) const override
86  {
87  error("ListModeData_dummy does not have get_next()");
88  return Succeeded::no;
89  }
90 };
91 
92 END_NAMESPACE_STIR
93 
94 #endif
std::string get_name() const override
Returns the name of the list mode data.
Definition: ListModeData_dummy.h:53
unsigned int SavedPosition
Use this typedef for save/set_get_position.
Definition: ListModeData.h:130
The base class for reading list mode data.
Definition: ListModeData.h:123
Declaration of stir::error()
Succeeded reset() override
Call this function if you want to re-start reading at the beginning.
Definition: ListModeData_dummy.h:55
SavedPosition save_get_position() override
Save the current reading position.
Definition: ListModeData_dummy.h:61
A class for a general element of a list mode file.
Definition: ListRecord.h:44
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition: error.cxx:42
bool has_delayeds() const override
Return if the file stores delayed events as well (as opposed to prompts)
Definition: ListModeData_dummy.h:73
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
A class to trick the Objective function that we have list mode data, when we only have cache...
Definition: ListModeData_dummy.h:44
Succeeded set_get_position(const SavedPosition &) override
Set the position for reading to a previously saved point.
Definition: ListModeData_dummy.h:67