|
cartodata 6.0.0
|
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 | |
| template<class UnaryFunction> | |
| static void | selfApply (UnaryFunction f, VolumeRef< T > &o) |
| applies a binary function to each voxel of a pair of volumes | |
| 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 | |
| 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. | |
| template<class BinaryFunction> | |
| static T | accumulate (BinaryFunction f, const Volume< T > &o2, T initial) |
Volume utilities classes.
Definition at line 1655 of file volumeutil.h.
|
static |
Definition at line 347 of file volumeutil_d.h.
References carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< typename T >::inc_line_ptr(), and carto::const_line_NDIterator< typename T >::line_length().
|
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 1685 of file volumeutil.h.
References accumulate().
Referenced by accumulate(), 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< typename T >::inc_line_ptr(), carto::line_NDIterator< typename T >::inc_line_ptr(), and carto::const_line_NDIterator< typename T >::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< typename T >::inc_line_ptr(), carto::line_NDIterator< typename T >::inc_line_ptr(), and carto::line_NDIterator< typename T >::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< typename T >::inc_line_ptr(), and carto::line_NDIterator< typename T >::line_length().