20 #ifndef __stir_ProjDataInMemory_H__ 21 #define __stir_ProjDataInMemory_H__ 56 shared_ptr<const ProjDataInfo>
const& proj_data_info_ptr,
57 const bool initialise_with_0 =
true);
66 const int segment_num,
67 const bool make_num_tangential_poss_odd =
false,
68 const int timing_pos = 0)
const override;
72 const int segment_num,
73 const bool make_num_tangential_poss_odd =
false,
74 const int timing_pos = 0)
const override;
81 SegmentByView<float> get_segment_by_view(
const int segment_num,
const int timing_pos = 0)
const override;
90 void fill(
const float value)
override;
103 float get_bin_value(
Bin& bin);
105 void set_bin_value(
const Bin& bin);
110 float sum()
const override;
113 float find_max()
const override;
116 float find_min()
const override;
119 double norm()
const override;
125 self_type operator+(
const self_type& iv)
const;
128 self_type operator-(
const self_type& iv)
const;
131 self_type operator*(
const self_type& iv)
const;
134 self_type operator/(
const self_type& iv)
const;
137 self_type operator+(
const float a)
const;
140 self_type operator-(
const float a)
const;
143 self_type operator*(
const float a)
const;
146 self_type operator/(
const float a)
const;
151 self_type& operator+=(
const base_type& v)
override;
154 self_type& operator-=(
const base_type& v)
override;
157 self_type& operator*=(
const base_type& v)
override;
160 self_type& operator/=(
const base_type& v)
override;
163 self_type& operator+=(
const float v)
override;
166 self_type& operator-=(
const float v)
override;
169 self_type& operator*=(
const float v)
override;
172 self_type& operator/=(
const float v)
override;
180 void xapyb(
const ProjData& x,
const float a,
const ProjData& y,
const float b)
override;
190 void sapyb(
const float a,
const ProjData& y,
const float b)
override;
211 return buffer.begin();
216 return buffer.begin();
224 const_iterator
end()
const 231 return buffer.begin_all();
236 return buffer.begin_all();
241 return buffer.end_all();
246 return buffer.end_all();
251 float* get_data_ptr()
254 return buffer.get_data_ptr();
260 return buffer.get_const_data_ptr();
266 buffer.release_data_ptr();
272 buffer.release_const_data_ptr();
280 void create_buffer(
const bool initialise_with_0 =
false);
282 std::streamoff offset;
284 std::streamoff offset_3d_data;
287 std::vector<int> segment_sequence;
289 std::vector<int> timing_poss_sequence;
293 std::streamoff get_index(
const Bin&)
const;
A class which reads/writes projection data from/to memory.
Definition: ProjDataInMemory.h:38
#define STIR_DEPRECATED
Deprecation macro.
Definition: deprecated.h:19
A class for 2d projection data.
Definition: FBP3DRPReconstruction.h:39
iterator begin_all()
start value for iterating through all elements in the array, see iterator
Definition: ProjDataInMemory.h:229
iterator begin()
start value for iterating through all elements in the array, see iterator
Definition: ProjDataInMemory.h:209
const float * get_const_data_ptr() const
member function for access to the data via a const float*
Definition: ProjDataInMemory.h:258
A class for storing (3d) projection data with fixed SegmentIndices.
Definition: FBP3DRPReconstruction.h:41
double norm_squared() const override
return L2-norm squared (sum of squares)
Definition: ProjDataInMemory.cxx:390
const_iterator begin() const
start value for iterating through all elements in the (const) array, see iterator ...
Definition: ProjDataInMemory.h:214
Declaration of class stir::ProjData.
double norm() const override
return L2-norm (sqrt of sum of squares)
Definition: ProjDataInMemory.cxx:384
defines the Array class for multi-dimensional (numeric) arrays
A class for storing (3d) projection data with fixed SegmentIndices.
Definition: ArcCorrection.h:40
const_iterator begin_all() const
start value for iterating through all elements in the (const) array, see iterator ...
Definition: ProjDataInMemory.h:234
double norm_squared(const BasicCoordinate< num_dimensions, coordT > &p1)
compute (inner_product(p1,p1))
Definition: BasicCoordinate.inl:415
void release_data_ptr()
signal end of access to float*
Definition: ProjDataInMemory.h:264
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
const_iterator end_all() const
end value for iterating through all elements in the (const) array, see iterator
Definition: ProjDataInMemory.h:244
void release_const_data_ptr() const
signal end of access to const float*
Definition: ProjDataInMemory.h:270
iterator end()
end value for iterating through all elements in the array, see iterator
Definition: ProjDataInMemory.h:219
double norm(const BasicCoordinate< num_dimensions, coordT > &p1)
compute sqrt(inner_product(p1,p1))
Definition: BasicCoordinate.inl:426
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:73
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
const_iterator end() const
end value for iterating through all elements in the (const) array, see iterator
Definition: ProjDataInMemory.h:224
elemT sum(IterT start, IterT end, elemT init)
Compute the sum of a sequence using operator+=(), using an initial value.
Definition: more_algorithms.inl:52
The (abstract) base class for the projection data.
Definition: ProjData.h:103
iterator end_all()
end value for iterating through all elements in the array, see iterator
Definition: ProjDataInMemory.h:239