STIR 6.4.0
SRT2DSPECTReconstruction.h
Go to the documentation of this file.
1//
2//
3#ifndef __stir_analytic_SRT2DSPECT_SRT2DSPECTReconstruction_H__
4#define __stir_analytic_SRT2DSPECT_SRT2DSPECTReconstruction_H__
5/*
6 Copyright (C) 2014-2016, 2023-2024, Dimitra Kyriakopoulou
7 Copyright (C) 2024, University College London
8 This file is part of STIR.
9
10 SPDX-License-Identifier: Apache-2.0
11
12 See STIR/LICENSE.txt for details
13*/
28
31#include "stir/shared_ptr.h"
32#include <string>
33#include <vector>
34
35START_NAMESPACE_STIR
36
37template <int num_dimensions, typename elemT>
38class DiscretisedDensity;
39class Succeeded;
40class ProjData;
41
78
79class SRT2DSPECTReconstruction : public RegisteredParsingObject<SRT2DSPECTReconstruction,
80 Reconstruction<DiscretisedDensity<3, float>>,
81 AnalyticReconstruction>
82{
83 // typedef AnalyticReconstruction base_type;
85 base_type;
86#ifdef SWIG
87 // work-around swig problem. It gets confused when using a private (or protected)
88 // typedef in a definition of a public typedef/member
89 public:
90#else
91private:
92#endif
93 typedef DiscretisedDensity<3, float> TargetT;
94
95public:
97 static constexpr const char* const registered_name = "SRT2DSPECT";
98
105 explicit SRT2DSPECTReconstruction(const std::string& parameter_filename);
106
107 SRT2DSPECTReconstruction(const shared_ptr<ProjData>& proj_data_ptr_v);
108
109 virtual std::string method_info() const;
110
111 virtual void ask_parameters();
112
113 virtual Succeeded set_up(shared_ptr<TargetT> const& target_data_sptr);
114
115protected: // make parameters protected such that doc shows always up in doxygen
116 // parameters used for parsing
117
119
125 float thres_restr_bound;
126 std::vector<double> thres_restr_bound_vector;
127 shared_ptr<ProjData> atten_data_ptr;
128
129private:
130 Succeeded actual_reconstruct(shared_ptr<DiscretisedDensity<3, float>> const& target_image_ptr);
131
132 virtual void set_defaults();
133 virtual void initialise_keymap();
134 virtual bool post_processing();
135
150 float hilbert_node(
151 float x, const std::vector<float>& f, const std::vector<float>& ddf, const std::vector<float>& p, int sp, float fn) const;
152
169 float hilbert(float x,
170 const std::vector<float>& f,
171 const std::vector<float>& ddf,
172 const std::vector<float>& p,
173 int sp,
174 std::vector<float>& lg) const;
175
195 void hilbert_der_double(float x,
196 const std::vector<float>& f,
197 const std::vector<float>& ddf,
198 const std::vector<float>& f1,
199 const std::vector<float>& ddf1,
200 const std::vector<float>& p,
201 int sp,
202 float* dhp,
203 float* dh1p,
204 const std::vector<float>& lg) const;
205
221 float splint(const std::vector<float>& xa, const std::vector<float>& ya, const std::vector<float>& y2a, int n, float x) const;
222
236 void spline(const std::vector<float>& x, const std::vector<float>& y, int n, std::vector<float>& y2) const;
237
248 float integ(float dist, int max, float ff[]) const;
249};
250
251END_NAMESPACE_STIR
252
253#endif
declares the stir::AnalyticReconstruction class
Declaration of class stir::RegisteredParsingObject.
base class for all analytic reconstruction algorithmsThis class provides extra functinoality (compare...
Definition AnalyticReconstruction.h:51
This abstract class is the basis for all image representations.
Definition DiscretisedDensity.h:99
shared_ptr< DiscretisedDensity< 3, float > > target_data_sptr
Definition Reconstruction.h:207
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files.
Definition RegisteredParsingObject.h:78
std::string attenuation_projection_filename
number of segments to combine (with SSRB) before starting 2D reconstruction
Definition SRT2DSPECTReconstruction.h:124
virtual std::string method_info() const
gives method information
Definition SRT2DSPECTReconstruction.cxx:95
SRT2DSPECTReconstruction()
Default constructor (calls set_defaults())
Definition SRT2DSPECTReconstruction.cxx:106
static constexpr const char *const registered_name
Name which will be used when parsing a reconstruction object.
Definition SRT2DSPECTReconstruction.h:97
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...