22#ifndef __stir_recon_buildblock_ParametricQuadraticPrior_H__
23#define __stir_recon_buildblock_ParametricQuadraticPrior_H__
80template <
typename TargetT>
82 GeneralisedPrior<TargetT>,
83 PriorWithParabolicSurrogate<TargetT>>
90 shared_ptr<TargetT> kappa_ptr;
106 double compute_value(
const TargetT& current_image_estimate);
109 void compute_gradient(TargetT& prior_gradient,
const TargetT& current_image_estimate);
113 void parabolic_surrogate_curvature(TargetT& parabolic_surrogate_curvature,
const TargetT& current_image_estimate);
116 void compute_Hessian(TargetT& prior_Hessian_for_single_densel,
118 const TargetT ¤t_image_estimate);
121 virtual Succeeded add_multiplication_with_approximate_Hessian(TargetT& output,
const TargetT& input)
const;
134 shared_ptr<TargetT> get_kappa_sptr()
const;
137 void set_kappa_sptr(
const shared_ptr<TargetT>&);
140 virtual Succeeded set_up(shared_ptr<const TargetT>
const& target_sptr);
163 virtual void check(TargetT
const& current_image_estimate)
const;
defines the stir::Array class for multi-dimensional (numeric) arrays
defines the stir::DiscretisedDensity class
Declaration of class stir::KineticParameters.
Declaration of class stir::ParametricDiscretisedDensity.
Declaration of class stir::PriorWithParabolicSurrogate.
Declaration of class stir::QuadraticPrior.
Declaration of class stir::RegisteredParsingObject.
defines the stir::VectorWithOffset class
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
A base class for 'generalised' priors, i.e. priors for which at least a 'gradient' is defined.
Definition GeneralisedPrior.h:44
Array< 3, float > weights
penalty weights
Definition ParametricQuadraticPrior.h:157
static const char *const registered_name
Name which will be used when parsing a GeneralisedPrior object.
Definition ParametricQuadraticPrior.h:95
virtual void check(TargetT const ¤t_image_estimate) const
Check that the prior is ready to be used.
Definition ParametricQuadraticPrior.cxx:81
virtual bool parabolic_surrogate_curvature_depends_on_argument() const
A function that allows skipping some computations if the curvature is independent of the current_esti...
Definition ParametricQuadraticPrior.h:103
std::string kappa_filename
Filename for the image that will be read by post_processing()
Definition ParametricQuadraticPrior.h:159
std::string gradient_filename_prefix
filename prefix for outputing the gradient whenever compute_gradient() is called.
Definition ParametricQuadraticPrior.h:150
virtual void initialise_keymap()
sets key for penalisation factor
Definition ParametricQuadraticPrior.cxx:31
virtual bool post_processing()
This will be called at the end of the parsing.
Definition ParametricQuadraticPrior.cxx:44
ParametricQuadraticPrior()
Default constructor.
Definition ParametricQuadraticPrior.cxx:103
virtual void set_defaults()
sets value for penalisation factor
Definition ParametricQuadraticPrior.cxx:89
bool only_2D
can be set during parsing to restrict the weights to the 2D case
Definition ParametricQuadraticPrior.h:144
this class implements priors with a parabolic surrogate curvature
Definition PriorWithParabolicSurrogate.h:40
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
A templated class for vectors, but with indices starting not from 0.
Definition VectorWithOffset.h:65
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...