STIR  6.2.0
ProjDataGEHDF5.h
Go to the documentation of this file.
1 //
2 //
16 /* Copyright (C) 2018-2019 University College London
17  Copyright (C) 2018-2019 University of Leeds
18  Copyright (C) 2018-2019 University of Hull
19  This file is part of STIR.
20 
21  SPDX-License-Identifier: Apache-2.0
22 
23  See STIR/LICENSE.txt for details
24 */
25 #ifndef __ProjDataGEHDF5_H__
26 #define __ProjDataGEHDF5_H__
27 
28 #include "stir/ProjData.h"
29 #include "stir/IO/GEHDF5Wrapper.h"
30 #include "stir/Array.h"
31 
32 START_NAMESPACE_STIR
33 
34 namespace GE
35 {
36 namespace RDF_HDF5
37 {
38 
45 class ProjDataGEHDF5 : public ProjData
46 {
47 public:
48  explicit ProjDataGEHDF5(const std::string& input_filename);
49 
50  explicit ProjDataGEHDF5(shared_ptr<GEHDF5Wrapper> input_hdf5_sptr);
51 
52 private:
54  void initialise_from_wrapper();
55 
56  unsigned int find_segment_offset(const int segment_num) const;
58  Succeeded set_viewgram(const Viewgram<float>& v) override;
60  Succeeded set_sinogram(const Sinogram<float>& s) override;
62  Viewgram<float> get_viewgram(const int view_num,
63  const int segment_num,
64  const bool make_num_tangential_poss_odd = false,
65  const int timing_pos = 0) const override;
67  Sinogram<float> get_sinogram(const int ax_pos_num,
68  const int sergment_num,
69  const bool make_num_tangential_poss_odd = false,
70  const int timing_pos = 0) const override;
72  std::vector<int> get_segment_sequence_in_hdf5() const;
73  std::vector<unsigned int> seg_ax_offset;
74  unsigned int find_segment_index_in_sequence(const int segment_num) const;
77  void initialise_segment_sequence();
78 
79  void initialise_ax_pos_offset();
80 
81  void initialise_viewgram_buffer();
83  shared_ptr<GEHDF5Wrapper> m_input_hdf5_sptr;
84 
85  std::vector<int> segment_sequence;
86  std::vector<Array<3, unsigned char>> tof_data;
87 };
88 
89 } // namespace RDF_HDF5
90 } // namespace GE
91 END_NAMESPACE_STIR
92 
93 #endif
A class for 2d projection data.
Definition: FBP3DRPReconstruction.h:39
Declaration of class stir::ProjData.
defines the Array class for multi-dimensional (numeric) arrays
A class which reads projection data from a GE HDF5 sinogram file.
Definition: ProjDataGEHDF5.h:45
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
The (abstract) base class for the projection data.
Definition: ProjData.h:103