STIR  6.2.0
Classes | Functions
Generic fill/copy functionality for STIR object from/to iterators
Collaboration diagram for Generic fill/copy functionality for STIR object from/to iterators:

Classes

struct  stir::CopyFill< T >
 Helper class for stir::copy_to and stir::fill_from. More...
 
struct  stir::CopyFill< Array< num_dimensions, elemT > >
 Helper class for stir::copy_to and stir::fill_from. More...
 
struct  stir::CopyFill< ProjData >
 Helper class for stir::copy_to and stir::fill_from. More...
 
struct  stir::CopyFill< DynamicProjData >
 Copy all bins to a range specified by an iterator. More...
 
struct  stir::CopyFill< MultipleProjData >
 Copy all bins to a range specified by an iterator. More...
 

Functions

template<typename T , typename iterT >
iterT stir::copy_to (const T &stir_object, iterT iter)
 Copy all bins to a range specified by a iterator. More...
 
template<typename T , typename iterT >
void stir::fill_from (T &stir_object, iterT iter, iterT iter_end)
 set all elements of stir_object from an iterator More...
 
template<typename iterT >
void stir::fill_from (DynamicProjData &stir_object, iterT iter, iterT)
 set all elements of a MultipleProjData from an iterator More...
 

Detailed Description

Todo:
current mechanism requires overloading for specific classes. This could be resolved using SFINAE.

Function Documentation

◆ copy_to()

template<typename T , typename iterT >
iterT stir::copy_to ( const T &  stir_object,
iterT  iter 
)
inline

Copy all bins to a range specified by a iterator.

Returns
iter advanced over the range (as std::copy)
Warning
there is no range-check on iter

◆ fill_from() [1/2]

template<typename T , typename iterT >
void stir::fill_from ( T &  stir_object,
iterT  iter,
iterT  iter_end 
)
inline

set all elements of stir_object from an iterator

Warning
there is no size/range-check on iter

◆ fill_from() [2/2]

template<typename iterT >
void stir::fill_from ( DynamicProjData stir_object,
iterT  iter,
iterT   
)

set all elements of a MultipleProjData from an iterator

Implementation that resorts to MultipleProjData::fill_from

Warning
there is no size/range-check on iter