20 #ifndef __RelatedViewgrams_h__ 21 #define __RelatedViewgrams_h__ 39 template <
typename elemT>
40 class RelatedViewgrams
46 typedef RelatedViewgrams<elemT> self_type;
51 typedef std::random_access_iterator_tag iterator_category;
52 typedef Viewgram<elemT> value_type;
53 typedef value_type& reference;
54 typedef const value_type& const_reference;
55 typedef std::ptrdiff_t difference_type;
56 typedef std::size_t size_type;
58 typedef typename std::vector<Viewgram<elemT>>::iterator iterator;
59 typedef typename std::vector<Viewgram<elemT>>::const_iterator const_iterator;
65 inline RelatedViewgrams();
72 inline RelatedViewgrams(
const std::vector<Viewgram<elemT>>& viewgrams,
73 const shared_ptr<DataSymmetriesForViewSegmentNumbers>& symmetries_used);
79 inline int get_basic_view_num()
const;
82 inline int get_basic_segment_num()
const;
85 inline int get_basic_timing_pos_num()
const;
88 inline ViewgramIndices get_basic_view_segment_num()
const;
91 inline ViewgramIndices get_basic_viewgram_indices()
const;
94 inline int get_num_viewgrams()
const;
95 inline int get_num_axial_poss()
const;
96 inline int get_num_tangential_poss()
const;
97 inline int get_min_axial_pos_num()
const;
98 inline int get_max_axial_pos_num()
const;
99 inline int get_min_tangential_pos_num()
const;
100 inline int get_max_tangential_pos_num()
const;
103 inline shared_ptr<const ProjDataInfo> get_proj_data_info_sptr()
const;
105 inline const DataSymmetriesForViewSegmentNumbers* get_symmetries_ptr()
const;
108 inline shared_ptr<DataSymmetriesForViewSegmentNumbers> get_symmetries_sptr()
const;
112 void grow(
const IndexRange<2>& range);
120 inline iterator begin();
122 inline iterator end();
124 inline const_iterator begin()
const;
126 inline const_iterator end()
const;
131 RelatedViewgrams& operator*=(
const elemT);
133 RelatedViewgrams& operator/=(
const elemT);
135 RelatedViewgrams& operator+=(
const elemT);
137 RelatedViewgrams& operator-=(
const elemT);
140 RelatedViewgrams& operator*=(
const RelatedViewgrams<elemT>&);
142 RelatedViewgrams& operator/=(
const RelatedViewgrams<elemT>&);
144 RelatedViewgrams& operator+=(
const RelatedViewgrams<elemT>&);
146 RelatedViewgrams& operator-=(
const RelatedViewgrams<elemT>&);
151 elemT find_max()
const;
153 elemT find_min()
const;
155 void fill(
const elemT& n);
160 RelatedViewgrams get_empty_copy()
const;
168 bool has_same_characteristics(self_type
const&, std::string& explanation)
const;
173 bool has_same_characteristics(self_type
const&)
const;
180 bool operator==(
const self_type&)
const;
183 bool operator!=(
const self_type&)
const;
187 friend class ProjData;
188 friend class ProjDataInfo;
191 std::vector<Viewgram<elemT>> viewgrams;
192 shared_ptr<DataSymmetriesForViewSegmentNumbers> symmetries_used;
196 inline void check_state()
const;
199 void debug_check_state()
const;
206 #endif // __RelatedViewgrams_h__ Declaration of class stir::DataSymmetriesForViewSegmentNumbers.
Declaration of class stir::Viewgram.