STIR 6.4.0
recon_array_functions.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000 PARAPET partners
5 Copyright (C) 2000- 2008, Hammersmith Imanet Ltd
6 This file is part of STIR.
7
8 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
9
10 See STIR/LICENSE.txt for details
11*/
12
13#ifndef __stir_recon_array_functions_h_
14#define __stir_recon_array_functions_h_
15
27
28#include "stir/deprecated.h"
29
30START_NAMESPACE_STIR
31
32// TODO template this all in data type of Viewgram et al
33
34template <typename elemT>
35class SegmentByView;
36template <typename elemT>
37class SegmentBySinogram;
38template <typename elemT>
39class Viewgram;
40template <typename elemT>
41class RelatedViewgrams;
42template <int num_dimensions, typename elemT>
43class DiscretisedDensity;
44
45#if 0
47void multiply_and_add(DiscretisedDensity<3,float> &image_res, const DiscretisedDensity<3,float> &image_scaled, float scalar);
48#endif
49
51float neg_trunc(float x);
52
53// MJ 17/05/2000 disabled
54// gives 1 if negative, 0 otherwise
55// float neg_indicate(float x){return (x<=0.0)?1.0:0.0;}
56
57#if 0
59
62void threshold_min_to_small_positive_value_and_truncate_rim(DiscretisedDensity<3,float>& input_image, const int rim_truncation_image=0);
63
65void divide_and_truncate(DiscretisedDensity<3,float>& numerator,
66 const DiscretisedDensity<3,float>& denominator,
67 const int rim_truncation,
68 int & count);
69#endif
70
72void divide_and_truncate(Viewgram<float>& numerator,
73 const Viewgram<float>& denominator,
74 const int rim_truncation_sino,
75 int& count,
76 int& count2,
77 double* f = NULL);
78
80void divide_and_truncate(RelatedViewgrams<float>& numerator,
81 const RelatedViewgrams<float>& denominator,
82 const int rim_truncation_sino,
83 int& count,
84 int& count2,
85 double* f = NULL);
86
88void truncate_rim(DiscretisedDensity<3, float>& image_input,
89 const int rim_truncation_image,
90 const bool strictly_less_than_radius = true);
91
93void truncate_rim(SegmentByView<float>& seg, const int rim_truncation_sino);
94
96void truncate_rim(Viewgram<float>& viewgram, const int rim_truncation_sino);
97
98#if STIR_VERSION < 070000
100STIR_DEPRECATED void truncate_end_planes(DiscretisedDensity<3, float>& input_image, int input_num_planes = 1);
101#endif
102
104void divide_array(SegmentByView<float>& numerator, const SegmentByView<float>& denominator);
105
107void divide_array(DiscretisedDensity<3, float>& numerator, const DiscretisedDensity<3, float>& denominator);
108
109// MJ 03/01/2000 Trying to adhoc parallelize a loglikelihood computation
110
112void accumulate_loglikelihood(Viewgram<float>& projection_data,
113 const Viewgram<float>& estimated_projections,
114 const int rim_truncation_sino,
115 double* accum);
116
117END_NAMESPACE_STIR
118#endif // __recon_array_functions_h_
This file declares a deprecation macro.
#define STIR_DEPRECATED
Deprecation macro.
Definition deprecated.h:21
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
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 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:404
float neg_trunc(float x)
truncates negative values to zero
Definition recon_array_functions.cxx:396