STIR  6.2.0
BackProjectorByBinNiftyPET.h
Go to the documentation of this file.
1 //
2 //
23 /*
24  Copyright (C) 2019, University College London
25  This file is part of STIR.
26 
27  SPDX-License-Identifier: Apache-2.0
28 
29  See STIR/LICENSE.txt for details
30 */
31 #ifndef __stir_gpu_BackProjectorByBinNiftyPET_h__
32 #define __stir_gpu_BackProjectorByBinNiftyPET_h__
33 
37 
38 START_NAMESPACE_STIR
39 
40 class DataSymmetriesForViewSegmentNumbers;
41 
51 class BackProjectorByBinNiftyPET : public RegisteredParsingObject<BackProjectorByBinNiftyPET, BackProjectorByBin>
52 {
53 public:
55  static const char* const registered_name;
56 
59 
60  virtual ~BackProjectorByBinNiftyPET();
61 
63  virtual void initialise_keymap();
64 
66 
69  virtual void set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
70  const shared_ptr<const DiscretisedDensity<3, float>>& density_info_sptr // TODO should be Info only
71  );
72 
74  virtual const DataSymmetriesForViewSegmentNumbers* get_symmetries_used() const;
75 
77  void back_project(const ProjData&, int subset_num = 0, int num_subsets = 1);
78 
80  virtual void get_output(DiscretisedDensity<3, float>&) const;
81 
84  virtual void start_accumulating_in_new_target();
85 
87  void set_verbosity(const bool verbosity) { _cuda_verbosity = verbosity; }
88 
91  void set_use_truncation(const bool use_truncation) { _use_truncation = use_truncation; }
92 
93 protected:
94  virtual void actual_back_project(const RelatedViewgrams<float>&,
95  const int min_axial_pos_num,
96  const int max_axial_pos_num,
97  const int min_tangential_pos_num,
98  const int max_tangential_pos_num);
99 
100 private:
101  shared_ptr<DataSymmetriesForViewSegmentNumbers> _symmetries_sptr;
102  NiftyPETHelper _helper;
103  int _cuda_device;
104  bool _cuda_verbosity;
105  std::vector<float> _np_sino_w_gaps;
106  bool _use_truncation;
107 };
108 
109 END_NAMESPACE_STIR
110 
111 #endif // __stir_gpu_BackProjectorByBinNiftyPET_h__
Class for NiftyPET&#39;s GPU back projector.
Definition: BackProjectorByBinNiftyPET.h:51
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: BackProjectorByBinNiftyPET.h:87
static const char *const registered_name
Name which will be used when parsing a BackProjectorByBin object.
Definition: BackProjectorByBinNiftyPET.h:55
void set_use_truncation(const bool use_truncation)
Set use truncation - truncate before forward projection and after back projection.
Definition: BackProjectorByBinNiftyPET.h:91
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
Helper class for NiftyPET&#39;s GPU implementation.
Declares class stir::BackProjectorByBin.
Declaration of class stir::RegisteredParsingObject.
The (abstract) base class for the projection data.
Definition: ProjData.h:103