STIR  6.2.0
NonseparableConvolutionUsingRealDFTImageFilter.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2007- 2007, Hammersmith Imanet
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8  See STIR/LICENSE.txt for details
9 */
10 
21 #ifndef __stir_NonseparableConvolutionUsingRealDFTImageFilter_H__
22 #define __stir_NonseparableConvolutionUsingRealDFTImageFilter_H__
23 
27 #include "stir/DataProcessor.h"
29 #include "stir/VectorWithOffset.h"
30 
31 START_NAMESPACE_STIR
32 
33 // TODO!! remove define
34 // currently fixed at 3 because I didn't really have a good idea for the parsing
35 // keywords in n dimensions.
36 //
37 #define num_dimensions 3
38 
65 template <typename elemT>
67  : public RegisteredParsingObject<NonseparableConvolutionUsingRealDFTImageFilter<elemT>,
68  DataProcessor<DiscretisedDensity<3, elemT>>,
69  DataProcessor<DiscretisedDensity<3, elemT>>>
70 {
71 private:
74  DataProcessor<DiscretisedDensity<3, elemT>>>
75  base_type;
76 
77 public:
79  static const char* const registered_name;
80 
83 
85 
90 
91 private:
92  std::string _kernel_filename;
93  shared_ptr<DiscretisedDensity<num_dimensions, elemT>> _kernel_sptr;
94  shared_ptr<ArrayFilterUsingRealDFTWithPadding<num_dimensions, elemT>> _array_filter_sptr; // ChT::float
95  Array<num_dimensions, elemT> _filter_coefficients;
96 
97  void set_defaults() override;
98  void initialise_keymap() override;
99  bool post_processing() override;
100 
101  Succeeded virtual_set_up(const DiscretisedDensity<num_dimensions, elemT>& image) override;
102  void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& out_density,
103  const DiscretisedDensity<num_dimensions, elemT>& in_density) const override;
104  void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& density) const override;
105 };
106 
107 #undef num_dimensions
108 
109 END_NAMESPACE_STIR
110 
111 #endif
static const char *const registered_name
Name for parsing registry.
Definition: NonseparableConvolutionUsingRealDFTImageFilter.h:79
Declaration of class stir::DataProcessor.
A class derived from DataProcessor for performing separable periodic convolutions with an array kerne...
Definition: NonseparableConvolutionUsingRealDFTImageFilter.h:66
Base class that defines an interface for classes that do data processing.
Definition: DataProcessor.h:46
defines the stir::DiscretisedDensity class
Declaration of class stir::ArrayFilterUsingRealDFTWithPadding.
Declaration of class NonseparableConvolutionUsingRealDFTImageFilter.
defines the stir::VectorWithOffset class
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:73
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
This abstract class is the basis for all image representations.
Definition: FBP2DReconstruction.h:35