STIR  6.2.0
PostsmoothingForwardProjectorByBin.h
Go to the documentation of this file.
1 //
2 //
13 /*
14  Copyright (C) 2000- 2001, IRSL
15  Copyright (C) 2019, University College London
16  See STIR/LICENSE.txt for details
17 */
18 #ifndef __stir_recon_buildblock_PostsmoothingForwardProjectorByBin__H__
19 #define __stir_recon_buildblock_PostsmoothingForwardProjectorByBin__H__
20 
23 #include "stir/shared_ptr.h"
24 #include "stir/VectorWithOffset.h"
25 
26 START_NAMESPACE_STIR
27 
28 template <typename elemT>
29 class Viewgram;
30 
36  : public RegisteredParsingObject<PostsmoothingForwardProjectorByBin, ForwardProjectorByBin>
37 {
38 public:
40  static const char* const registered_name;
41 
44 
46 
48  void set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
49  const shared_ptr<const DiscretisedDensity<3, float>>& density_info_ptr // TODO should be Info only
50  ) override;
51 
52  PostsmoothingForwardProjectorByBin(const shared_ptr<ForwardProjectorByBin>& original_forward_projector_ptr,
53  const VectorWithOffset<float>& tangential_kernel,
54  const VectorWithOffset<float>& axial_kernel,
55  const bool smooth_segment_0_axially = false);
56 
57  // Informs on which symmetries the projector handles
58  // It should get data related by at least those symmetries.
59  // Otherwise, a run-time error will occur (unless the derived
60  // class has other behaviour).
61  const DataSymmetriesForViewSegmentNumbers* get_symmetries_used() const override;
62 
63 private:
64  shared_ptr<ForwardProjectorByBin> original_forward_projector_ptr;
65  VectorWithOffset<float> tang_kernel;
66  VectorWithOffset<float> ax_kernel;
67  bool smooth_segment_0_axially;
68 
69  // next 2 necessary for parsing because of limitation in KeyParser
70  std::vector<double> tang_kernel_double;
71  std::vector<double> ax_kernel_double;
72 
73 #ifdef STIR_PROJECTORS_AS_V3
74  void actual_forward_project(RelatedViewgrams<float>&,
76  const int min_axial_pos_num,
77  const int max_axial_pos_num,
78  const int min_tangential_pos_num,
79  const int max_tangential_pos_num);
80 #endif
81  void actual_forward_project(RelatedViewgrams<float>&,
83  const int min_axial_pos_num,
84  const int max_axial_pos_num,
85  const int min_tangential_pos_num,
86  const int max_tangential_pos_num) override;
87  void smooth(Viewgram<float>&,
88  const int min_axial_pos_num,
89  const int max_axial_pos_num,
90  const int min_tangential_pos_num,
91  const int max_tangential_pos_num) const;
92 
93  void set_defaults() override;
94  void initialise_keymap() override;
95  bool post_processing() override;
96 };
97 
98 END_NAMESPACE_STIR
99 
100 #endif
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin)...
Definition: DataSymmetriesForViewSegmentNumbers.h:49
defines the stir::VectorWithOffset class
A very preliminary class that first forward projects, and then smooths the viewgrams.
Definition: PostsmoothingForwardProjectorByBin.h:35
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
Base class for forward projectors which work on &#39;large&#39; collections of bins: given the whole image...
Declaration of class stir::RegisteredParsingObject.
static const char *const registered_name
Name which will be used when parsing a PostsmoothingForwardProjectorByBin object. ...
Definition: PostsmoothingForwardProjectorByBin.h:40