22#ifndef __stir_data_SinglesRates_H__
23#define __stir_data_SinglesRates_H__
35class TimeFrameDefinitions;
49 typedef std::vector<float>::iterator iterator;
50 typedef std::vector<float>::const_iterator const_iterator;
55 FrameSinglesRates(std::vector<float>& avg_singles_rates,
double start_time,
double end_time, shared_ptr<Scanner> scanner);
74 const_iterator begin()
const {
return this->_singles.begin(); }
78 const_iterator end()
const {
return this->_singles.end(); }
80 iterator end() {
return this->_singles.end(); }
83 double get_start_time()
const;
86 double get_end_time()
const;
89 inline const Scanner* get_scanner_ptr()
const;
94 std::vector<float> _singles;
97 shared_ptr<Scanner> _scanner_sptr;
123 virtual float get_singles_rate(
const int singles_bin_index,
const double start_time,
const double end_time)
const;
130 virtual float get_singles(
const int singles_bin_index,
const double start_time,
const double end_time)
const = 0;
162 get_time_frame_definitions()
const = 0;
Declaration of class stir::DetectionPosition.
Declaration of class stiir::RegisteredObject.
Declaration of class stir::Scanner.
Implementation of class stir::SinglesRates.
A class for storing coordinates of a detection.
Definition DetectionPosition.h:61
FrameSinglesRates(std::vector< float > &avg_singles_rates, double start_time, double end_time, shared_ptr< Scanner > scanner)
Constructor taking all arguments.
Definition SinglesRates.cxx:30
float get_singles_rate(int singles_bin_index) const
Get singles rate for a particular singles bin index.
Definition SinglesRates.cxx:43
FrameSinglesRates(double start_time, double end_time, shared_ptr< Scanner > scanner)
Constructor without singles rates.
A class for storing some info on the scanner.
Definition Scanner.h:108
The base-class for using singles info.
Definition SinglesRates.h:113
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 ...
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...
Definition SinglesRates.cxx:69
shared_ptr< Scanner > scanner_sptr
Generate a FramesSinglesRate - containing the average rates.
Definition SinglesRates.h:166
const Scanner * get_scanner_ptr() const
Get the scanner pointer.
Definition SinglesRates.inl:23
Class used for storing time frame durations.
Definition TimeFrameDefinitions.h:39
iterator begin()
use to initialise an iterator to the first element of the vector
Definition VectorWithOffset.inl:190
This file declares a deprecation macro.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...