STIR  6.2.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 */
21 #ifndef __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData_H__
22 #define __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData_H__
23 
25 #include "stir/VectorWithOffset.h"
26 #include "stir/DynamicProjData.h"
28 
29 START_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 
41 template <typename TargetT>
43  : public RegisteredParsingObject<PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData<TargetT>,
44  GeneralisedObjectiveFunction<TargetT>,
45  PoissonLogLikelihoodWithLinearModelForMean<TargetT>>
46 {
47 private:
51  base_type;
53  VectorWithOffset<SingleFrameObjFunc> _single_frame_obj_funcs;
54 
55 public:
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
69  compute_sub_gradient_without_penalty_plus_sensitivity(TargetT& gradient,
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
96 protected:
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 
159 END_NAMESPACE_STIR
160 
161 #endif
shared_ptr< DynamicProjData > _additive_dyn_proj_data_sptr
points to the additive projection data
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:140
Class used for storing time frame durations.
Definition: TimeFrameDefinitions.h:38
shared_ptr< ProjectorByBinPair > _projector_pair_ptr
Stores the projectors that are used for the computations.
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:144
A templated class for vectors, but with indices starting not from 0.
Definition: ArrayFilter1DUsingConvolution.h:31
int _output_image_size_z
the output image size in z direction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:118
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData. ...
double _Zoffset
offset in the z-direction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:131
A base class for &#39;generalised&#39; objective functions, i.e. objective functions for which at least a &#39;gr...
Definition: GeneralisedObjectiveFunction.h:83
shared_ptr< DynamicProjData > _dyn_proj_data_sptr
points to the object for the total input dynamic projection data
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:101
double _zoom
the zoom factor
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:121
static const char *const registered_name
Name which will be used when parsing a GeneralisedObjectiveFunction object.
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:57
bool _zero_seg0_end_planes
signals whether to zero the data in the end planes of the projection data
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:146
a base class for LogLikelihood of independent Poisson variables where the mean values are linear comb...
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:42
Declaration of class stir::DynamicDiscretisedDensity.
shared_ptr< BinNormalisation > _normalisation_sptr
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:142
int _max_segment_num_to_process
the maximum absolute ring difference number to use in the reconstruction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:105
std::string _input_filename
Filename with input dynamic projection data.
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:98
double _Xoffset
offset in the x-direction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:124
double _Yoffset
offset in the y-direction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:127
defines the stir::VectorWithOffset class
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
std::string _additive_dyn_proj_data_filename
name of file in which additive projection data are stored
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:137
Declaration of class stir::DynamicProjData.
a base class for LogLikelihood of independent Poisson variables where the mean values are linear comb...
Definition: KOSMAPOSLReconstruction.h:39
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
An objective function class appropriate for PET emission data.
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndProjData.h:121
int _output_image_size_xy
the output image size in x and y direction
Definition: PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData.h:113