STIR  6.2.0
Bin.h
Go to the documentation of this file.
1 //
2 //
3 
17 /*
18  Copyright (C) 2000 PARAPET partners
19  Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
20  Copyright (C) 2016, University of Hull
21  Copyright (C) 2023, University College London
22  This file is part of STIR.
23 
24  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
25 
26  See STIR/LICENSE.txt for details
27 */
28 #ifndef __stir_Bin_H__
29 #define __stir_Bin_H__
30 
31 #include "stir/ViewgramIndices.h"
32 
33 START_NAMESPACE_STIR
48 class Bin : public ViewgramIndices
49 {
50  typedef ViewgramIndices base_type;
51 
52 public:
54  inline Bin();
55 
57  inline Bin(int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, float bin_value);
58 
60  inline Bin(int segment_num, int view_num, int axial_pos_num, int tangential_pos_num);
61 
62  inline Bin(int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, int timing_pos_num, float bin_value);
63 
65  inline Bin(int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, int timing_pos_num);
66 
68  inline int axial_pos_num() const;
70  inline int tangential_pos_num() const;
72  inline int time_frame_num() const;
73 
74  inline int& axial_pos_num();
75  inline int& tangential_pos_num();
76  inline int& time_frame_num();
77 
79  inline Bin get_empty_copy() const;
80 
82  inline float get_bin_value() const;
84  inline void set_bin_value(float v);
85 
87  inline Bin& operator+=(const float dx);
89  inline Bin& operator*=(const float dx);
93  inline Bin& operator/=(const float dx);
94 
96  inline bool operator==(const Bin&) const;
97  inline bool operator!=(const Bin&) const;
98 
99 private:
100  // shared_ptr<ProjDataInfo> proj_data_info_ptr;
101 
102  int axial_pos;
103  int tangential_pos;
104  float bin_value;
105  int time_frame;
106 };
107 
111 {
112  Bin my_bin;
113  float my_corr;
114 };
115 
116 END_NAMESPACE_STIR
117 
118 #include "stir/Bin.inl"
119 
120 #endif //__Bin_H__
A small bundle of a Bin and its additive correction value.
Definition: Bin.h:110
Implementations of inline functions of class stir::Bin.
Definition of class stir::ViewgramIndices.
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
A very simple class to store all dincies to get a (2D) Viewgram.
Definition: ViewgramIndices.h:32