STIR  6.2.0
SegmentBySinogram.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000 PARAPET partners
5  Copyright (C) 2000- 2012, Hammersmith Imanet Ltd
6  Copyright (C) 2023, University College London
7  This file is part of STIR.
8 
9  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
10 
11  See STIR/LICENSE.txt for details
12 */
27 #ifndef __SegmentBySinogram_H__
28 #define __SegmentBySinogram_H__
29 
30 #include "stir/Segment.h"
31 #include "stir/Array.h"
32 #include "stir/Sinogram.h"
33 
34 START_NAMESPACE_STIR
35 
36 // forward declaration for use in convertion
37 template <typename elemT>
38 class SegmentByView;
39 
49 template <typename elemT>
50 class SegmentBySinogram : public Segment<elemT>, public Array<3, elemT>
51 {
52 private:
53  typedef SegmentBySinogram<elemT> self_type;
54 
55 public:
57  typedef typename Segment<elemT>::StorageOrder StorageOrder;
58 
61  const shared_ptr<const ProjDataInfo>& proj_data_info_ptr_v,
62  const SegmentIndices& ind);
63 
65  SegmentBySinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr_v, const SegmentIndices& ind);
66 
68 
72  const shared_ptr<const ProjDataInfo>& proj_data_info_ptr_v,
73  const int segment_num,
74  const int timing_pos_num = 0);
75 
77 
80  SegmentBySinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr_v,
81  const int segment_num,
82  const int timing_pos_num = 0);
83 
87  inline StorageOrder get_storage_order() const override;
89  inline int get_num_axial_poss() const override;
91  inline int get_num_views() const override;
93  inline int get_num_tangential_poss() const override;
95  inline int get_min_axial_pos_num() const override;
97  inline int get_max_axial_pos_num() const override;
99  inline int get_min_view_num() const override;
101  inline int get_max_view_num() const override;
103  inline int get_min_tangential_pos_num() const override;
105  inline int get_max_tangential_pos_num() const override;
109  inline Sinogram<elemT> get_sinogram(int axial_pos_num) const override;
111  Viewgram<elemT> get_viewgram(int view_num) const override;
113  void set_viewgram(const Viewgram<elemT>&) override;
115  inline void set_sinogram(Sinogram<elemT> const& s, int axial_pos_num) override;
116  inline void set_sinogram(const Sinogram<elemT>& s) override;
117 
119  void grow(const IndexRange<3>& range) override;
121  void resize(const IndexRange<3>& range) override;
122 
123  bool operator==(const Segment<elemT>&) const override;
124 };
125 
126 END_NAMESPACE_STIR
127 
129 #endif
A class for 2d projection data.
Definition: FBP3DRPReconstruction.h:39
Implementations of inline functions of class stir::SegmentBySinogram.
A very simple class to store segment numbers and any other indices that define a segment.
Definition: SegmentIndices.h:33
Segment< elemT >::StorageOrder StorageOrder
typedef such that we do not need to have typename wherever we StorageOrder
Definition: SegmentBySinogram.h:57
A class for storing (3d) projection data with fixed SegmentIndices.
Definition: FBP3DRPReconstruction.h:41
Declaration of class stir::Segment.
Declaration of class stir::Sinogram.
defines the Array class for multi-dimensional (numeric) arrays
A class for storing (3d) projection data with fixed SegmentIndices.
Definition: ArcCorrection.h:40
An (abstract base) class for storing 3d projection dataThis stores a subset of the data accessible vi...
Definition: Segment.h:50
A class for 2d projection data.
Definition: ArcCorrection.h:34