STIR  6.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT > Class Template Reference

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"

Inheritance diagram for stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >:
Inheritance graph
[legend]

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
 

Detailed Description

template<int num_dimensions, typename elemT>
class stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >

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.

Constructor & Destructor Documentation

◆ ArrayFilterUsingRealDFTWithPadding() [1/2]

template<int num_dimensions, typename elemT>
stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >::ArrayFilterUsingRealDFTWithPadding ( const Array< num_dimensions, elemT > &  real_filter_kernel)

Construct the filter given the real kernel coefficients.

See also
set_kernel(const Array<num_dimensions, elemT>&)
Warning
Will call error() when sizes are not appropriate

◆ ArrayFilterUsingRealDFTWithPadding() [2/2]

template<int num_dimensions, typename elemT>
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.

See also
set_kernel(const Array<num_dimensions, std::complex<elemT> >&)
Warning
Will call error() when sizes are not appropriate.
This function is disabled for VC 6.0 because of compiler limitations

Member Function Documentation

◆ is_trivial()

template<int num_dimensions, typename elemT >
bool stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >::is_trivial ( ) const
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 >.

◆ do_it()

template<int num_dimensions, typename elemT>
void stir::ArrayFilterUsingRealDFTWithPadding< num_dimensions, elemT >::do_it ( Array< num_dimensions, elemT > &  out_array,
const Array< num_dimensions, elemT > &  in_array 
) const
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 >.


The documentation for this class was generated from the following files: