STIR  6.2.0
PostsmoothingBackProjectorByBin.h
Go to the documentation of this file.
1 //
2 //
12 /*
13  Copyright (C) 2002- 2007, Hammersmith Imanet
14  Copyright (C) 2019, University College London
15 
16  This file is part of STIR.
17 
18  SPDX-License-Identifier: Apache-2.0
19 
20 
21  See STIR/LICENSE.txt for details
22 */
23 #ifndef __stir_recon_buildblock_PostsmoothingBackProjectorByBin__H__
24 #define __stir_recon_buildblock_PostsmoothingBackProjectorByBin__H__
25 
28 #include "stir/shared_ptr.h"
29 
30 START_NAMESPACE_STIR
31 
32 template <typename elemT>
33 class Viewgram;
34 template <typename DataT>
35 class DataProcessor;
42 class PostsmoothingBackProjectorByBin : public RegisteredParsingObject<PostsmoothingBackProjectorByBin, BackProjectorByBin>
43 {
44 #ifdef SWIG
45  // work-around swig problem. It gets confused when using a private (or protected)
46  // typedef in a definition of a public typedef/member
47 public:
48 #else
49 private:
50 #endif
52 
53 public:
55  static const char* const registered_name;
56 
59 
61 
63 
65  void set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
66  const shared_ptr<const DiscretisedDensity<3, float>>& density_info_ptr // TODO should be Info only
67  ) override;
68 
69  PostsmoothingBackProjectorByBin(const shared_ptr<BackProjectorByBin>& original_back_projector_ptr,
70  const shared_ptr<DataProcessor<DiscretisedDensity<3, float>>>&);
71 
72  // Informs on which symmetries the projector handles
73  // It should get data related by at least those symmetries.
74  // Otherwise, a run-time error will occur (unless the derived
75  // class has other behaviour).
76  const DataSymmetriesForViewSegmentNumbers* get_symmetries_used() const override;
77 
78  BackProjectorByBin* get_original_back_projector_ptr() const;
79 
80  PostsmoothingBackProjectorByBin* clone() const override;
81 
82 private:
83  shared_ptr<BackProjectorByBin> original_back_projector_ptr;
84 
85 #ifdef STIR_PROJECTORS_AS_V3
86  void actual_back_project(DiscretisedDensity<3, 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);
92 #endif
93  void actual_back_project(const RelatedViewgrams<float>&,
94  const int min_axial_pos_num,
95  const int max_axial_pos_num,
96  const int min_tangential_pos_num,
97  const int max_tangential_pos_num) override;
98 
99  void actual_back_project(DiscretisedDensity<3, float>& density, const Bin& bin);
100 
101  shared_ptr<DiscretisedDensity<3, float>> filtered_density_sptr;
102 
103  void set_defaults() override;
104  void initialise_keymap() override;
105  bool post_processing() override;
106 };
107 
108 END_NAMESPACE_STIR
109 
110 #endif
Abstract base class for all back projectors.
Definition: BackProjectorByBin.h:50
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Base class that defines an interface for classes that do data processing.
Definition: DataProcessor.h:46
A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin)...
Definition: DataSymmetriesForViewSegmentNumbers.h:49
static const char *const registered_name
Name which will be used when parsing a PostsmoothingBackProjectorByBin object.
Definition: PostsmoothingBackProjectorByBin.h:55
A class for storing coordinates and value of a single projection bin.
Definition: Bin.h:48
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
A very preliminary class that first smooths the image, then back projects.
Definition: PostsmoothingBackProjectorByBin.h:42
Declares class stir::BackProjectorByBin.
Declaration of class stir::RegisteredParsingObject.