STIR 6.4.0
PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2006- 2013, Hammersmith Imanet Ltd
5 Copyright (C) 2018, University College London
6
7 SPDX-License-Identifier: Apache-2.0
8
9 See STIR/LICENSE.txt for details
10*/
22
23#ifndef __stir_recon_buildblock_PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData_H__
24#define __stir_recon_buildblock_PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData_H__
35
36START_NAMESPACE_STIR
37
47
48template <typename TargetT>
49class PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData
50 : public RegisteredParsingObject<PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData<TargetT>,
51 GeneralisedObjectiveFunction<TargetT>,
52 PoissonLogLikelihoodWithLinearModelForMean<TargetT>>
53{
54private:
58 base_type;
60 VectorWithOffset<SingleFrameObjFunc> _single_frame_obj_funcs;
61
62public:
64 static const char* const registered_name;
65
66 PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData();
67
69
72 TargetT* construct_target_ptr() const override;
73
74 std::unique_ptr<ExamInfo> get_exam_info_uptr_for_target() const override;
75
76protected:
77 double actual_compute_objective_function_without_penalty(const TargetT& current_estimate, const int subset_num) override;
78
79 Succeeded set_up_before_sensitivity(shared_ptr<const TargetT> const& target_sptr) override;
80
82
84 void add_subset_sensitivity(TargetT& sensitivity, const int subset_num) const override;
85
87 const TargetT& input,
88 const int subset_num) const override;
89
91 const TargetT& current_image_estimate,
92 const TargetT& input,
93 const int subset_num) const override;
94
95public:
101 const DynamicProjData& get_dyn_proj_data() const;
102 const shared_ptr<DynamicProjData>& get_dyn_proj_data_sptr() const;
103 const int get_max_segment_num_to_process() const;
104 const bool get_zero_seg0_end_planes() const;
105 const DynamicProjData& get_additive_dyn_proj_data() const;
106 const shared_ptr<DynamicProjData>& get_additive_dyn_proj_data_sptr() const;
107 const ProjectorByBinPair& get_projector_pair() const;
108 const shared_ptr<ProjectorByBinPair>& get_projector_pair_sptr() const;
109 const BinNormalisation& get_normalisation() const;
110 const shared_ptr<BinNormalisation>& get_normalisation_sptr() const;
112
120 void set_recompute_sensitivity(const bool);
121 void set_sensitivity_sptr(const shared_ptr<TargetT>&);
122 int set_num_subsets(const int num_subsets) override;
123
124 void set_normalisation_sptr(const shared_ptr<BinNormalisation>&) override;
125 void set_additive_proj_data_sptr(const shared_ptr<ExamData>&) override;
126
127 void set_input_data(const shared_ptr<ExamData>&) override;
128 const DynamicProjData& get_input_data() const override;
130protected:
132 std::string _input_filename;
133
135 shared_ptr<DynamicProjData> _dyn_proj_data_sptr;
136
138
140
141 /**********************/
142 ParseAndCreateFrom<TargetT, DynamicProjData> target_parameter_parser;
143
144 /********************************/
148
149 shared_ptr<DynamicProjData> _additive_dyn_proj_data_sptr;
151 shared_ptr<BinNormalisation> _normalisation_sptr;
153 shared_ptr<ProjectorByBinPair> _projector_pair_ptr;
156 // Patlak Plot Parameters
158 shared_ptr<PatlakPlot> _patlak_plot_sptr;
161
162 bool actual_subsets_are_approximately_balanced(std::string& warning_message) const override;
163
165 const TargetT& current_estimate,
166 const int subset_num,
167 const bool add_sensitivity) override;
168
170
173 void set_defaults() override;
174 void initialise_keymap() override;
175 bool post_processing() override;
176};
177
178END_NAMESPACE_STIR
179
180//#include "stir/recon_buildblock/PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.inl"
181
182#endif
Declaration of class stir::DynamicDiscretisedDensity.
Declaration of class stir::DynamicProjData.
Declaration of class stir::KineticParameters.
Declaration of class stir::ParametricDiscretisedDensity.
Definition of the stir::ParseAndCreateFrom class for stir::ParametricDiscretisedDensity.
Implementation of functions of class stir::PatlakPlot.
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData.
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMean.
Declaration of class stir::RegisteredParsingObject.
defines the stir::VectorWithOffset class
Abstract base class for implementing bin-wise normalisation of data.
Definition BinNormalisation.h:52
Class of multiple image frames, one for each time frame Each time frame is a DiscretisedDensity<3,...
Definition DynamicDiscretisedDensity.h:46
Dynamic projection data.
Definition DynamicProjData.h:37
A base class for 'generalised' objective functions, i.e. objective functions for which at least a 'gr...
Definition GeneralisedObjectiveFunction.h:84
template for adding keywords to a parser and creating an object
Definition ParseAndCreateFrom.h:53
bool actual_subsets_are_approximately_balanced(std::string &warning_message) const override
Implementation of function that checks subset balancing.
int set_num_subsets(const int num_subsets) override
Attempts to change the number of subsets.
std::string _additive_dyn_proj_data_filename
name of file in which additive projection data are stored
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:146
void add_subset_sensitivity(TargetT &sensitivity, const int subset_num) const override
Add subset sensitivity to existing data.
void set_additive_proj_data_sptr(const shared_ptr< ExamData > &) override
set_additive_proj_data_sptr
shared_ptr< PatlakPlot > _patlak_plot_sptr
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:158
std::string _input_filename
Filename with input projection data.
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:132
static const char *const registered_name
Name which will be used when parsing a GeneralisedObjectiveFunction object.
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:64
Succeeded set_up_before_sensitivity(shared_ptr< const TargetT > const &target_sptr) override
set-up specifics for the derived class
Succeeded actual_accumulate_sub_Hessian_times_input_without_penalty(TargetT &output, const TargetT &current_image_estimate, const TargetT &input, const int subset_num) const override
Implementation of the function computes the sub-Hessian and multiplies by a vector.
shared_ptr< ProjectorByBinPair > _projector_pair_ptr
Stores the projectors that are used for the computations.
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:153
shared_ptr< BinNormalisation > _normalisation_sptr
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:151
void set_normalisation_sptr(const shared_ptr< BinNormalisation > &) override
set_normalisation_sptr
shared_ptr< DynamicProjData > _additive_dyn_proj_data_sptr
points to the additive projection data
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:149
bool post_processing() override
This will be called at the end of the parsing.
void actual_compute_subset_gradient_without_penalty(TargetT &gradient, const TargetT &current_estimate, const int subset_num, const bool add_sensitivity) override
computes the subset gradient of the objective function without the penalty (optional: add subset sens...
shared_ptr< DynamicProjData > _dyn_proj_data_sptr
points to the object for the total input projection data
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:135
int _max_segment_num_to_process
the maximum absolute ring difference number to use in the reconstruction
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:139
bool _zero_seg0_end_planes
signals whether to zero the data in the end planes of the projection data
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:155
DynamicDiscretisedDensity _dyn_image_template
dynamic image template
Definition PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.h:160
Succeeded actual_add_multiplication_with_approximate_sub_Hessian_without_penalty(TargetT &output, const TargetT &input, const int subset_num) const override
Implementation of the function that multiplies the approximate sub-Hessian with a vector.
const DynamicProjData & get_input_data() const override
get input data
double actual_compute_objective_function_without_penalty(const TargetT &current_estimate, const int subset_num) override
Implementation of function that computes the objective function for the current subset.
TargetT * construct_target_ptr() const override
Returns a pointer to a newly allocated target object (with 0 data).
void set_input_data(const shared_ptr< ExamData > &) override
set_input_data
An objective function class appropriate for PET emission data.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndProjData.h:125
a base class for LogLikelihood of independent Poisson variables where the mean values are linear comb...
Definition PoissonLogLikelihoodWithLinearModelForMean.h:112
Abstract base class for all projector pairs.
Definition ProjectorByBinPair.h:45
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