STIR
6.2.0
|
This class implements convolution of a 1D array with an arbitrary (i.e. potentially non-symmetric) kernel. More...
#include "stir/ArrayFilter1DUsingConvolution.h"
Public Member Functions | |
ArrayFilter1DUsingConvolution () | |
Construct a trivial filter. | |
ArrayFilter1DUsingConvolution (const VectorWithOffset< elemT > &filter_kernel, const BoundaryConditions::BC bc=BoundaryConditions::zero) | |
Construct the filter given the kernel coefficients. More... | |
bool | is_trivial () const override |
checks if the kernel corresponds to a trivial filter operation More... | |
Succeeded | get_influencing_indices (IndexRange< 1 > &influencing_indices, const IndexRange< 1 > &output_indices) const override |
Succeeded | get_influenced_indices (IndexRange< 1 > &influenced_indices, const IndexRange< 1 > &input_indices) const override |
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 |
This class implements convolution of a 1D array with an arbitrary (i.e. potentially non-symmetric) kernel.
Convolution is non-periodic:
Note that for most kernels, the above convention means that the zero- index of the kernel corresponds to the peak in the kernel.
By default, zero boundary conditions are used, i.e. elements of the input array that are outside its index range are considered to be 0.
Currently, "constant" boundary conditions are also implemented, i.e. elements of the input array that are outside its index range are considered to the same as the nearest element in the array (i.e. first element on the "left" and last element on the "right").
stir::ArrayFilter1DUsingConvolution< elemT >::ArrayFilter1DUsingConvolution | ( | const VectorWithOffset< elemT > & | filter_kernel, |
const BoundaryConditions::BC | bc = BoundaryConditions::zero |
||
) |
Construct the filter given the kernel coefficients.
Currently bc has to be BoundaryConditions::zero or BoundaryConditions::constant
|
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::error(), stir::VectorWithOffset< T >::get_length(), stir::VectorWithOffset< T >::get_max_index(), and stir::VectorWithOffset< T >::get_min_index().