STIR  6.3.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 STIR_COMPILING_SWIG_WRAPPER
51  // SWIG needs the next typedef to be public
52 public:
53 #endif
54  typedef Sinogram<elemT> self_type;
55 
56 public:
58  inline Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
59 
61  inline Sinogram(const Array<2, elemT>& p, const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
62 
64 
67  inline Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
68  const int ax_pos_num,
69  const int segment_num,
70  const int timing_pos_num = 0);
71 
73 
76  inline Sinogram(const Array<2, elemT>& p,
77  const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
78  const int ax_pos_num,
79  const int segment_num,
80  const int timing_pos_num = 0);
81 
83  inline SinogramIndices get_sinogram_indices() const;
85  inline int get_segment_num() const;
87  inline int get_axial_pos_num() const;
89  inline int get_timing_pos_num() const;
91  inline int get_min_view_num() const;
93  inline int get_max_view_num() const;
95  inline int get_num_views() const;
97  inline int get_min_tangential_pos_num() const;
99  inline int get_max_tangential_pos_num() const;
101  inline int get_num_tangential_poss() const;
102 
104  inline Sinogram get_empty_copy(void) const;
105 
107  void grow(const IndexRange<2>& range) override;
109  void resize(const IndexRange<2>& range) override;
110 
112  inline shared_ptr<const ProjDataInfo> get_proj_data_info_sptr() const;
113 
114  // inline Sinogram operator = (const Sinogram &s) const;
115 
117 
118 
122  bool has_same_characteristics(self_type const&, std::string& explanation) const;
123 
125 
127  bool has_same_characteristics(self_type const&) const;
128 
130 
134  bool operator==(const self_type&) const;
135 
137  bool operator!=(const self_type&) const;
139 
140 private:
141  shared_ptr<const ProjDataInfo> proj_data_info_ptr;
142  SinogramIndices _indices;
143 };
144 
145 END_NAMESPACE_STIR
146 
147 #include "stir/Sinogram.inl"
148 
149 #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 into the stir names...
defines the stir::Array class for multi-dimensional (numeric) arrays
Implementations of inline functions of class stir::Sinogram.