28#ifndef __stir_KOSMAPOSL_KOSMAPOSLReconstruction_h__
29# define __stir_KOSMAPOSL_KOSMAPOSLReconstruction_h__
38template <
typename TargetT>
39class PoissonLogLikelihoodWithLinearModelForMean;
115template <
typename TargetT>
117 :
public RegisteredParsingObject<KOSMAPOSLReconstruction<TargetT>, Reconstruction<TargetT>, OSMAPOSLReconstruction<TargetT>>
144 const std::vector<std::string> get_anatomical_image_filenames()
const;
145 const int get_num_neighbours()
const;
146 const int get_num_non_zero_feat()
const;
147 const std::vector<double> get_sigma_m()
const;
148 const double get_sigma_p()
const;
149 const double get_sigma_dp()
const;
150 const double get_sigma_dm()
const;
151 const bool get_only_2D()
const;
152 const bool get_hybrid()
const;
153 const int get_freeze_iterative_kernel_at_subiter_num()
const;
155 std::vector<shared_ptr<TargetT>> get_anatomical_prior_sptrs();
165 void set_anatomical_prior_sptr(shared_ptr<TargetT>,
int index);
167 void set_anatomical_prior_sptr(shared_ptr<TargetT> arg);
168 void set_anatomical_image_filename(
const std::string&,
const int index);
169 void set_anatomical_image_filename(
const std::string&);
171 void set_num_neighbours(
const int);
172 void set_num_non_zero_feat(
const int);
173 void set_sigma_m(
const double,
const int index);
175 void set_sigma_m(
const double);
176 void set_sigma_p(
const double);
177 void set_sigma_dp(
const double);
178 void set_sigma_dm(
const double);
179 void set_only_2D(
const bool);
180 void set_hybrid(
const bool);
181 void set_freeze_iterative_kernel_at_subiter_num(
const int);
185 void ask_parameters()
override;
190 std::string current_kimage_filename;
191 std::string sens_filenames;
196 std::vector<shared_ptr<TargetT>> anatomical_prior_sptrs, kmnorm_sptrs;
197 shared_ptr<TargetT> kpnorm_sptr;
199 int num_neighbours, num_non_zero_feat, num_elem_neighbourhood, num_voxels, dimz, dimy, dimx;
200 int freeze_iterative_kernel_at_subiter_num;
201 std::vector<double> sigma_m;
205 double sigma_dp, sigma_dm;
207 shared_ptr<TargetT> iterative_kernel_image_frozen_sptr;
215 const TargetT& image_to_kernelise,
216 const TargetT& current_alpha_estimate);
219 friend void do_sensitivity(
const char*
const par_filename);
222 Succeeded set_up(shared_ptr<TargetT>
const& target_image_sptr)
override;
225 void update_estimate(TargetT& current_image_estimate)
override;
228 bool still_updating_iterative_kernel();
230 std::vector<double> anatomical_sd;
235 void calculate_norm_matrix(TargetT& normp,
const int dimf_row,
const int dimf_col,
const TargetT& emission);
239 void calculate_norm_const_matrix(std::vector<shared_ptr<TargetT>>& normm,
const int dimf_row,
const int dimf_col);
242 void estimate_stand_dev_for_anatomical_image(std::vector<double>& SD);
257 double calc_emission_kernel(
const double current_alpha_estimate_zyx,
258 const double current_alpha_estimate_zyx_dr,
259 const double distance_dzdydx,
260 const bool use_compact_implementation,
264 double calc_anatomical_kernel(
const double anatomical_prior_zyx,
265 const double anatomical_prior_zyx_dr,
266 const double distance_dzdydx,
267 const bool use_compact_implementation,
272 double calc_kernel_from_precalculated(
const double precalculated_norm_zxy,
273 const double sq_sigma_int,
274 const double sq_sigma_dist,
275 const double sq_distance_dzdydx,
276 const double precalc_denom);
278 double calc_kernel_compact(
const double prior_image_zyx_diff,
279 const double sq_sigma_int,
280 const double sq_sigma_dist,
281 const double sq_distance_dzdydx,
282 const double precalc_denom);
defines the stir::CartesianCoordinate3D<coordT> class
declares the stir::IterativeReconstruction class
Declaration of class stir::OSMAPOSLReconstruction.
Declaration of class stir::RegisteredParsingObject.
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
class BasicCoordinate<int num_dimensions, typename coordT> defines num_dimensions -dimensional coordi...
Definition BasicCoordinate.h:57
void initialise_keymap() override
Initialise all keywords.
Definition KOSMAPOSLReconstruction.cxx:166
void set_defaults() override
Set defaults before parsing.
Definition KOSMAPOSLReconstruction.cxx:143
const KOSMAPOSLReconstruction & get_parameters() const
accessor for the external parameters
Definition KOSMAPOSLReconstruction.h:140
void compute_kernelised_image(TargetT &kernelised_image_out, const TargetT &image_to_kernelise, const TargetT ¤t_alpha_estimate)
Function that applies the kernel to the image_to_kernelise.
Definition KOSMAPOSLReconstruction.cxx:757
std::string input_filename
Filename with input projection data.
Definition KOSMAPOSLReconstruction.h:189
KOSMAPOSLReconstruction()
Default constructor (calling set_defaults())
Definition KOSMAPOSLReconstruction.cxx:222
bool post_processing() override
used to check acceptable parameter ranges, etc...
Definition KOSMAPOSLReconstruction.cxx:195
std::vector< std::string > anatomical_image_filenames
Anatomical image filename.
Definition KOSMAPOSLReconstruction.h:194
static const char *const registered_name
Name which will be used when parsing a KOSMAPOSLReconstruction object.
Definition KOSMAPOSLReconstruction.h:126
KOSMAPOSLReconstruction & get_parameters()
accessor for the external parameters
Definition KOSMAPOSLReconstruction.h:137
Implementation of the Ordered Subsets version of Green's MAP One Step Late algorithm.
Definition OSMAPOSLReconstruction.h:78
base class for all ReconstructionsAs there is not a lot of commonality between different reconstructi...
Definition Reconstruction.h:70
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44