STIR
6.2.0
|
a base class for LogLikelihood of independent Poisson variables where the mean values are linear combinations of the frames. More...
#include "stir_experimental/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h"
Static Public Attributes | |
static const char *const | registered_name = "PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData" |
Name which will be used when parsing a GeneralisedObjectiveFunction object. | |
Protected Member Functions | |
bool | actual_subsets_are_approximately_balanced (std::string &warning_message) const |
Implementation of function that checks subset balancing. More... | |
virtual void | set_defaults () |
Sets defaults for parsing. More... | |
virtual void | initialise_keymap () |
sets parsing keys More... | |
virtual bool | post_processing () |
This will be called at the end of the parsing. More... | |
Protected Member Functions inherited from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT > | |
virtual Succeeded | set_up_before_sensitivity (shared_ptr< const TargetT > const &target_sptr)=0 |
set-up specifics for the derived class | |
void | compute_sensitivities () |
compute subset and total sensitivity More... | |
virtual void | actual_compute_subset_gradient_without_penalty (TargetT &gradient, const TargetT ¤t_estimate, const int subset_num, const bool add_sensitivity)=0 |
computes the subset gradient of the objective function without the penalty (optional: add subset sensitivity) More... | |
Protected Member Functions inherited from stir::GeneralisedObjectiveFunction< TargetT > | |
virtual double | actual_compute_objective_function_without_penalty (const TargetT ¤t_estimate, const int subset_num)=0 |
Implementation of function that computes the objective function for the current subset. More... | |
virtual Succeeded | actual_add_multiplication_with_approximate_sub_Hessian_without_penalty (TargetT &output, const TargetT &input, const int subset_num) const |
Implementation of the function that multiplies the approximate sub-Hessian with a vector. More... | |
virtual Succeeded | actual_accumulate_sub_Hessian_times_input_without_penalty (TargetT &output, const TargetT ¤t_image_estimate, const TargetT &input, const int subset_num) const |
Implementation of the function computes the sub-Hessian and multiplies by a vector. More... | |
Protected Member Functions inherited from stir::ParsingObject | |
virtual void | set_key_values () |
This will be called before parsing or parameter_info is called. More... | |
Protected Attributes | |
std::string | _input_filename |
Filename with input dynamic projection data. | |
shared_ptr< DynamicProjData > | _dyn_proj_data_sptr |
points to the object for the total input dynamic projection data | |
int | _max_segment_num_to_process |
the maximum absolute ring difference number to use in the reconstruction More... | |
int | _output_image_size_xy |
the output image size in x and y direction More... | |
int | _output_image_size_z |
the output image size in z direction More... | |
double | _zoom |
the zoom factor | |
double | _Xoffset |
offset in the x-direction | |
double | _Yoffset |
offset in the y-direction | |
double | _Zoffset |
offset in the z-direction | |
TimeFrameDefinitions | _frame_defs |
std::string | _additive_dyn_proj_data_filename |
name of file in which additive projection data are stored | |
shared_ptr< DynamicProjData > | _additive_dyn_proj_data_sptr |
points to the additive projection data More... | |
shared_ptr< BinNormalisation > | _normalisation_sptr |
shared_ptr< ProjectorByBinPair > | _projector_pair_ptr |
Stores the projectors that are used for the computations. | |
bool | _zero_seg0_end_planes |
signals whether to zero the data in the end planes of the projection data | |
Protected Attributes inherited from stir::GeneralisedObjectiveFunction< TargetT > | |
int | num_subsets |
bool | already_set_up |
shared_ptr< GeneralisedPrior< TargetT > > | prior_sptr |
Protected Attributes inherited from stir::ParsingObject | |
KeyParser | parser |
Additional Inherited Members | |
Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData< TargetT >, GeneralisedObjectiveFunction< TargetT >, PoissonLogLikelihoodWithLinearModelForMean< TargetT > > | |
std::string | get_registered_name () const override |
Returns Derived::registered_name. | |
std::string | parameter_info () override |
Returns a string with all parameters and their values, in a form suitable for parsing again. | |
Public Member Functions inherited from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT > | |
void | compute_sub_gradient_without_penalty (TargetT &gradient, const TargetT ¤t_estimate, const int subset_num) override |
Compute the subset gradient of the (unregularised) objective function. More... | |
virtual void | compute_sub_gradient_without_penalty_plus_sensitivity (TargetT &gradient, const TargetT ¤t_estimate, const int subset_num) |
This should compute the subset gradient of the (unregularised) objective function plus the subset sensitivity. More... | |
Succeeded | set_up (shared_ptr< TargetT > const &target_sptr) override |
set-up sensitivity etc if possible More... | |
const TargetT & | get_sensitivity () const |
Get a const reference to the total sensitivity. | |
const TargetT & | get_subset_sensitivity (const int subset_num) const |
Get a const reference to the sensitivity for a subset. | |
virtual void | add_subset_sensitivity (TargetT &sensitivity, const int subset_num) const =0 |
Add subset sensitivity to existing data. | |
bool | get_use_subset_sensitivities () const |
find out if subset_sensitivities are used More... | |
bool | get_recompute_sensitivity () const |
find current value of recompute_sensitivity | |
std::string | get_sensitivity_filename () const |
get filename to read (or write) the total sensitivity More... | |
std::string | get_subsensitivity_filenames () const |
get filename pattern to read (or write) the subset sensitivities More... | |
void | fill_nonidentifiable_target_parameters (TargetT &target, const float value) const override |
void | set_recompute_sensitivity (const bool) |
void | set_subset_sensitivity_sptr (const shared_ptr< TargetT > &, const int subset_num) |
void | set_use_subset_sensitivities (const bool) |
See get_use_subset_sensitivities() | |
void | set_sensitivity_filename (const std::string &) |
set filename to read (or write) the total sensitivity More... | |
void | set_subsensitivity_filenames (const std::string &) |
set filename pattern to read (or write) the subset sensitivities More... | |
Public Member Functions inherited from stir::GeneralisedObjectiveFunction< TargetT > | |
virtual TargetT * | construct_target_ptr () const =0 |
Creates a suitable target as determined by the parameters. More... | |
virtual void | compute_sub_gradient (TargetT &gradient, const TargetT ¤t_estimate, const int subset_num) |
Compute the subset-gradient of the objective function at current_estimate. More... | |
virtual void | compute_gradient (TargetT &gradient, const TargetT ¤t_estimate) |
Compute the gradient of the objective function at the current_estimate. More... | |
virtual void | compute_gradient_without_penalty (TargetT &gradient, const TargetT ¤t_estimate) |
Compute the gradient of the unregularised objective function at the current_estimate. More... | |
virtual double | compute_objective_function_without_penalty (const TargetT ¤t_estimate, const int subset_num) |
Compute the value of the unregularised sub-objective function at the current_estimate. More... | |
virtual double | compute_objective_function_without_penalty (const TargetT ¤t_estimate) |
Compute the value of the unregularised objective function at the current_estimate. More... | |
double | compute_penalty (const TargetT ¤t_estimate, const int subset_num) |
Compute the value of the sub-penalty at the current_estimate. More... | |
double | compute_penalty (const TargetT ¤t_estimate) |
Compute the value of the penalty at the current_estimate. More... | |
double | compute_objective_function (const TargetT ¤t_estimate, const int subset_num) |
Compute the value of the sub-objective function at the current_estimate. More... | |
double | compute_objective_function (const TargetT ¤t_estimate) |
Compute the value of the objective function at the current_estimate. More... | |
double | compute_value (const TargetT ¤t_estimate) |
Alias for compute_objective_function(const TargetT&) | |
std::string | get_objective_function_values_report (const TargetT ¤t_estimate) |
Construct a string with info on the value of objective function with and without penalty. | |
int | get_num_subsets () const |
Return the number of subsets in-use. | |
virtual std::unique_ptr< ExamInfo > | get_exam_info_uptr_for_target () const |
virtual int | set_num_subsets (const int num_subsets)=0 |
Attempts to change the number of subsets. More... | |
bool | subsets_are_approximately_balanced () const |
Checks of the current subset scheme is approximately balanced. More... | |
bool | subsets_are_approximately_balanced (std::string &warning_message) const |
Checks of the current subset scheme is approximately balanced and constructs a warning message. More... | |
bool | prior_is_zero () const |
check if the prior is set (or the penalisation factor is 0) | |
GeneralisedPrior< TargetT > *const | get_prior_ptr () const |
Read-only access to the prior. More... | |
shared_ptr< GeneralisedPrior< TargetT > > | get_prior_sptr () |
void | set_prior_sptr (const shared_ptr< GeneralisedPrior< TargetT >> &) |
Change the prior. More... | |
virtual void | set_input_data (const shared_ptr< ExamData > &)=0 |
set_input_data More... | |
virtual const ExamData & | get_input_data () const =0 |
get input data More... | |
virtual void | set_additive_proj_data_sptr (const shared_ptr< ExamData > &)=0 |
set_additive_proj_data_sptr More... | |
virtual void | set_normalisation_sptr (const shared_ptr< BinNormalisation > &)=0 |
set_normalisation_sptr More... | |
Succeeded | add_multiplication_with_approximate_sub_Hessian_without_penalty (TargetT &output, const TargetT &input, const int subset_num) const |
Functions that multiply the approximate (sub)Hessian with a \'vector\'. More... | |
Succeeded | add_multiplication_with_approximate_sub_Hessian (TargetT &output, const TargetT &input, const int subset_num) const |
Succeeded | add_multiplication_with_approximate_Hessian_without_penalty (TargetT &output, const TargetT &input) const |
Succeeded | add_multiplication_with_approximate_Hessian (TargetT &output, const TargetT &input) const |
Succeeded | accumulate_Hessian_times_input (TargetT &output, const TargetT ¤t_image_estimate, const TargetT &input) const |
Functions that multiply the True (sub)Hessian with a \'vector\'. More... | |
Succeeded | accumulate_Hessian_times_input_without_penalty (TargetT &output, const TargetT ¤t_image_estimate, const TargetT &input) const |
Succeeded | accumulate_sub_Hessian_times_input (TargetT &output, const TargetT ¤t_image_estimate, const TargetT &input, const int subset_num) const |
Succeeded | accumulate_sub_Hessian_times_input_without_penalty (TargetT &output, const TargetT ¤t_image_estimate, const TargetT &input, const int subset_num) const |
Public Member Functions inherited from stir::ParsingObject | |
ParsingObject (const ParsingObject &) | |
ParsingObject & | operator= (const ParsingObject &) |
void | ask_parameters () |
bool | parse (std::istream &f) |
bool | parse (const char *const filename) |
Static Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData< TargetT >, GeneralisedObjectiveFunction< TargetT >, PoissonLogLikelihoodWithLinearModelForMean< TargetT > > | |
static GeneralisedObjectiveFunction< TargetT > * | read_from_stream (std::istream *) |
Construct a new object (of type Derived) by parsing the istream. More... | |
Static Public Member Functions inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > > | |
static GeneralisedObjectiveFunction< TargetT > * | read_registered_object (std::istream *in, const std::string ®istered_name) |
Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. More... | |
static GeneralisedObjectiveFunction< TargetT > * | ask_type_and_parameters () |
ask the user for the type, and then calls read_registered_object(0, type) More... | |
static void | list_registered_names (std::ostream &stream) |
List all possible registered names to the stream. More... | |
Protected Types inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > > | |
typedef GeneralisedObjectiveFunction< TargetT > *(* | RootFactory) (std::istream *) |
The type of a root factory is a function, taking an istream* as argument, and returning a Root*. | |
typedef FactoryRegistry< std::string, RootFactory, interfile_less > | RegistryType |
The type of the registry. | |
Static Protected Member Functions inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > > | |
static RegistryType & | registry () |
Static function returning the registry. More... | |
a base class for LogLikelihood of independent Poisson variables where the mean values are linear combinations of the frames.
|
protectedvirtual |
Implementation of function that checks subset balancing.
The reason we have this function is that overloading subsets_are_approximately_balanced(std::string&) in a derived class would hide subsets_are_approximately_balanced().
Implements stir::GeneralisedObjectiveFunction< TargetT >.
|
protectedvirtual |
Sets defaults for parsing.
Resets sensitivity_filename
and sensitivity_sptr
and recompute_sensitivity
to false
.
Reimplemented from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.
|
protectedvirtual |
sets parsing keys
Has to be called by initialise_keymap in the leaf-class
Reimplemented from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.
|
protectedvirtual |
This will be called at the end of the parsing.
Reimplemented from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.
References stir::error(), stir::read_from_file(), and stir::warning().
|
protected |
the maximum absolute ring difference number to use in the reconstruction
convention: if -1, use get_max_segment_num()
|
protected |
the output image size in x and y direction
convention: if -1, use a size such that the whole FOV is covered
|
protected |
the output image size in z direction
convention: if -1, use default as provided by VoxelsOnCartesianGrid constructor
|
protected |
points to the additive projection data
the projection data in this file is bin-wise added to forward projection results
|
protected |
the normalisation or/and attenuation data