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

This class implements an n -dimensional ArrayFunctionObject whose operation is separable. More...

#include "stir/SeparableArrayFunctionObject.h"

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

Public Member Functions

 SeparableArrayFunctionObject ()
 Default constructor, results in a trivial ArrayFunctionObject.
 
 SeparableArrayFunctionObject (const VectorWithOffset< shared_ptr< ArrayFunctionObject< 1, elemT >>> &)
 Constructor taking 1D ArrayFunctionObjects. More...
 
bool is_trivial () const override
 Should return true when the operations won't modify the object at all. More...
 
- Public Member Functions inherited from stir::ArrayFunctionObject_1ArgumentImplementation< num_dimensions, elemT >
void operator() (Array< num_dimensions, elemT > &array) const override
 in-place modification More...
 
void operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override
 result stored in another array, implemented inline
 
- 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 > &array) const override
 
- Protected Member Functions inherited from stir::ArrayFunctionObject_1ArgumentImplementation< num_dimensions, elemT >
virtual void do_it (Array< num_dimensions, elemT > &array) const =0
 

Protected Attributes

VectorWithOffset< shared_ptr< ArrayFunctionObject< 1, elemT > > > all_1d_array_filters
 

Detailed Description

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

This class implements an n -dimensional ArrayFunctionObject whose operation is separable.

'Separable' means that its operation consists of n 1D operations, one on each index of the n -dimensional array.

See also
in_place_apply_array_functions_on_each_index()

Constructor & Destructor Documentation

◆ SeparableArrayFunctionObject()

template<int num_dim, typename elemT >
stir::SeparableArrayFunctionObject< num_dim, elemT >::SeparableArrayFunctionObject ( const VectorWithOffset< shared_ptr< ArrayFunctionObject< 1, elemT >>> &  array_filters)

Constructor taking 1D ArrayFunctionObjects.

The 1d functino objects are passed in a VectorWithOffset which needs to have num_dimensions elements. (The starting index is irrelevant).

The shared_ptr's have to be either all null (a trivial object) or all non-null.

References stir::apply_array_functions_on_each_index(), stir::in_place_apply_array_functions_on_each_index(), and stir::SeparableArrayFunctionObject< num_dimensions, elemT >::is_trivial().

Member Function Documentation

◆ is_trivial()

template<int num_dim, typename elemT >
bool stir::SeparableArrayFunctionObject< num_dim, elemT >::is_trivial ( ) const
overridevirtual

Should return true when the operations won't modify the object at all.

For the 2 argument version, elements in out_array will be set to corresponding elements in in_array. Elements in out_array that do not occur in in_array will be set to 0.

Implements stir::ArrayFunctionObject< num_dimensions, elemT >.

Referenced by stir::SeparableArrayFunctionObject< num_dimensions, elemT >::SeparableArrayFunctionObject().


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