STIR 6.4.0
stir::SinglesRates Class Referenceabstract

The base-class for using singles info. More...

#include "stir/data/SinglesRates.h"

Inheritance diagram for stir::SinglesRates:

Public Member Functions

virtual float get_singles_rate (const int singles_bin_index, const double start_time, const double end_time) const
 Get the (average) singles rate for a particular singles unit and a frame with the specified start and end times.
 
virtual float get_singles (const int singles_bin_index, const double start_time, const double end_time) const =0
 Get the number of singles for a particular singles unit and a frame with the specified start and end times.
 
virtual float get_singles_rate (const DetectionPosition<> &det_pos, const double start_time, const double end_time) const
 Virtual function that returns the average singles rate given the detection positions and time-interval of detection.
 
virtual float get_singles (const DetectionPosition<> &det_pos, const double start_time, const double end_time) const
 Virtual function that returns the number of singles given the detection positions and time-interval of detection.
 
const Scannerget_scanner_ptr () const
 Get the scanner pointer.
 
- Public Member Functions inherited from stir::RegisteredObjectBase
virtual std::string get_registered_name () const =0
 Returns the name of the type of the object.
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
void ask_parameters ()
 
virtual std::string parameter_info ()
 

Protected Attributes

shared_ptr< Scannerscanner_sptr
 Generate a FramesSinglesRate - containing the average rates.
 
KeyParser parser
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredObject< SinglesRates >
static SinglesRatesread_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
 
static SinglesRatesask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
 
- Protected Types inherited from stir::RegisteredObject< SinglesRates >
typedef SinglesRates *(* RootFactory) (std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
 
typedef FactoryRegistry< std::string, RootFactory, interfile_lessRegistryType
 The type of the registry.
 
virtual void set_defaults ()
 Set defaults before parsing.
 
virtual void initialise_keymap ()
 Initialise all keywords.
 
virtual bool post_processing ()
 This will be called at the end of the parsing.
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< SinglesRates >
static RegistryTyperegistry ()
 Static function returning the registry.
 

Detailed Description

The base-class for using singles info.

Singles in PET are photons detected by a single detector. In PET they are useful to estimate dead-time or randoms.

This class allows to get the singles-counts during an acquisition. There will be 1 per singles unit. See Scanner for some more info.

Member Function Documentation

◆ get_singles_rate() [1/2]

float stir::SinglesRates::get_singles_rate ( const int singles_bin_index,
const double start_time,
const double end_time ) const
virtual

Get the (average) singles rate for a particular singles unit and a frame with the specified start and end times.

The behaviour of this function is specified by the derived classes.

Warning
Currently might return -1 if the start_time, end_time are invalid (e.g. out of the measured range).

Default implementation uses get_singles(...)/(end_time-start_time).

References get_singles().

Referenced by stir::SinglesRatesForTimeSlices::get_rates_for_frame(), get_singles(), and get_singles_rate().

◆ get_singles() [1/2]

virtual float stir::SinglesRates::get_singles ( const int singles_bin_index,
const double start_time,
const double end_time ) const
pure virtual

Get the number of singles for a particular singles unit and a frame with the specified start and end times.

The behaviour of this function is specified by the derived classes.

Warning
Currently might return -1 if the start_time, end_time are invalid (e.g. out of the measured range).

Implemented in stir::SinglesRatesForTimeFrames, and stir::SinglesRatesForTimeSlices.

References get_scanner_ptr(), get_singles(), and get_singles_rate().

Referenced by get_singles(), get_singles(), get_singles_rate(), and stir::randoms_from_singles().

◆ get_singles_rate() [2/2]

float stir::SinglesRates::get_singles_rate ( const DetectionPosition<> & det_pos,
const double start_time,
const double end_time ) const
virtual

Virtual function that returns the average singles rate given the detection positions and time-interval of detection.

The behaviour of this function is specified by the derived classes.

Warning
Currently might return -1 if the start_time, end_time are invalid (e.g. out of the measured range).

Default implementation uses Scanner::get_singles_bin_index() and get_singles_rate(int,double,double).

References get_singles_rate(), and scanner_sptr.

◆ get_singles() [2/2]

float stir::SinglesRates::get_singles ( const DetectionPosition<> & det_pos,
const double start_time,
const double end_time ) const
virtual

Virtual function that returns the number of singles given the detection positions and time-interval of detection.

The behaviour of this function is specified by the derived classes.

Warning
Currently might return -1 if the start_time, end_time are invalid (e.g. out of the measured range).

Default implementation uses Scanner::get_singles_bin_index() and get_singles(int,double,double).

Reimplemented in stir::SinglesRatesForTimeFrames.

References get_singles(), and scanner_sptr.


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