STIR  6.2.0
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
stir::GE::RDF_HDF5::GEHDF5Wrapper Class Reference

A class that extracts and reads the necessary data from GE HDF5 input files. More...

#include "stir/IO/GEHDF5Wrapper.h"

Public Member Functions

 GEHDF5Wrapper (const std::string &filename)
 
bool is_list_file () const
 Checks if input file is a listmode file.
 
bool is_sino_file () const
 
bool is_geo_file () const
 
bool is_norm_file () const
 
Succeeded open (const std::string &filename)
 
Succeeded initialise_listmode_data ()
 
Succeeded initialise_singles_data ()
 
Succeeded initialise_proj_data (const unsigned int view_num)
 Initialises data for reading projections. Sets up reading addresses and inspect sizes. More...
 
Succeeded initialise_geo_factors_data (const unsigned int slice_num)
 Initialises data for reading geometric normalisation factors. Sets up reading addresses and inspect sizes. More...
 
Succeeded initialise_efficiency_factors ()
 
Succeeded read_list_data (char *output, const std::streampos offset, const hsize_t size) const
 reads listmode event(s)
 
Succeeded read_singles (Array< 1, unsigned int > &output, const unsigned int current_id)
 read singles at time slice current_id More...
 
Succeeded read_sinogram (Array< 3, unsigned char > &output, const std::array< hsize_t, 3 > &offset={ 0, 0, 0 }, const std::array< hsize_t, 3 > &stride={ 1, 1, 1 })
 
Succeeded read_geometric_factors (Array< 1, unsigned int > &output, const std::array< hsize_t, 2 > &offset={ 0, 0 }, const std::array< hsize_t, 2 > &count={ 0, 0 }, const std::array< hsize_t, 2 > &stride={ 1, 1 })
 
Succeeded read_efficiency_factors (Array< 1, float > &output, const std::array< hsize_t, 2 > &offset={ 0, 0 }, const std::array< hsize_t, 2 > &stride={ 1, 1 })
 
H5::DataSet * get_dataset_ptr () const
 
hsize_t get_dataset_size () const
 
unsigned int get_geo_dims () const
 
unsigned int get_num_singles_samples ()
 
shared_ptr< ExamInfoget_exam_info_sptr () const
 Get shared pointer to exam info. More...
 
shared_ptr< Scannerget_scanner_sptr () const
 
shared_ptr< const ProjDataInfoget_proj_data_info_sptr () const
 
const H5::H5File & get_file () const
 
std::uint32_t read_dataset_uint32 (const std::string &dataset_name)
 
std::int32_t read_dataset_int32 (const std::string &dataset_name)
 

Static Public Member Functions

static bool check_GE_signature (const std::string &filename)
 check signature to see if this is a GE RDF9 or higher file More...
 
static bool check_GE_signature (H5::H5File &file)
 check signature to see if this is a GE RDF9 or higher HDF5 file More...
 

Protected Types

enum  AcqPatientEntries { ACQ_HEAD_FIRST = 0, ACQ_FEET_FIRST = 1 }
 enum for encoding head/feet first in the RDF file
 
enum  AcqPatientPositions { ACQ_SUPINE = 0, ACQ_PRONE = 1, ACQ_LEFT_DECUB = 2, ACQ_RIGHT_DECUB = 3 }
 enum for encoding patient orientation in the RDF file
 

Protected Member Functions

void initialise_proj_data_info_from_HDF5 ()
 
void initialise_exam_info ()
 

Protected Attributes

shared_ptr< ProjDataInfoproj_data_info_sptr
 
shared_ptr< ExamInfoexam_info_sptr
 

Detailed Description

A class that extracts and reads the necessary data from GE HDF5 input files.

Member Function Documentation

◆ check_GE_signature() [1/2]

bool stir::GE::RDF_HDF5::GEHDF5Wrapper::check_GE_signature ( const std::string &  filename)
static

check signature to see if this is a GE RDF9 or higher file

calls current_GE_signature(H5::H5file&)

Referenced by stir::GE::RDF_HDF5::CListModeDataGEHDF5::get_empty_record_sptr().

◆ check_GE_signature() [2/2]

bool stir::GE::RDF_HDF5::GEHDF5Wrapper::check_GE_signature ( H5::H5File &  file)
static

check signature to see if this is a GE RDF9 or higher HDF5 file

does minimal checks to see if expected datasets are present in the HDF5 object

References stir::error().

◆ initialise_proj_data()

Succeeded stir::GE::RDF_HDF5::GEHDF5Wrapper::initialise_proj_data ( const unsigned int  view_num)

Initialises data for reading projections. Sets up reading addresses and inspect sizes.

Parameters
view_numuses 1-based indexing

this function has to be called for each projection/view_num

References stir::error().

◆ initialise_geo_factors_data()

Succeeded stir::GE::RDF_HDF5::GEHDF5Wrapper::initialise_geo_factors_data ( const unsigned int  slice_num)

Initialises data for reading geometric normalisation factors. Sets up reading addresses and inspect sizes.

Parameters
slice_numuses 1-based indexing

References stir::error().

◆ read_singles()

Succeeded stir::GE::RDF_HDF5::GEHDF5Wrapper::read_singles ( Array< 1, unsigned int > &  output,
const unsigned int  current_id 
)

read singles at time slice current_id

Parameters
[in]current_idis a 1-based index

◆ get_exam_info_sptr()

shared_ptr< ExamInfo > stir::GE::RDF_HDF5::GEHDF5Wrapper::get_exam_info_sptr ( ) const
inline

Get shared pointer to exam info.

Warning
Use with care. If you modify the object in a shared ptr, everything using the same shared pointer will be affected.

Referenced by stir::GE::RDF_HDF5::CListModeDataGEHDF5::get_empty_record_sptr().

◆ get_file()

const H5::H5File & stir::GE::RDF_HDF5::GEHDF5Wrapper::get_file ( ) const
inline

The documentation for this class was generated from the following files: