STIR  6.2.0
Namespaces | Macros | Functions

This include file provides some additional functionality for stir::Array objects. More...

#include "stir/Array.h"
#include "stir/shared_ptr.h"
#include "stir/ArrayFunctionObject.h"
#include "stir/ArrayFunction.inl"

Go to the source code of this file.

Namespaces

 stir
 Namespace for the STIR library (and some/most of its applications)
 

Macros

#define ActualFunctionObjectPtrIter   shared_ptr<ArrayFunctionObject<1, elemT>> const*
 

Functions

template<class elemT >
Array< 1, elemT > & stir::in_place_log (Array< 1, elemT > &v)
 Replace elements by their logarithm, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_log (Array< num_dimensions, elemT > &v)
 apply log to each element of the multi-dimensional array More...
 
template<class elemT >
Array< 1, elemT > & stir::in_place_exp (Array< 1, elemT > &v)
 Replace elements by their exponentiation, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_exp (Array< num_dimensions, elemT > &v)
 apply exp to each element of the multi-dimensional array More...
 
template<class elemT >
Array< 1, elemT > & stir::in_place_abs (Array< 1, elemT > &v)
 Replace elements by their absolute value, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_abs (Array< num_dimensions, elemT > &v)
 store absolute value of each element of the multi-dimensional array More...
 
template<class T , class FUNCTION >
T & stir::in_place_apply_function (T &v, FUNCTION f)
 apply any function(object) to each element of the multi-dimensional array More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtr >
void stir::in_place_apply_array_function_on_1st_index (Array< num_dim, elemT > &array, FunctionObjectPtr f)
 Apply a function object on all possible 1d arrays extracted by keeping all indices fixed, except the first one. More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtr >
void stir::apply_array_function_on_1st_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, FunctionObjectPtr f)
 apply any function(object) to each element of the multi-dimensional array, storing results in a different array More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtrIter >
void stir::in_place_apply_array_functions_on_each_index (Array< num_dim, elemT > &array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects on every dimension of the input array. More...
 
template<typename elemT , typename FunctionObjectPtrIter >
void stir::in_place_apply_array_functions_on_each_index (Array< 1, elemT > &array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 1d specialisation of the above.
 
template<int num_dim, typename elemT , typename FunctionObjectPtrIter >
void stir::apply_array_functions_on_each_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects on every dimension of the input array, store in output array. More...
 
template<int num_dim, typename elemT >
void stir::apply_array_functions_on_each_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, ActualFunctionObjectPtrIter start, ActualFunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects of a specific type on every dimension of the input array, store in output array. More...
 
template<typename elemT >
void stir::apply_array_functions_on_each_index (Array< 1, elemT > &out_array, const Array< 1, elemT > &in_array, ActualFunctionObjectPtrIter start, ActualFunctionObjectPtrIter stop)
 1d specialisation of above
 
template<typename elemT , typename FunctionObjectPtrIter >
void stir::apply_array_functions_on_each_index (Array< 1, elemT > &out_array, const Array< 1, elemT > &in_array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 1d specialisation for general function objects
 
template<int num_dim, typename elemT >
void stir::transform_array_to_periodic_indices (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array)
 
template<int num_dim, typename elemT >
void stir::transform_array_from_periodic_indices (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array)
 

Detailed Description

This include file provides some additional functionality for stir::Array objects.

Author
Kris Thielemans (loosely based on some earlier work by Darren Hague)
PARAPET project
Warning
Compilers without partial specialisation of templates are catered for by explicit instantiations. If you need it for any other types, you'd have to add them by hand.