|
STIR 6.5.0
|
A class for singles that are recorded at equal time intervals. More...
#include "stir/data/SinglesRatesForTimeSlices.h"

Public Member Functions | |
| SinglesRatesForTimeSlices () | |
| Default constructor. | |
| float | get_singles (const int singles_bin_index, const double start_time, const double end_time) const override |
| Get the number of singles for a particular singles unit and a frame with the specified start and end times. | |
| FrameSinglesRates STIR_DEPRECATED | get_rates_for_frame (double start_time, double end_time) const |
| Generate a FramesSinglesRate - containing the average rates. | |
| virtual int | get_end_time_slice_index (double t) const |
| virtual int | get_start_time_slice_index (double t) const |
| void | set_singles (int singles_bin_index, int time_slice, int new_singles) |
| Set a singles by singles bin index and time slice. | |
| int | rebin (std::vector< double > &new_end_times) |
| Rebin the sgl slices into a different set of consecutive slices. | |
| std::vector< double > | get_times () const |
| Get the vector of time values for each time slice index. | |
| int | get_num_time_slices () const |
| Return the number of time slices. | |
| double | get_singles_time_interval () const |
| Return the time interval per slice of singles data. | |
| TimeFrameDefinitions | get_time_frame_definitions () const |
| return time-intervals for every slice | |
| Public Member Functions inherited from stir::SinglesRates | |
| 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_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 Scanner * | get_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 &) | |
| 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 | set_time_interval () |
| Calculate and set _singles_time_interval from _times. | |
| double | get_slice_start_time (int slice_index) const |
| get slice start time. | |
| 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. | |
Protected Attributes | |
| Array< 2, int > | _singles |
| total singles per time slice and singles-bin | |
| std::vector< double > | _times |
| end times of each time slice (in secs) | |
| int | _num_time_slices |
| double | _singles_time_interval |
| time interval in secs | |
| Protected Attributes inherited from stir::SinglesRates | |
| shared_ptr< Scanner > | scanner_sptr |
| Generate a FramesSinglesRate - containing the average rates. | |
| KeyParser | parser |
Additional Inherited Members | |
| Static Public Member Functions inherited from stir::RegisteredObject< SinglesRates > | |
| static SinglesRates * | read_registered_object (std::istream *in, const std::string ®istered_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 SinglesRates * | ask_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_less > | RegistryType |
| The type of the registry. | |
| Static Protected Member Functions inherited from stir::RegisteredObject< SinglesRates > | |
| static RegistryType & | registry () |
| Static function returning the registry. | |
A class for singles that are recorded at equal time intervals.
| stir::SinglesRatesForTimeSlices::SinglesRatesForTimeSlices | ( | ) |
Default constructor.
References SinglesRatesForTimeSlices().
Referenced by SinglesRatesForTimeSlices().
|
overridevirtual |
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.
Implements stir::SinglesRates.
References _singles, _times, stir::error(), get_singles(), and get_slice_start_time().
Referenced by get_singles(), and rebin().
| FrameSinglesRates stir::SinglesRatesForTimeSlices::get_rates_for_frame | ( | double | start_time, |
| double | end_time ) const |
Generate a FramesSinglesRate - containing the average rates.
References _times, get_rates_for_frame(), stir::SinglesRates::get_singles_rate(), get_slice_start_time(), and stir::SinglesRates::scanner_sptr.
Referenced by get_rates_for_frame().
| void stir::SinglesRatesForTimeSlices::set_singles | ( | int | singles_bin_index, |
| int | time_slice, | ||
| int | new_singles ) |
Set a singles by singles bin index and time slice.
References _singles, stir::SinglesRates::scanner_sptr, and set_singles().
Referenced by set_singles().
| int stir::SinglesRatesForTimeSlices::rebin | ( | std::vector< double > & | new_end_times | ) |
Rebin the sgl slices into a different set of consecutive slices.
References _singles, _times, get_singles(), get_slice_start_time(), rebin(), stir::round(), and stir::SinglesRates::scanner_sptr.
Referenced by rebin().
| std::vector< double > stir::SinglesRatesForTimeSlices::get_times | ( | ) | const |
Get the vector of time values for each time slice index.
References _times, and get_times().
Referenced by get_times().
| int stir::SinglesRatesForTimeSlices::get_num_time_slices | ( | ) | const |
Return the number of time slices.
References get_num_time_slices().
Referenced by get_num_time_slices(), and get_time_frame_definitions().
| double stir::SinglesRatesForTimeSlices::get_singles_time_interval | ( | ) | const |
Return the time interval per slice of singles data.
References _singles_time_interval, and get_singles_time_interval().
Referenced by get_singles_time_interval().
| TimeFrameDefinitions stir::SinglesRatesForTimeSlices::get_time_frame_definitions | ( | ) | const |
return time-intervals for every slice
References _times, get_num_time_slices(), get_slice_start_time(), and get_time_frame_definitions().
Referenced by get_time_frame_definitions().
|
protected |
Calculate and set _singles_time_interval from _times.
References _singles_time_interval, _times, and set_time_interval().
Referenced by set_time_interval().
|
protected |
get slice start time.
References _singles_time_interval, _times, and get_slice_start_time().
Referenced by get_rates_for_frame(), get_singles(), get_slice_start_time(), get_time_frame_definitions(), and rebin().
|
protected |
total singles per time slice and singles-bin
Indexed by time slice and singles bin index.
Referenced by get_singles(), stir::ecat::ecat7::SinglesRatesFromSglFile::read_singles_from_sgl_file(), rebin(), set_singles(), and stir::ecat::ecat7::SinglesRatesFromSglFile::write().
|
protected |
end times of each time slice (in secs)
expected to use equidistant sampling
Referenced by get_rates_for_frame(), get_singles(), get_slice_start_time(), get_time_frame_definitions(), get_times(), stir::ecat::ecat7::SinglesRatesFromSglFile::read_singles_from_sgl_file(), rebin(), set_time_interval(), and stir::ecat::ecat7::SinglesRatesFromSglFile::write().
|
protected |
time interval in secs
Referenced by get_singles_time_interval(), get_slice_start_time(), stir::ecat::ecat7::SinglesRatesFromSglFile::read_singles_from_sgl_file(), and set_time_interval().