13 #ifndef __stir_recon_array_functions_h_ 14 #define __stir_recon_array_functions_h_ 34 template <
typename elemT>
36 template <
typename elemT>
37 class SegmentBySinogram;
38 template <
typename elemT>
40 template <
typename elemT>
41 class RelatedViewgrams;
42 template <
int num_dimensions,
typename elemT>
43 class DiscretisedDensity;
46 void multiply_and_add(DiscretisedDensity<3,float> &image_res,
const DiscretisedDensity<3,float> &image_scaled,
float scalar);
62 void threshold_min_to_small_positive_value_and_truncate_rim(DiscretisedDensity<3,float>& input_image,
const int rim_truncation_image=0);
66 const DiscretisedDensity<3,float>& denominator,
67 const int rim_truncation,
73 const Viewgram<float>& denominator,
74 const int rim_truncation_sino,
81 const RelatedViewgrams<float>& denominator,
82 const int rim_truncation_sino,
88 void truncate_rim(DiscretisedDensity<3, float>& image_input,
89 const int rim_truncation_image,
90 const bool strictly_less_than_radius =
true);
93 void truncate_rim(SegmentByView<float>& seg,
const int rim_truncation_sino);
96 void truncate_rim(Viewgram<float>& viewgram,
const int rim_truncation_sino);
99 void truncate_end_planes(DiscretisedDensity<3, float>& input_image,
int input_num_planes = 1);
102 void divide_array(SegmentByView<float>& numerator,
const SegmentByView<float>& denominator);
105 void divide_array(DiscretisedDensity<3, float>& numerator,
const DiscretisedDensity<3, float>& denominator);
111 const Viewgram<float>& estimated_projections,
112 const int rim_truncation_sino,
116 #endif // __recon_array_functions_h_ float neg_trunc(float x)
truncates negative values to zero
Definition: recon_array_functions.cxx:396
void truncate_rim(Viewgram< float > &viewgram, const int rim_truncation_sino)
sets the first and last rim_truncation_sino bins at the 'edges' to zero
Definition: recon_array_functions.cxx:48
void truncate_end_planes(DiscretisedDensity< 3, float > &input_image, int input_num_planes)
sets the end planes of the image to zero
Definition: recon_array_functions.cxx:403
void divide_array(SegmentByView< float > &numerator, const SegmentByView< float > &denominator)
simple division of two sinograms, x/0 = 0
Definition: recon_array_functions.cxx:289
void divide_and_truncate(Viewgram< float > &numerator, const Viewgram< float > &denominator, const int rim_truncation_sino, int &count, int &count2, double *log_likelihood_ptr)
divide viewgrams and set 'edge bins' to zero, put answer in numerator
Definition: recon_array_functions.cxx:172
basic configuration include file
void accumulate_loglikelihood(Viewgram< float > &projection_data, const Viewgram< float > &estimated_projections, const int rim_truncation_sino, double *accum)
compute the log term of the loglikelihood function for given part of the projection space ...
Definition: recon_array_functions.cxx:336