STIR
6.2.0
|
This class implements convolution of an array of real numbers with an arbitrary (i.e. potentially non-symmetric) kernel using DFTs. More...
#include "stir/ArrayFilterUsingRealDFTWithPadding.h"
Public Member Functions | |
ArrayFilterUsingRealDFTWithPadding () | |
Default constructor (trivial kernel) | |
ArrayFilterUsingRealDFTWithPadding (const Array< num_dimensions, elemT > &real_filter_kernel) | |
Construct the filter given the real kernel coefficients. More... | |
ArrayFilterUsingRealDFTWithPadding (const Array< num_dimensions, std::complex< elemT >> &kernel_in_frequency_space) | |
Construct the filter given the complex kernel coefficients. More... | |
Succeeded | set_kernel (const Array< num_dimensions, elemT > &real_filter_kernel) |
set the real kernel coefficients | |
Succeeded | set_kernel_in_frequency_space (const Array< num_dimensions, std::complex< elemT >> &kernel_in_frequency_space) |
set the complex kernel coefficients | |
bool | is_trivial () const override |
checks if the kernel corresponds to a trivial filter operation More... | |
Public Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT > | |
void | operator() (Array< num_dimensions, elemT > &array) const override |
in-place modification of array, implemented inline | |
void | operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override |
result stored in another array More... | |
Public Member Functions inherited from stir::ArrayFunctionObject< num_dimensions, elemT > | |
virtual Succeeded | get_influencing_indices (IndexRange< num_dimensions > &influencing_indices, const IndexRange< num_dimensions > &output_indices) const |
sets the range of indices that influences the result in a set of coordinates output_indices More... | |
virtual Succeeded | get_influenced_indices (IndexRange< num_dimensions > &influenced_indices, const IndexRange< num_dimensions > &input_indices) const |
sets the range of indices that gets influenced by a set of coordinate input_indices More... | |
Protected Member Functions | |
void | do_it (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override |
Performs the convolution. More... | |
Protected Attributes | |
Array< num_dimensions, std::complex< elemT > > | kernel_in_frequency_space |
This class implements convolution of an array of real numbers with an arbitrary (i.e. potentially non-symmetric) kernel using DFTs.
Convolution is periodic.
Elements of the input array that are outside its index range are considered to be 0.
If the input and output arrays are smaller than half the length of the kernel, then there is enough zero-padding such that aliasing cannot occur. In this case, this class gives the same results as ArrayFilter1DUsingConvolution.
stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >::ArrayFilterUsingRealDFTWithPadding | ( | const Array< num_dimensions, elemT > & | real_filter_kernel | ) |
Construct the filter given the real kernel coefficients.
stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >::ArrayFilterUsingRealDFTWithPadding | ( | const Array< num_dimensions, std::complex< elemT >> & | kernel_in_frequency_space | ) |
Construct the filter given the complex kernel coefficients.
|
overridevirtual |
checks if the kernel corresponds to a trivial filter operation
trivial means, either the kernel has 0 length, or length 1 and its only element is 1
Implements stir::ArrayFunctionObject< num_dimensions, elemT >.
|
overrideprotectedvirtual |
Performs the convolution.
in_array and out_array can have arbitrary (even non-regular) index ranges. However, they will copied (if necessary) using wrap-around to/from an array with the same dimensions as the 'real' kernel.
Implements stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT >.