STIR 6.4.0
FilterRootPrior.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
5 This file is part of STIR.
6
7 SPDX-License-Identifier: Apache-2.0
8
9 See STIR/LICENSE.txt for details
10*/
20
21#ifndef __stir_recon_buildblock_FilterRootPrior_H__
22#define __stir_recon_buildblock_FilterRootPrior_H__
23
26#include "stir/shared_ptr.h"
27
28START_NAMESPACE_STIR
29
30template <typename DataT>
31class DataProcessor;
32
63template <typename DataT>
64class FilterRootPrior : public RegisteredParsingObject<FilterRootPrior<DataT>, GeneralisedPrior<DataT>, GeneralisedPrior<DataT>>
65{
66private:
68
69public:
71 static const char* const registered_name;
72
75
77 FilterRootPrior(shared_ptr<DataProcessor<DataT>> const&, const float penalization_factor);
78
79 bool is_convex() const override;
80
82
85 double compute_value(const DataT& current_estimate) override;
86
88 void compute_gradient(DataT& prior_gradient, const DataT& current_estimate) override;
89
91 Succeeded set_up(shared_ptr<const DataT> const& target_sptr) override;
92
93protected:
95 void check(DataT const& current_image_estimate) const override;
96
97private:
98 shared_ptr<DataProcessor<DataT>> filter_ptr;
99 void set_defaults() override;
100 void initialise_keymap() override;
101};
102
103END_NAMESPACE_STIR
104
105#endif
Declaration of class stir::GeneralisedPrior.
Declaration of class stir::RegisteredParsingObject.
Base class that defines an interface for classes that do data processing.
Definition DataProcessor.h:47
bool is_convex() const override
Indicates if the prior is a smooth convex function.
Definition FilterRootPrior.cxx:45
double compute_value(const DataT &current_estimate) override
compute the value of the function
Definition FilterRootPrior.cxx:79
static const char *const registered_name
Name which will be used when parsing a GeneralisedPrior object.
Definition FilterRootPrior.h:71
FilterRootPrior()
Default constructor (no filter)
Definition FilterRootPrior.cxx:31
void compute_gradient(DataT &prior_gradient, const DataT &current_estimate) override
compute gradient by applying the filter
Definition FilterRootPrior.cxx:92
void check(DataT const &current_image_estimate) const override
Check that the prior is ready to be used.
Definition FilterRootPrior.cxx:163
Succeeded set_up(shared_ptr< const DataT > const &target_sptr) override
Has to be called before using this object.
Definition FilterRootPrior.cxx:154
A base class for 'generalised' priors, i.e. priors for which at least a 'gradient' is defined.
Definition GeneralisedPrior.h:44
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
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...