STIR  6.2.0
Public Member Functions | List of all members
stir::ArrayFilter1DUsingConvolutionSymmetricKernel< elemT > Class Template Reference

This class implements convolution of a 1D array with a symmetric kernel. More...

#include "stir/ArrayFilter1DUsingConvolutionSymmetricKernel.h"

Inheritance diagram for stir::ArrayFilter1DUsingConvolutionSymmetricKernel< elemT >:
Inheritance graph
[legend]

Public Member Functions

 ArrayFilter1DUsingConvolutionSymmetricKernel (const VectorWithOffset< elemT > &filter_kernel)
 Construct the filter given the kernel coefficients. More...
 
bool is_trivial () const override
 checks if the kernel corresponds to a trivial filter operation More...
 
- Public Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 1, 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...
 

Additional Inherited Members

- Protected Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 1, elemT >
virtual void do_it (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const=0
 

Detailed Description

template<typename elemT>
class stir::ArrayFilter1DUsingConvolutionSymmetricKernel< elemT >

This class implements convolution of a 1D array with a symmetric kernel.

Convolution is non-periodic:

\[ out_i = \sum_j kernel_j in_{i+j} \]

Elements of the input array that are outside its index range are considered to be 0.

Warning
2 argument operator() currently requires that out_array and in_array have the same index range

Constructor & Destructor Documentation

◆ ArrayFilter1DUsingConvolutionSymmetricKernel()

template<typename elemT >
stir::ArrayFilter1DUsingConvolutionSymmetricKernel< elemT >::ArrayFilter1DUsingConvolutionSymmetricKernel ( const VectorWithOffset< elemT > &  filter_kernel)

Construct the filter given the kernel coefficients.

Only one half of the kernel coefficients has to be passed. The implementation uses a kernel whose coefficients are given by

kernel[i] == filter_kernel[abs(i)]
Warning
filter_kernel's indices must start from 0

References stir::VectorWithOffset< T >::get_length(), and stir::VectorWithOffset< T >::get_min_index().

Member Function Documentation

◆ is_trivial()

template<typename elemT >
bool stir::ArrayFilter1DUsingConvolutionSymmetricKernel< 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 >.

References stir::VectorWithOffset< T >::fill(), stir::VectorWithOffset< T >::get_length(), stir::VectorWithOffset< T >::get_max_index(), stir::VectorWithOffset< T >::get_min_index(), and stir::VectorWithOffset< T >::grow().


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