21 #ifndef __stir_recon_buildblock_PLSPrior_H__ 22 #define __stir_recon_buildblock_PLSPrior_H__ 94 template <
typename elemT>
96 GeneralisedPrior<DiscretisedDensity<3, elemT>>,
97 GeneralisedPrior<DiscretisedDensity<3, elemT>>>
102 GeneralisedPrior<DiscretisedDensity<3, elemT>>>
113 PLSPrior(
const bool only_2D,
float penalization_factor);
119 bool is_convex()
const override;
133 shared_ptr<const DiscretisedDensity<3, elemT>> get_kappa_sptr()
const;
134 shared_ptr<const DiscretisedDensity<3, elemT>> get_anatomical_grad_sptr(
int direction)
const;
135 shared_ptr<const DiscretisedDensity<3, elemT>> get_norm_sptr()
const;
138 double get_eta()
const;
139 double get_alpha()
const;
142 void set_eta(
const double);
144 void set_alpha(
const double);
149 shared_ptr<const DiscretisedDensity<3, elemT>> get_anatomical_image_sptr()
const;
151 void set_anatomical_filename(
const std::string& filename);
156 void set_kappa_filename(
const std::string& filename);
175 std::string anatomical_filename;
179 void set_defaults()
override;
180 void initialise_keymap()
override;
183 bool post_processing()
override;
207 shared_ptr<const DiscretisedDensity<3, elemT>> anatomical_grad_x_sptr;
208 shared_ptr<const DiscretisedDensity<3, elemT>> anatomical_grad_y_sptr;
209 shared_ptr<const DiscretisedDensity<3, elemT>> anatomical_grad_z_sptr;
210 shared_ptr<const DiscretisedDensity<3, elemT>> anatomical_sptr;
211 shared_ptr<const DiscretisedDensity<3, elemT>> norm_sptr;
212 shared_ptr<const DiscretisedDensity<3, elemT>> kappa_ptr;
bool only_2D
can be set during parsing to restrict the gradient calculation to the 2D case
Definition: PLSPrior.h:165
std::string kappa_filename
Filename for the image that will be read by post_processing()
Definition: PLSPrior.h:174
A class in the GeneralisedPrior hierarchy. This implements the anatomical penalty function...
Definition: PLSPrior.h:95
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
std::string gradient_filename_prefix
filename prefix for outputing the gradient whenever compute_gradient() is called. ...
Definition: PLSPrior.h:171
defines the stir::DiscretisedDensity class
defines the Array class for multi-dimensional (numeric) arrays
static const char *const registered_name
Name which will be used when parsing a GeneralisedPrior object.
Definition: PLSPrior.h:107
A base class for 'generalised' priors, i.e. priors for which at least a 'gradient' is defined...
Definition: GeneralisedPrior.h:41
bool get_only_2D()
Get only 2D.
Definition: PLSPrior.h:161
coordT inner_product(const BasicCoordinate< num_dimensions, coordT > &p1, const BasicCoordinate< num_dimensions, coordT > &p2)
compute sum_i p1[i] * p2[i]
Definition: BasicCoordinate.inl:408
void set_only_2D(const bool arg)
Set only 2D.
Definition: PLSPrior.h:159
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
Declaration of class stir::PriorWithParabolicSurrogate.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
This abstract class is the basis for all image representations.
Definition: FBP2DReconstruction.h:35