STIR 6.4.0
stir::CListModeDataSAFIR< CListRecordT > Class Template Reference

Class for reading SAFIR listmode data with variable geometry. More...

#include "stir/listmode/CListModeDataSAFIR.h"

Inheritance diagram for stir::CListModeDataSAFIR< CListRecordT >:

Public Member Functions

 CListModeDataSAFIR (const std::string &listmode_filename, const std::string &crystal_map_filename, const std::string &template_proj_data_filename, const double lor_randomization_sigma=0.0)
 
 CListModeDataSAFIR (const std::string &listmode_filename, const shared_ptr< const ProjDataInfo > &proj_data_info_sptr)
 
std::string get_name () const override
 Returns the name of the list mode data.
 
shared_ptr< CListRecordget_empty_record_sptr () const override
 Get a pointer to an empty record.
 
Succeeded get_next_record (CListRecord &record_of_general_type) const override
 Gets the next record in the listmode sequence.
 
Succeeded reset () override
 Call this function if you want to re-start reading at the beginning.
 
SavedPosition save_get_position () override
 
Succeeded set_get_position (const SavedPosition &pos) override
 Set the position for reading to a previously saved point.
 
bool has_delayeds () const override
 
- Public Member Functions inherited from stir::ListModeData
 ListModeData ()
 Default constructor.
 
 ListModeData (shared_ptr< const ExamInfo > exam_info_sptr, shared_ptr< const ProjDataInfo > proj_data_info_sptr)
 
shared_ptr< ListRecordget_empty_record_sptr () const
 Get a pointer to an empty record.
 
virtual Succeeded get_next_record (ListRecord &event) const
 Gets the next record in the listmode sequence.
 
const Scannerget_scanner () const
 Get reference to scanner.
 
virtual unsigned long int get_total_number_of_events () const
 Returns the total number of events in the listmode file.
 
- Public Member Functions inherited from stir::ExamData
 ExamData ()
 ExamData.
 
 ExamData (const shared_ptr< const ExamInfo > &_this_exam)
 
virtual const ExamInfoget_exam_info () const
 
virtual shared_ptr< const ExamInfoget_exam_info_sptr () const
 Get shared pointer to exam info.
 
virtual void set_exam_info (ExamInfo const &)
 change exam info
 
void set_exam_info_sptr (shared_ptr< const ExamInfo > new_exam_info_sptr)
 
- Public Member Functions inherited from stir::DataWithProjDataInfo
 DataWithProjDataInfo ()
 Default constructor sets internal member to 0.
 
 DataWithProjDataInfo (const shared_ptr< const ProjDataInfo > &proj_data_info_sptr_v)
 
virtual const ProjDataInfoget_proj_data_info () const
 
virtual shared_ptr< const ProjDataInfoget_proj_data_info_sptr () const
 Get shared pointer to ProjData info.
 
int get_num_segments () const
 Get number of segments.
 
int get_num_axial_poss (const int segment_num) const
 Get number of axial positions per segment.
 
int get_num_views () const
 Get number of views.
 
int get_num_tangential_poss () const
 Get number of tangential positions.
 
int get_num_tof_poss () const
 Get number of TOF positions.
 
int get_min_tof_pos_num () const
 Get the index of the first timing position.
 
int get_max_tof_pos_num () const
 Get the index of the last timing position.
 
int get_tof_mash_factor () const
 Get TOG mash factor.
 
int get_min_segment_num () const
 Get minimum segment number.
 
int get_max_segment_num () const
 Get maximum segment number.
 
int get_min_axial_pos_num (const int segment_num) const
 Get mininum axial position per segmnet.
 
int get_max_axial_pos_num (const int segment_num) const
 Get maximum axial position per segment.
 
int get_min_view_num () const
 Get minimum view number.
 
int get_max_view_num () const
 Get maximum view number.
 
int get_min_tangential_pos_num () const
 Get minimum tangential position number.
 
int get_max_tangential_pos_num () const
 Get maximum tangential position number.
 

Additional Inherited Members

- Public Types inherited from stir::ListModeData
typedef ListModeData hierarchy_base_type
 typedef used by read_from_file
 
typedef unsigned int SavedPosition
 Use this typedef for save/set_get_position.
 
- Protected Member Functions inherited from stir::CListModeData
shared_ptr< ListRecordget_empty_record_helper_sptr () const override
 
Succeeded get_next (ListRecord &event) const override
 
- Protected Member Functions inherited from stir::ListModeData
virtual void set_proj_data_info_sptr (shared_ptr< const ProjDataInfo >)
 
- Protected Attributes inherited from stir::ExamData
shared_ptr< const ExamInfoexam_info_sptr
 
- Protected Attributes inherited from stir::DataWithProjDataInfo
shared_ptr< const ProjDataInfoproj_data_info_sptr
 

Detailed Description

template<class CListRecordT>
class stir::CListModeDataSAFIR< CListRecordT >

Class for reading SAFIR listmode data with variable geometry.

By providing crystal map and template projection data files, the coordinates are read from files and used defining the LOR coordinates.

Constructor & Destructor Documentation

◆ CListModeDataSAFIR()

template<class CListRecordT>
stir::CListModeDataSAFIR< CListRecordT >::CListModeDataSAFIR ( const std::string & listmode_filename,
const std::string & crystal_map_filename,
const std::string & template_proj_data_filename,
const double lor_randomization_sigma = 0.0 )

Constructor

Takes as arguments the filenames of the coicidence listmode file, the crystal map (text) file, and the template projection data file

References CListModeDataSAFIR(), stir::error(), and stir::ProjData::read_from_file().

Referenced by CListModeDataSAFIR().

Member Function Documentation

◆ get_name()

template<class CListRecordT>
std::string stir::CListModeDataSAFIR< CListRecordT >::get_name ( ) const
overridevirtual

Returns the name of the list mode data.

This name is not necessarily unique, and might be empty. However, it is expected (but not guaranteed) that ListModeData::read_from_file(lm_data_ptr->get_name()) would read the same list mode data.

The reason this cannot be guaranteed is largely in case the list mode data is not really on disk, but the object corresponds for instance to a Monte Carlo simulator.

Implements stir::ListModeData.

◆ get_empty_record_sptr()

template<class CListRecordT>
shared_ptr< CListRecord > stir::CListModeDataSAFIR< CListRecordT >::get_empty_record_sptr ( ) const
overridevirtual

Get a pointer to an empty record.

This is mainly/only useful to get a record of the correct type, that can then be passed to get_next_record().

Implements stir::CListModeData.

References stir::DataWithProjDataInfo::get_proj_data_info_sptr().

◆ get_next_record()

template<class CListRecordT>
Succeeded stir::CListModeDataSAFIR< CListRecordT >::get_next_record ( CListRecord & event) const
overridevirtual

Gets the next record in the listmode sequence.

Implements stir::CListModeData.

◆ reset()

template<class CListRecordT>
Succeeded stir::CListModeDataSAFIR< CListRecordT >::reset ( )
overridevirtual

Call this function if you want to re-start reading at the beginning.

Implements stir::ListModeData.

◆ save_get_position()

template<class CListRecordT>
SavedPosition stir::CListModeDataSAFIR< CListRecordT >::save_get_position ( )
inlineoverridevirtual

This function should save the position in input file. This is not implemented but disabled. Returns 0 in the moement.

Todo
Maybe provide real implementation?

Implements stir::ListModeData.

◆ set_get_position()

template<class CListRecordT>
Succeeded stir::CListModeDataSAFIR< CListRecordT >::set_get_position ( const SavedPosition & )
inlineoverridevirtual

Set the position for reading to a previously saved point.

Implements stir::ListModeData.

◆ has_delayeds()

template<class CListRecordT>
bool stir::CListModeDataSAFIR< CListRecordT >::has_delayeds ( ) const
inlineoverridevirtual

Returns just false in the moment.

Todo
Implement this properly to check for delayed events in LM files.

Implements stir::CListModeData.


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