STIR  6.2.0
Reconstruction.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000 PARAPET partners
5  Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
6  Copyright (C) 2018, University College London
7  This file is part of STIR.
8 
9  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
10 
11  See STIR/LICENSE.txt for details
12 */
13 #ifndef __stir_recon_buildblock_Reconstruction_H__
14 #define __stir_recon_buildblock_Reconstruction_H__
15 
28 #include "stir/TimedObject.h"
29 #include "stir/ParsingObject.h"
30 #include "stir/shared_ptr.h"
31 #include "stir/DataProcessor.h"
33 #include "stir/RegisteredObject.h"
34 #include <string>
35 
36 #include "stir/ExamData.h"
37 
38 START_NAMESPACE_STIR
39 
40 class Succeeded;
41 
68 template <typename TargetT>
69 class Reconstruction : public RegisteredObject<Reconstruction<TargetT>>, public TimedObject
70 {
71 public:
74 
76  ~Reconstruction() override{};
77 
79  virtual std::string method_info() const = 0;
80 
82 
85  virtual Succeeded reconstruct() = 0;
86 
88 
100  virtual Succeeded reconstruct(shared_ptr<TargetT> const& target_image_sptr) = 0;
101 
103 
111  virtual Succeeded set_up(shared_ptr<TargetT> const& target_data_sptr);
112 
119 
121  void set_output_filename_prefix(const std::string&);
122 
124  void set_output_file_format_ptr(const shared_ptr<OutputFileFormat<TargetT>>&);
125 
127  void set_post_processor_sptr(const shared_ptr<DataProcessor<TargetT>>&);
128 
130  virtual void set_input_data(const shared_ptr<ExamData>&) = 0;
132 
133  virtual const ExamData& get_input_data() const = 0;
135 
143  void set_disable_output(bool _val);
144 
150  shared_ptr<TargetT> get_target_image();
151 
152  // parameters
153 protected:
156 
158  shared_ptr<OutputFileFormat<TargetT>> output_file_format_ptr;
159 
161  shared_ptr<DataProcessor<TargetT>> post_filter_sptr;
162 
163 protected:
165 
169  virtual void check(TargetT const& target_data) const;
170  bool _already_set_up;
171 
185  void initialise(const std::string& parameter_filename);
186 
187  void set_defaults() override;
188  void initialise_keymap() override;
190 
202  bool post_processing() override;
203 
207  shared_ptr<TargetT> target_data_sptr;
208 
216 
219 };
220 
221 END_NAMESPACE_STIR
222 
223 #endif
std::string output_filename_prefix
file name for output reconstructed images
Definition: Reconstruction.h:155
bool _disable_output
_disable_output
Definition: Reconstruction.h:215
Declaration of class stir::DataProcessor.
declaration of stir::ExamData
Declaration of class stir::ParsingObject.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
base class for all objects which need timers. At the moment, there&#39;s only a CPU timer.
Definition: TimedObject.h:35
Declaration of class stir::OutputFileFormat.
shared_ptr< TargetT > target_data_sptr
target_data_sptr
Definition: Reconstruction.h:207
Declaration of class stiir::RegisteredObject.
declares the stir::TimedObject class
Helper class to provide registry mechanisms to a Base classSuppose you have a hierarchy of classes wi...
Definition: RegisteredObject.h:95
shared_ptr< DataProcessor< TargetT > > post_filter_sptr
post-filter
Definition: Reconstruction.h:161
base class for all ReconstructionsAs there is not a lot of commonality between different reconstructi...
Definition: Reconstruction.h:69
~Reconstruction() override
virtual destructor
Definition: Reconstruction.h:76
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
int _verbosity
Verbosity level.
Definition: Reconstruction.h:218
Base class for classes that create output files.
Definition: OutputFileFormat.h:55
base class for data objects such as ProjData etcProvides an ExamInfo member.
Definition: ExamData.h:33
shared_ptr< OutputFileFormat< TargetT > > output_file_format_ptr
defines the format of the output files
Definition: Reconstruction.h:158