STIR 6.5.0
stir::LmToProjDataWithMC Class Reference

Class for binning list mode files with motion correction. More...

#include "stir_experimental/listmode/LmToProjDataWithMC.h"

Inheritance diagram for stir::LmToProjDataWithMC:

Public Member Functions

 LmToProjDataWithMC (const char *const par_filename)
virtual void get_bin_from_event (Bin &bin, const CListEvent &) const
void process_new_time_event (const ListTime &time_event) override
 will be called after a new timing event is found in the file
Succeeded set_up () override
 Perform various checks.
Public Member Functions inherited from stir::LmToProjData
 LmToProjData (const char *const par_filename)
 Constructor taking a filename for a parameter file.
 LmToProjData ()
 Default constructor.
void set_template_proj_data_info_sptr (shared_ptr< const ProjDataInfo >)
 Optional proj data_info to use as "template".
shared_ptr< const ProjDataInfo > get_template_proj_data_info_sptr () const
 Get the current template.
virtual void set_input_data (const shared_ptr< ExamData > &)
 set input data
virtual void set_input_data (const std::string &filename)
 set input data
void set_output_filename_prefix (const std::string &)
std::string get_output_filename_prefix () const
void set_output_projdata_sptr (shared_ptr< ProjData > &)
 set projdata to be filled with output
void set_store_prompts (bool)
bool get_store_prompts () const
void set_store_delayeds (bool)
bool get_store_delayeds () const
double get_last_processed_lm_rel_time () const
 Returns the last processed timestamp in the listmode file.
void set_num_segments_in_memory (int)
int get_num_segments_in_memory () const
void set_num_events_to_store (long int)
long int get_num_events_to_store () const
void set_time_frame_definitions (const TimeFrameDefinitions &)
const TimeFrameDefinitions & get_time_frame_definitions () const
virtual void process_data () override
 This function does the actual work.
Public Member Functions inherited from stir::LmToProjDataAbstract
 ~LmToProjDataAbstract () override
 Destructor.
Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
ParsingObject & operator= (const ParsingObject &)
bool parse (std::istream &f)
bool parse (const char *const filename)
void ask_parameters ()
virtual std::string parameter_info ()

Protected Member Functions

void start_new_time_frame (const unsigned int new_frame_num) override
 will be called when a new time frame starts
void set_defaults () override
 Set defaults before parsing.
void initialise_keymap () override
 Initialise all keywords.
bool post_processing () override
 This will be called at the end of the parsing.
Protected Member Functions inherited from stir::LmToProjData
virtual void get_bin_from_event (Bin &bin, const ListEvent &) const
 will be called to get the bin for a coincidence event
int get_compression_count (const Bin &bin) const
 A function that should return the number of uncompressed bins in the current bin.
void do_post_normalisation (Bin &bin) const
 Computes a post-normalisation factor (if any) for this bin.
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.

Protected Attributes

shared_ptr< RigidObject3DMotion > ro3d_ptr
 motion information
bool reference_position_is_average_position_in_frame
 switch between constant reference position, or one for each frame
shared_ptr< AbsTimeInterval > _reference_abs_time_sptr
 constant reference position (if used)
Protected Attributes inherited from stir::LmToProjData
std::string input_filename
std::string output_filename_prefix
std::string template_proj_data_name
std::string frame_definition_filename
 frame definitions
bool do_pre_normalisation
bool store_prompts
bool store_delayeds
int num_segments_in_memory
int num_timing_poss_in_memory
long int num_events_to_store
int max_segment_num_to_process
bool interactive
 Toggle readable output on stdout or actual projdata.
shared_ptr< ProjDataInfo > template_proj_data_info_ptr
shared_ptr< BinNormalisation > normalisation_ptr
 This will be used for pre-normalisation.
shared_ptr< BinNormalisation > post_normalisation_ptr
 This will be used for post-normalisation.
shared_ptr< ProjData > output_proj_data_sptr
 This will be used to return the output directly, if set.
shared_ptr< ListModeData > lm_data_ptr
 Pointer to the actual data.
TimeFrameDefinitions frame_defs
 Time frames.
double current_time
 stores the time (in secs) recorded in the previous timing event
unsigned int current_frame_num
 stores the current frame number
shared_ptr< const ProjDataInfo > proj_data_info_cyl_uncompressed_ptr
 Internal variable that will be used for pre-normalisation.
bool do_time_frame
 variable that will be set according to if we are using time frames or num_events_to_store
int delayed_increment
 A variable that will be set to 1,0 or -1, according to store_prompts and store_delayeds.
bool _already_setup
 an internal bool variable to check if the object has been set-up or not
KeyParser parser

Detailed Description

Class for binning list mode files with motion correction.

Implements LOR repositioning during bining of list mode data into sinograms.

Member Function Documentation

◆ process_new_time_event()

void stir::LmToProjDataWithMC::process_new_time_event ( const ListTime & time_event)
overridevirtual

will be called after a new timing event is found in the file

Reimplemented from stir::LmToProjData.

References stir::compose(), stir::LmToProjData::current_time, process_new_time_event(), and ro3d_ptr.

Referenced by process_new_time_event().

◆ set_up()

◆ start_new_time_frame()

void stir::LmToProjDataWithMC::start_new_time_frame ( const unsigned int new_frame_num)
overrideprotectedvirtual

◆ set_defaults()

void stir::LmToProjDataWithMC::set_defaults ( )
overrideprotectedvirtual

◆ initialise_keymap()

void stir::LmToProjDataWithMC::initialise_keymap ( )
overrideprotectedvirtual

◆ post_processing()

bool stir::LmToProjDataWithMC::post_processing ( )
overrideprotectedvirtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::LmToProjData.

References stir::LmToProjData::post_processing(), and post_processing().

Referenced by post_processing().

Member Data Documentation

◆ ro3d_ptr

shared_ptr<RigidObject3DMotion> stir::LmToProjDataWithMC::ro3d_ptr
protected

◆ reference_position_is_average_position_in_frame

bool stir::LmToProjDataWithMC::reference_position_is_average_position_in_frame
protected

switch between constant reference position, or one for each frame

Referenced by initialise_keymap(), set_defaults(), set_up(), and start_new_time_frame().

◆ _reference_abs_time_sptr

shared_ptr<AbsTimeInterval> stir::LmToProjDataWithMC::_reference_abs_time_sptr
protected

constant reference position (if used)

Referenced by initialise_keymap(), set_defaults(), and set_up().


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