STIR 6.4.0
PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2006- 2011, Hammersmith Imanet Ltd
5
6 SPDX-License-Identifier: Apache-2.0
7
8 See STIR/LICENSE.txt for details
9*/
20
21#ifndef __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData_H__
22#define __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData_H__
23
28
29START_NAMESPACE_STIR
30// ChT::ToDo: If this class appears to be useful I have to define some of the functions that are not specifically defined, yet.
31
40
41template <typename TargetT>
43 : public RegisteredParsingObject<PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData<TargetT>,
44 GeneralisedObjectiveFunction<TargetT>,
45 PoissonLogLikelihoodWithLinearModelForMean<TargetT>>
46{
47private:
51 base_type;
53 VectorWithOffset<SingleFrameObjFunc> _single_frame_obj_funcs;
54
55public:
57 static const char* const registered_name;
58#if 0 // ChT::ToDo
60
62
65 virtual TargetT *
66 construct_target_ptr() const;
67
68 virtual void
70 const TargetT &current_estimate,
71 const int subset_num);
72
73 virtual float
74 actual_compute_objective_function_without_penalty(const TargetT& current_estimate,
75 const int subset_num);
76
77 virtual Succeeded set_up_before_sensitivity(shared_ptr <TargetT> const& target_sptr);
78
80 virtual void
81 add_subset_sensitivity(TargetT& sensitivity, const int subset_num) const;
82
90 void set_recompute_sensitivity(const bool);
91 void set_sensitivity_sptr(const shared_ptr<TargetT>&);
92
93 virtual int set_num_subsets(const int num_subsets);
95#endif // ChT::ToDo
96protected:
98 std::string _input_filename;
99
101 shared_ptr<DynamicProjData> _dyn_proj_data_sptr;
102
104
106
107 /**********************/
108 // image stuff
109 // TODO to be replaced with single class or so (TargetT obviously)
111
113 int _output_image_size_xy; // KT 10122001 appended _xy
114
116
118 int _output_image_size_z; // KT 10122001 new
119
121 double _zoom;
122
124 double _Xoffset;
125
127 double _Yoffset;
128
129 // KT 20/06/2001 new
131 double _Zoffset;
132
133 TimeFrameDefinitions _frame_defs;
134
135 /********************************/
139
140 shared_ptr<DynamicProjData> _additive_dyn_proj_data_sptr;
142 shared_ptr<BinNormalisation> _normalisation_sptr;
144 shared_ptr<ProjectorByBinPair> _projector_pair_ptr;
147
148 bool actual_subsets_are_approximately_balanced(std::string& warning_message) const;
149
151
154 virtual void set_defaults();
155 virtual void initialise_keymap();
156 virtual bool post_processing();
157};
158
159END_NAMESPACE_STIR
160
161#endif
Declaration of class stir::DynamicDiscretisedDensity.
Declaration of class stir::DynamicProjData.
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData.
defines the stir::VectorWithOffset class
A base class for 'generalised' objective functions, i.e. objective functions for which at least a 'gr...
Definition GeneralisedObjectiveFunction.h:84
virtual double actual_compute_objective_function_without_penalty(const TargetT &current_estimate, const int subset_num)=0
Implementation of function that computes the objective function for the current subset.
virtual int set_num_subsets(const int num_subsets)=0
Attempts to change the number of subsets.
virtual TargetT * construct_target_ptr() const =0
Creates a suitable target as determined by the parameters.
a base class for LogLikelihood of independent Poisson variables where the mean values are linear comb...
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:46
std::string _input_filename
Filename with input dynamic projection data.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:98
shared_ptr< DynamicProjData > _additive_dyn_proj_data_sptr
points to the additive projection data
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:140
static const char *const registered_name
Name which will be used when parsing a GeneralisedObjectiveFunction object.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:57
std::string _additive_dyn_proj_data_filename
name of file in which additive projection data are stored
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:137
bool actual_subsets_are_approximately_balanced(std::string &warning_message) const
Implementation of function that checks subset balancing.
shared_ptr< BinNormalisation > _normalisation_sptr
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:142
int _output_image_size_xy
the output image size in x and y direction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:113
double _Yoffset
offset in the y-direction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:127
int _max_segment_num_to_process
the maximum absolute ring difference number to use in the reconstruction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:105
virtual void initialise_keymap()
sets parsing keys
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.cxx:92
shared_ptr< ProjectorByBinPair > _projector_pair_ptr
Stores the projectors that are used for the computations.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:144
double _zoom
the zoom factor
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:121
double _Xoffset
offset in the x-direction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:124
shared_ptr< DynamicProjData > _dyn_proj_data_sptr
points to the object for the total input dynamic projection data
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:101
virtual void set_defaults()
Sets defaults for parsing.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.cxx:57
double _Zoffset
offset in the z-direction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:131
int _output_image_size_z
the output image size in z direction
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:118
bool _zero_seg0_end_planes
signals whether to zero the data in the end planes of the projection data
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:146
virtual bool post_processing()
This will be called at the end of the parsing.
Definition PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.cxx:122
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
virtual void add_subset_sensitivity(TargetT &sensitivity, const int subset_num) const =0
Add subset sensitivity to existing data.
virtual void compute_sub_gradient_without_penalty_plus_sensitivity(TargetT &gradient, const TargetT &current_estimate, const int subset_num)
This should compute the subset gradient of the (unregularised) objective function plus the subset sen...
Definition PoissonLogLikelihoodWithLinearModelForMean.cxx:364
virtual Succeeded set_up_before_sensitivity(shared_ptr< const TargetT > const &target_sptr)=0
set-up specifics for the derived class
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
Class used for storing time frame durations.
Definition TimeFrameDefinitions.h:39
A templated class for vectors, but with indices starting not from 0.
Definition VectorWithOffset.h:65