STIR  6.2.0
OSMAPOSLReconstruction.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000 PARAPET partners
5  Copyright (C) 2000 - 2007-10-08, Hammersmith Imanet Ltd
6  Copyright (C) 2012-06-05 - 2012, Kris Thielemans
7  Copyright (C) 2018 Commonwealth Scientific and Industrial Research Organisation
8  This file is part of STIR.
9 
10  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
11 
12  See STIR/LICENSE.txt for details
13 */
27 #ifndef __stir_OSMAPOSL_OSMAPOSLReconstruction_h__
28 # define __stir_OSMAPOSL_OSMAPOSLReconstruction_h__
29 
32 
33 START_NAMESPACE_STIR
34 
35 template <typename TargetT>
36 class PoissonLogLikelihoodWithLinearModelForMean;
37 
74 template <typename TargetT>
76  : public RegisteredParsingObject<OSMAPOSLReconstruction<TargetT>, Reconstruction<TargetT>, IterativeReconstruction<TargetT>>
77 // public IterativeReconstruction<TargetT >
78 {
79 private:
81  base_type;
82 
83 public:
85  static const char* const registered_name;
86 
93  explicit OSMAPOSLReconstruction(const std::string& parameter_filename);
94 
97 
99  const OSMAPOSLReconstruction& get_parameters() const { return *this; }
100 
102  std::string method_info() const override;
103 
105  /* Overloading IterativeReconstruction::get_objective_function()
106  with a return-type specifying it'll always be a Poisson log likelihood.
107  */
108  PoissonLogLikelihoodWithLinearModelForMean<TargetT> const& get_objective_function() const;
109 
116  void set_inter_update_filter_interval(const int);
118 
120  void set_inter_update_filter_ptr(const shared_ptr<DataProcessor<TargetT>>&);
121 
123  void set_maximum_relative_change(const double);
124 
126  void set_minimum_relative_change(const double);
127 
128  void set_enforce_initial_positivity(const bool);
129 
131  void set_write_update_image(const int);
132 
134  void set_MAP_model(const std::string&);
136 
138  void ask_parameters() override;
139 
141  Succeeded set_up(shared_ptr<TargetT> const& target_image_ptr) override;
142 
144  void update_estimate(TargetT& current_image_estimate) override;
145 
146 protected:
148  // virtual Succeeded set_up(shared_ptr <TargetT > const& target_image_ptr);
149 
152 
154 
158 
161 
163  shared_ptr<DataProcessor<TargetT>> inter_update_filter_ptr;
164 
165  // KT 17/08/2000 3 new parameters
166 
169 
172 
175 
177  std::string MAP_model;
178 
179  void set_defaults() override;
180  void initialise_keymap() override;
181 
183  bool post_processing() override;
184 
185  virtual void
186  compute_sub_gradient_without_penalty_plus_sensitivity(TargetT& gradient, const TargetT& current_estimate, const int subset_num);
187 
188  virtual const TargetT& get_subset_sensitivity(const int subset_num);
189 
190  virtual void apply_multiplicative_update(TargetT& current_image_estimate, const TargetT& multiplicative_update_image);
191 
192 private:
193  friend void do_sensitivity(const char* const par_filename);
194 
196  // virtual void update_estimate (TargetT& current_image_estimate);
197 
199 
200  PoissonLogLikelihoodWithLinearModelForMean<TargetT> const& objective_function() const;
201 
202  unique_ptr<TargetT> multiplicative_update_image_ptr;
203 };
204 
205 END_NAMESPACE_STIR
206 
207 #endif
208 
209 // __OSMAPOSLReconstruction_h__
static const char *const registered_name
Name which will be used when parsing a OSMAPOSLReconstruction object.
Definition: OSMAPOSLReconstruction.h:85
shared_ptr< DataProcessor< TargetT > > inter_update_filter_ptr
inter-update filter object
Definition: OSMAPOSLReconstruction.h:163
double minimum_relative_change
restrict updates (smaller relative updates will be thresholded)
Definition: OSMAPOSLReconstruction.h:171
bool enforce_initial_positivity
operations prior to the iterations
Definition: OSMAPOSLReconstruction.h:151
bool do_rim_truncation
determines wether voxels outside a circular FOV will be set to 0 or not
Definition: OSMAPOSLReconstruction.h:157
OSMAPOSLReconstruction & get_parameters()
accessor for the external parameters
Definition: OSMAPOSLReconstruction.h:96
const OSMAPOSLReconstruction & get_parameters() const
accessor for the external parameters
Definition: OSMAPOSLReconstruction.h:99
double maximum_relative_change
restrict updates (larger relative updates will be thresholded)
Definition: OSMAPOSLReconstruction.h:168
int write_update_image
boolean value to determine if the update images have to be written to disk
Definition: OSMAPOSLReconstruction.h:174
base class for all ReconstructionsAs there is not a lot of commonality between different reconstructi...
Definition: Reconstruction.h:69
declares the stir::IterativeReconstruction class
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
std::string MAP_model
should be either additive or multiplicative
Definition: OSMAPOSLReconstruction.h:177
a base class for LogLikelihood of independent Poisson variables where the mean values are linear comb...
Definition: KOSMAPOSLReconstruction.h:39
base class for iterative reconstruction objectsThis is the base class for all iterative reconstructio...
Definition: IterativeReconstruction.h:81
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Implementation of the Ordered Subsets version of Green&#39;s MAP One Step Late algorithm.
Definition: OSMAPOSLReconstruction.h:75
Declaration of class stir::RegisteredParsingObject.
int inter_update_filter_interval
subiteration interval at which to apply inter-update filters
Definition: OSMAPOSLReconstruction.h:160