STIR 6.4.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"
25
26START_NAMESPACE_STIR
27
28template <typename elemT>
29class Viewgram;
30
36 : public RegisteredParsingObject<PostsmoothingForwardProjectorByBin, ForwardProjectorByBin>
37{
38public:
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).
62
63private:
64 shared_ptr<ForwardProjectorByBin> original_forward_projector_ptr;
65 VectorWithOffset<float> tang_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
82 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
98END_NAMESPACE_STIR
99
100#endif
Base class for forward projectors which work on 'large' collections of bins: given the whole image,...
Declaration of class stir::RegisteredParsingObject.
defines the stir::VectorWithOffset class
A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin).
Definition DataSymmetriesForViewSegmentNumbers.h:50
This abstract class is the basis for all image representations.
Definition DiscretisedDensity.h:99
void set_up(const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float > > &density_info_ptr) override
Stores all necessary geometric info.
Definition PostsmoothingForwardProjectorByBin.cxx:107
static const char *const registered_name
Name which will be used when parsing a PostsmoothingForwardProjectorByBin object.
Definition PostsmoothingForwardProjectorByBin.h:40
PostsmoothingForwardProjectorByBin()
Default constructor (calls set_defaults())
Definition PostsmoothingForwardProjectorByBin.cxx:90
const DataSymmetriesForViewSegmentNumbers * get_symmetries_used() const override
Informs on which symmetries the projector handles.
Definition PostsmoothingForwardProjectorByBin.cxx:114
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
A class for storing viewgrams which are related by symmetry.
Definition RelatedViewgrams.h:41
A templated class for vectors, but with indices starting not from 0.
Definition VectorWithOffset.h:65
A class for 2d projection data.
Definition Viewgram.h:49
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...