STIR 6.4.0
SinglesRatesForTimeFrames.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
5 Copyright (C) 2021, University College London
6 This file is part of STIR.
7
8 SPDX-License-Identifier: Apache-2.0
9
10 See STIR/LICENSE.txt for details
11*/
20
21#ifndef __stir_data_SinglesRatesForTimeFrames_H__
22#define __stir_data_SinglesRatesForTimeFrames_H__
23
25#include "stir/Array.h"
27#include "stir/deprecated.h"
28START_NAMESPACE_STIR
29
35{
36public:
39
40 // SinglesRatesForTimeFrames(const TimeFrameDefinitions& time_frame_definitions,
41 // const shared_ptr<Scanner>& scanner_sptr);
42
44
46
49 float get_singles(int singles_bin_index, unsigned int frame_number) const;
50
59 float get_singles(const int singles_bin_index, const double start_time, const double end_time) const override;
60
62 // for a frame begining at start_time and ending at end_time.
63 FrameSinglesRates STIR_DEPRECATED get_rates_for_frame(double start_time, double end_time) const;
64
66
68 void set_singles(const int singles_bin_index, const unsigned time_frame_num, const float new_singles);
69
71 unsigned int get_num_frames() const;
72
75
76protected:
77 Array<2, float> _singles;
78 TimeFrameDefinitions _time_frame_defs;
79};
80
81END_NAMESPACE_STIR
82
83#endif
defines the stir::Array class for multi-dimensional (numeric) arrays
Declaration of class stir::SinglesRates.
Declaration of class stir::TimeFrameDefinitions.
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
A single frame of singles information.
Definition SinglesRates.h:46
SinglesRatesForTimeFrames()
Default constructor.
Definition SinglesRatesForTimeFrames.cxx:26
FrameSinglesRates STIR_DEPRECATED get_rates_for_frame(double start_time, double end_time) const
Generate a FramesSinglesRate - containing the average rates.
void set_singles(const int singles_bin_index, const unsigned time_frame_num, const float new_singles)
Set a singles rate by singles bin index and time frame number.
Definition SinglesRatesForTimeFrames.cxx:36
const TimeFrameDefinitions & get_time_frame_definitions() const
Get the time frame definitions.
Definition SinglesRatesForTimeFrames.cxx:58
float get_singles(int singles_bin_index, unsigned int frame_number) const
get the singles for a particular singles unit and frame number.
Definition SinglesRatesForTimeFrames.cxx:30
unsigned int get_num_frames() const
Get the number of frames for which singles rates are recorded.
Definition SinglesRatesForTimeFrames.cxx:52
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 ...
Class used for storing time frame durations.
Definition TimeFrameDefinitions.h:39
This file declares a deprecation macro.
#define STIR_DEPRECATED
Deprecation macro.
Definition deprecated.h:21