STIR  6.2.0
Sinogram.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000 PARAPET partners
5  Copyright (C) 2000 - 2007-10-08, Hammersmith Imanet Ltd
6  Copyright (C) 2011-07-01 - 2012, Kris Thielemans
7  Copyright (C) 2023, University College London
8  This file is part of STIR.
9 
10  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
11 
12  See STIR/LICENSE.txt for details
13 */
27 #ifndef __Sinogram_h__
28 #define __Sinogram_h__
29 
30 #include "stir/Array.h"
31 #include "stir/ProjDataInfo.h"
32 #include "stir/SinogramIndices.h"
33 #include "stir/shared_ptr.h"
34 
35 START_NAMESPACE_STIR
36 
45 template <typename elemT>
46 class Sinogram : public Array<2, elemT>
47 {
48 private:
49  typedef Array<2, elemT> base_type;
50 #ifdef SWIG
51  // SWIG needs the next typedef to be public
52 public:
53 #endif
54  typedef Sinogram<elemT> self_type;
55 #ifdef SWIG
56  // SWIG needs a default constructor
57  inline Sinogram() {}
58 #endif
59 
60 public:
62  inline Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
63 
65  inline Sinogram(const Array<2, elemT>& p, const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
66 
68 
71  inline Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
72  const int ax_pos_num,
73  const int segment_num,
74  const int timing_pos_num = 0);
75 
77 
80  inline Sinogram(const Array<2, elemT>& p,
81  const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
82  const int ax_pos_num,
83  const int segment_num,
84  const int timing_pos_num = 0);
85 
87  inline SinogramIndices get_sinogram_indices() const;
89  inline int get_segment_num() const;
91  inline int get_axial_pos_num() const;
93  inline int get_timing_pos_num() const;
95  inline int get_min_view_num() const;
97  inline int get_max_view_num() const;
99  inline int get_num_views() const;
101  inline int get_min_tangential_pos_num() const;
103  inline int get_max_tangential_pos_num() const;
105  inline int get_num_tangential_poss() const;
106 
108  inline Sinogram get_empty_copy(void) const;
109 
111  void grow(const IndexRange<2>& range) override;
113  void resize(const IndexRange<2>& range) override;
114 
116  inline shared_ptr<const ProjDataInfo> get_proj_data_info_sptr() const;
117 
118  // inline Sinogram operator = (const Sinogram &s) const;
119 
121 
122 
126  bool has_same_characteristics(self_type const&, std::string& explanation) const;
127 
129 
131  bool has_same_characteristics(self_type const&) const;
132 
134 
138  bool operator==(const self_type&) const;
139 
141  bool operator!=(const self_type&) const;
143 
144 private:
145  shared_ptr<const ProjDataInfo> proj_data_info_ptr;
146  SinogramIndices _indices;
147 };
148 
149 END_NAMESPACE_STIR
150 
151 #include "stir/Sinogram.inl"
152 
153 #endif
Declaration of class stir::ProjDataInfo.
Definition of class stir::SinogramIndices.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
defines the Array class for multi-dimensional (numeric) arrays
Implementations of inline functions of class stir::Sinogram.