STIR  6.2.0
ForwardProjectorByBinNiftyPET.h
Go to the documentation of this file.
1 //
2 //
3 
4 #ifndef __stir_gpu_ForwardProjectorByBinNiftyPET_h__
5 #define __stir_gpu_ForwardProjectorByBinNiftyPET_h__
6 
26 /*
27  Copyright (C) 2019, University College London
28  This file is part of STIR.
29 
30  SPDX-License-Identifier: Apache-2.0
31 
32  See STIR/LICENSE.txt for details
33 */
34 
38 
39 START_NAMESPACE_STIR
40 
41 class ProjDataInMemory;
42 class DataSymmetriesForViewSegmentNumbers;
43 
53 class ForwardProjectorByBinNiftyPET : public RegisteredParsingObject<ForwardProjectorByBinNiftyPET, ForwardProjectorByBin>
54 {
55 public:
57  static const char* const registered_name;
58 
60  // inline
62 
65 
67  virtual void initialise_keymap();
68 
70 
79  virtual void set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
80  const shared_ptr<const DiscretisedDensity<3, float>>& density_info_sptr // TODO should be Info only
81  );
82 
84  virtual const DataSymmetriesForViewSegmentNumbers* get_symmetries_used() const;
85 
87  virtual void set_input(const DiscretisedDensity<3, float>&);
88 
90  void set_verbosity(const bool verbosity) { _cuda_verbosity = verbosity; }
91 
94  void set_use_truncation(const bool use_truncation) { _use_truncation = use_truncation; }
95 
96 protected:
98  virtual void actual_forward_project(RelatedViewgrams<float>&,
100  const int min_axial_pos_num,
101  const int max_axial_pos_num,
102  const int min_tangential_pos_num,
103  const int max_tangential_pos_num);
104 
105  virtual void actual_forward_project(RelatedViewgrams<float>& viewgrams,
106  const int min_axial_pos_num,
107  const int max_axial_pos_num,
108  const int min_tangential_pos_num,
109  const int max_tangential_pos_num);
110 
111 private:
112  shared_ptr<DataSymmetriesForViewSegmentNumbers> _symmetries_sptr;
113  shared_ptr<ProjDataInMemory> _projected_data_sptr;
114  NiftyPETHelper _helper;
115  int _cuda_device;
116  bool _cuda_verbosity;
117  bool _use_truncation;
118 };
119 
120 END_NAMESPACE_STIR
121 
122 #endif // __stir_gpu_ForwardProjectorByBinNiftyPET_h__
Class for NiftyPET&#39;s GPU forward projector.
Definition: ForwardProjectorByBinNiftyPET.h:53
A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin)...
Definition: DataSymmetriesForViewSegmentNumbers.h:49
void set_verbosity(const bool verbosity)
Set verbosity.
Definition: ForwardProjectorByBinNiftyPET.h:90
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
Helper class for the wrapped NiftyPET projectors.
Definition: NiftyPETHelper.h:60
static const char *const registered_name
Name which will be used when parsing a ForwardProjectorByBin object.
Definition: ForwardProjectorByBinNiftyPET.h:57
Helper class for NiftyPET&#39;s GPU implementation.
Base class for forward projectors which work on &#39;large&#39; collections of bins: given the whole image...
Declaration of class stir::RegisteredParsingObject.
void set_use_truncation(const bool use_truncation)
Set use truncation - truncate before forward projection and after back projection.
Definition: ForwardProjectorByBinNiftyPET.h:94