| cartodata
    5.1.2
    | 
Volume utilities classes. More...
#include <cartodata/volume/volumeutil.h>


| Static Public Member Functions | |
| template<class UnaryFunction > | |
| static VolumeRef< T > | apply (UnaryFunction f, const VolumeRef< T > &o) | 
| applies a unary function to each voxel of a volume  More... | |
| template<class UnaryFunction > | |
| static void | selfApply (UnaryFunction f, VolumeRef< T > &o) | 
| applies a binary function to each voxel of a pair of volumes  More... | |
| template<class BinaryFunction > | |
| static void | selfApply (BinaryFunction f, VolumeRef< T > &o1, const VolumeRef< T > &o2) | 
| same as apply() except that the first input volume is used to store the result  More... | |
| template<class BinaryFunction > | |
| static T | accumulate (BinaryFunction f, const VolumeRef< T > &o2, T initial) | 
| Apply a binary function to each voxel of the volume, with a "current" value as second argument.  More... | |
| template<class BinaryFunction > | |
| static T | accumulate (BinaryFunction f, const Volume< T > &o2, T initial) | 
Volume utilities classes.
Definition at line 1654 of file volumeutil.h.
| 
 | static | 
| 
 | inlinestatic | 
Apply a binary function to each voxel of the volume, with a "current" value as second argument.
The voxel result is used for other voxels function calls. Useful for min/max for instance: min = VolumeUtil<T>::accumulate( std::min<T>, volume, std::numeric_limits<T>::max() ); max = VolumeUtil::accumulate( std::max<T>, volume, -std::numeric_limits<T>::max() ); May be used also for sum etc.
Definition at line 1684 of file volumeutil.h.
Referenced by carto::VolumeUtilBase< T, true >::max(), and carto::VolumeUtilBase< T, true >::min().
| 
 | static | 
applies a unary function to each voxel of a volume
Definition at line 74 of file volumeutil_d.h.
References carto::VolumeRef< T >::at(), carto::NDIterator_base::ended(), carto::VolumeRef< T >::getSize(), carto::VolumeRef< T >::getStrides(), carto::VolumeRef< T >::header(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), and carto::const_line_NDIterator< class >::line_length().
| 
 | static | 
same as apply() except that the first input volume is used to store the result
Definition at line 314 of file volumeutil_d.h.
References carto::VolumeRef< T >::at(), carto::NDIterator_base::ended(), carto::VolumeRef< T >::getSize(), carto::VolumeRef< T >::getSizeT(), carto::VolumeRef< T >::getSizeX(), carto::VolumeRef< T >::getSizeY(), carto::VolumeRef< T >::getSizeZ(), carto::VolumeRef< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), and carto::line_NDIterator< class >::line_length().
| 
 | static | 
applies a binary function to each voxel of a pair of volumes
same as apply() except that the input volume is used to store the result
Definition at line 299 of file volumeutil_d.h.
References carto::VolumeRef< T >::at(), carto::NDIterator_base::ended(), carto::VolumeRef< T >::getSize(), carto::VolumeRef< T >::getStrides(), carto::line_NDIterator< class >::inc_line_ptr(), and carto::line_NDIterator< class >::line_length().