10#ifndef __stir_IO_GEHDF5Wrapper_H__
11#define __stir_IO_GEHDF5Wrapper_H__
63 explicit GEHDF5Wrapper(
const std::string& filename);
70 bool is_sino_file()
const;
72 bool is_geo_file()
const;
74 bool is_norm_file()
const;
76 Succeeded open(
const std::string& filename);
93 Succeeded initialise_efficiency_factors();
107 const std::array<hsize_t, 3>& offset = { 0, 0, 0 },
108 const std::array<hsize_t, 3>& stride = { 1, 1, 1 });
114 const std::array<hsize_t, 2>& offset = { 0, 0 },
115 const std::array<hsize_t, 2>& count = { 0, 0 },
116 const std::array<hsize_t, 2>& stride = { 1, 1 });
119 const std::array<hsize_t, 2>& offset = { 0, 0 },
120 const std::array<hsize_t, 2>& stride = { 1, 1 });
122 inline H5::DataSet* get_dataset_ptr()
const;
124 inline hsize_t get_dataset_size()
const;
126 inline unsigned int get_geo_dims()
const;
128 unsigned int get_num_singles_samples();
136 inline shared_ptr<Scanner> get_scanner_sptr()
const;
138 inline shared_ptr<const ProjDataInfo> get_proj_data_info_sptr()
const;
141 inline const H5::H5File&
get_file()
const;
145 std::uint32_t read_dataset_uint32(
const std::string& dataset_name);
146 std::int32_t read_dataset_int32(
const std::string& dataset_name);
164 void initialise_proj_data_info_from_HDF5();
165 void initialise_exam_info();
167 shared_ptr<ProjDataInfo> proj_data_info_sptr;
168 shared_ptr<ExamInfo> exam_info_sptr;
173 unsigned int check_geo_type();
174 shared_ptr<Scanner> get_scanner_from_HDF5();
178 shared_ptr<H5::DataSet> m_dataset_sptr;
180 H5::DataSpace m_dataspace;
182 std::uint64_t m_list_size = 0;
183 int m_dataset_list_Ndims;
184 unsigned int m_num_singles_samples;
186 bool is_list =
false;
187 bool is_sino =
false;
189 bool is_norm =
false;
193 unsigned int geo_dims = 0;
194 std::string m_address;
196 unsigned int rdf_ver = 0;
198 hsize_t m_size_of_record_signature = 0;
200 hsize_t m_max_size_of_record = 0;
202 hsize_t m_NX_SUB = 0;
203 hsize_t m_NY_SUB = 0;
204 hsize_t m_NZ_SUB = 0;
206 static const int m_max_dataset_dims = 5;
defines the stir::Array class for multi-dimensional (numeric) arrays
This file declares the class stir::ExamInfo.
Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
Declaration of class stir::ProjDataInfo.
Declaration of class stir::Scanner.
Declaration of class stir::Succeeded.
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
static bool check_GE_signature(const std::string &filename)
check signature to see if this is a GE RDF9 or higher file
Definition GEHDF5Wrapper.cxx:80
Succeeded initialise_geo_factors_data(const unsigned int slice_num)
Initialises data for reading geometric normalisation factors. Sets up reading addresses and inspect s...
Definition GEHDF5Wrapper.cxx:700
Succeeded read_singles(Array< 1, unsigned int > &output, const unsigned int current_id)
read singles at time slice current_id
Definition GEHDF5Wrapper.cxx:914
shared_ptr< ExamInfo > get_exam_info_sptr() const
Get shared pointer to exam info.
Definition GEHDF5Wrapper.inl:45
Succeeded read_list_data(char *output, const std::streampos offset, const hsize_t size) const
reads listmode event(s)
Definition GEHDF5Wrapper.cxx:783
Succeeded initialise_proj_data(const unsigned int view_num)
Initialises data for reading projections. Sets up reading addresses and inspect sizes.
Definition GEHDF5Wrapper.cxx:642
const H5::H5File & get_file() const
Definition GEHDF5Wrapper.inl:69
bool is_list_file() const
Checks if input file is a listmode file.
Definition GEHDF5Wrapper.cxx:114
AcqPatientPositions
enum for encoding patient orientation in the RDF file
Definition GEHDF5Wrapper.h:157
AcqPatientEntries
enum for encoding head/feet first in the RDF file
Definition GEHDF5Wrapper.h:151
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...