STIR 6.4.0
ForwardProjectorByBinParallelproj.h
Go to the documentation of this file.
1//
2//
3
4#ifndef __stir_gpu_ForwardProjectorByBinParallelproj_h__
5#define __stir_gpu_ForwardProjectorByBinParallelproj_h__
16/*
17 Copyright (C) 2019, 2021 University College London
18 This file is part of STIR.
19
20 SPDX-License-Identifier: Apache-2.0
21
22 See STIR/LICENSE.txt for details
23*/
24
27
28START_NAMESPACE_STIR
29
30class ProjDataInMemory;
31class DataSymmetriesForViewSegmentNumbers;
32namespace detail
33{
34class ParallelprojHelper;
35}
36
41class ForwardProjectorByBinParallelproj : public RegisteredParsingObject<ForwardProjectorByBinParallelproj, ForwardProjectorByBin>
42{
43public:
45 static const char* const registered_name;
46
48 // inline
50
53
55 void initialise_keymap() override;
56
58
67 void set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
68 const shared_ptr<const DiscretisedDensity<3, float>>& density_info_sptr // TODO should be Info only
69 ) override;
70
73
75 void set_input(const DiscretisedDensity<3, float>&) override;
76
78 void set_defaults() override;
79
81 void set_verbosity(const bool verbosity) { _cuda_verbosity = verbosity; }
82
83 // set/get number of gpu chunks to use
84 void set_num_gpu_chunks(int num_gpu_chunks) { _num_gpu_chunks = num_gpu_chunks; }
85 int get_num_gpu_chunks() { return _num_gpu_chunks; }
86
87 bool get_restrict_to_cylindrical_FOV() const;
88 void set_restrict_to_cylindrical_FOV(bool val);
89
90protected:
91 void actual_forward_project(RelatedViewgrams<float>& viewgrams,
92 const int min_axial_pos_num,
93 const int max_axial_pos_num,
94 const int min_tangential_pos_num,
95 const int max_tangential_pos_num) override;
96
97private:
98 shared_ptr<DataSymmetriesForViewSegmentNumbers> _symmetries_sptr;
99 shared_ptr<ProjDataInMemory> _projected_data_sptr;
100 shared_ptr<detail::ParallelprojHelper> _helper;
101 bool _do_not_setup_helper;
102 friend class ProjectorByBinPairUsingParallelproj;
103 void set_helper(shared_ptr<detail::ParallelprojHelper>);
104 bool _cuda_verbosity;
105 bool _restrict_to_cylindrical_FOV;
106 int _num_gpu_chunks;
107};
108
109END_NAMESPACE_STIR
110
111#endif // __stir_gpu_ForwardProjectorByBinParallelproj_h__
Base class for forward projectors which work on 'large' collections of bins: given the whole image,...
Declaration of class stir::RegisteredParsingObject.
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_input(const DiscretisedDensity< 3, float > &) override
Set input.
Definition ForwardProjectorByBinParallelproj.cxx:160
static const char *const registered_name
Name which will be used when parsing a ForwardProjectorByBin object.
Definition ForwardProjectorByBinParallelproj.h:45
void set_verbosity(const bool verbosity)
Set verbosity.
Definition ForwardProjectorByBinParallelproj.h:81
void set_up(const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float > > &density_info_sptr) override
Stores all necessary geometric info.
Definition ForwardProjectorByBinParallelproj.cxx:106
ForwardProjectorByBinParallelproj()
Default constructor calls reset_timers()
Definition ForwardProjectorByBinParallelproj.cxx:56
const DataSymmetriesForViewSegmentNumbers * get_symmetries_used() const override
Symmetries not used, so returns TrivialDataSymmetriesForBins.
Definition ForwardProjectorByBinParallelproj.cxx:120
void initialise_keymap() override
Keymap.
Definition ForwardProjectorByBinParallelproj.cxx:69
void set_defaults() override
set defaults
Definition ForwardProjectorByBinParallelproj.cxx:79
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78