STIR 6.4.0
SqrtHessianRowSum.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2020, University College London
3 This file is part of STIR.
4
5 SPDX-License-Identifier: Apache-2.0
6
7 See STIR/LICENSE.txt for details
8*/
9
18
19#ifndef STIR_SQRTHESSIANROWSUM_H
20#define STIR_SQRTHESSIANROWSUM_H
21
22#include "stir/info.h"
25#include "stir/is_null_ptr.h"
31
32START_NAMESPACE_STIR
33
34class Succeeded;
35
57template <typename TargetT>
58class SqrtHessianRowSum : public ParsingObject
59{
60public:
62
64 explicit SqrtHessianRowSum(const std::string&);
65
67
69 void set_defaults() override;
70
72
74 void process_data();
75
77
78 GeneralisedObjectiveFunction<TargetT> const& get_objective_function_sptr();
79 void set_objective_function_sptr(const shared_ptr<GeneralisedObjectiveFunction<TargetT>>& obj_fun);
81
83
84 shared_ptr<TargetT> get_input_image_sptr();
85 void set_input_image_sptr(shared_ptr<TargetT> const& image);
87
89 shared_ptr<TargetT> get_output_target_sptr();
90
91 void set_up();
92
94
95 bool get_use_approximate_hessian() const;
96 void set_use_approximate_hessian(bool use_approximate);
98
100
101 bool get_compute_with_penalty() const;
102 void set_compute_with_penalty(bool with_penalty);
104
108
112
113protected:
114 bool _already_setup = false;
115
116private:
118 shared_ptr<GeneralisedObjectiveFunction<TargetT>> objective_function_sptr;
119
121 std::string output_filename;
122
124 std::string input_image_filename;
125
127 shared_ptr<TargetT> input_image_sptr;
128
130 shared_ptr<TargetT> output_target_sptr;
131
136 bool use_approximate_hessian;
137
140 bool compute_with_penalty;
141
143 shared_ptr<OutputFileFormat<TargetT>> output_file_format_sptr;
144
146 int _verbosity;
147
149 bool post_processing() override;
150 void initialise_keymap() override;
151};
152
153END_NAMESPACE_STIR
154#endif // STIR_SQRTHESSIANROWSUM_H
Declaration of class stir::GeneralisedObjectiveFunction.
Declaration of class stir::GeneralisedPrior.
Declaration of class stir::OutputFileFormat.
Declaration of class stir::PoissonLogLikelihoodWithLinearKineticModelAndDynamicProjectionData.
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData.
A base class for 'generalised' objective functions, i.e. objective functions for which at least a 'gr...
Definition GeneralisedObjectiveFunction.h:84
SqrtHessianRowSum()
Default constructor.
Definition SqrtHessianRowSum.cxx:33
shared_ptr< TargetT > get_output_target_sptr()
get method for returning the sqrt row sum image
Definition SqrtHessianRowSum.cxx:124
void compute_approximate_Hessian_row_sum()
Computes the approximate Hessian of the objective function. Cannot use penalty's approximate Hessian,...
Definition SqrtHessianRowSum.cxx:225
void set_defaults() override
sets default values
Definition SqrtHessianRowSum.cxx:47
void compute_Hessian_row_sum()
Computes the objective function Hessian row sum at the current image estimate. Can compute the penalt...
Definition SqrtHessianRowSum.cxx:207
void process_data()
The main function to compute and save the sqrt of the Hessian row sum volume.
Definition SqrtHessianRowSum.cxx:178
Declaration of stir::info()
Definition of stir::is_null_ptr functions.
Declaration of stir::read_from_file functions (providing easy access to class stir::InputFileFormatRe...
Declaration of class stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion.