cartodata  5.0.5
carto::VolumeUtil< T > Class Template Reference

Volume utilities classes. More...

#include <cartodata/volume/volumeutil.h>

Inheritance diagram for carto::VolumeUtil< T >:
Collaboration diagram for carto::VolumeUtil< T >:

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 BinaryFunction >
static VolumeRef< T > apply (BinaryFunction f, const VolumeRef< T > &o1, const VolumeRef< T > &o2)
 applies a binary function to each voxel of a pair of volumes More...
 
template<class UnaryFunction >
static void selfApply (UnaryFunction f, VolumeRef< T > &o)
 same as apply() except that the input volume is used to store the result 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)
 

Detailed Description

template<typename T>
class carto::VolumeUtil< T >

Volume utilities classes.

Definition at line 1242 of file volumeutil.h.

Member Function Documentation

◆ accumulate() [1/2]

template<typename T >
template<class BinaryFunction >
static T carto::VolumeUtil< T >::accumulate ( BinaryFunction  f,
const VolumeRef< T > &  o2,
initial 
)
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, -stdnumeric_limits<T>::max() ); May be used also for sum etc.

Definition at line 1272 of file volumeutil.h.

References carto::volumeutil::accumulate().

Referenced by carto::VolumeUtilBase< T, true >::max(), and carto::VolumeUtilBase< T, true >::min().

◆ accumulate() [2/2]

template<typename T >
template<class BinaryFunction >
T carto::VolumeUtil< T >::accumulate ( BinaryFunction  f,
const Volume< T > &  o2,
initial 
)
static

◆ apply() [1/2]

template<typename T >
template<class UnaryFunction >
VolumeRef< T > carto::VolumeUtil< T >::apply ( UnaryFunction  f,
const VolumeRef< T > &  o 
)
static

◆ apply() [2/2]

template<typename T >
template<class BinaryFunction >
VolumeRef< T > carto::VolumeUtil< T >::apply ( BinaryFunction  f,
const VolumeRef< T > &  o1,
const VolumeRef< T > &  o2 
)
static

◆ selfApply() [1/2]

template<typename T >
template<class UnaryFunction >
void carto::VolumeUtil< T >::selfApply ( UnaryFunction  f,
VolumeRef< T > &  o 
)
static

◆ selfApply() [2/2]

template<typename T >
template<class BinaryFunction >
void carto::VolumeUtil< T >::selfApply ( BinaryFunction  f,
VolumeRef< T > &  o1,
const VolumeRef< T > &  o2 
)
static

same as apply() except that the first input volume is used to store the result

Definition at line 298 of file volumeutil_d.h.

References carto::VolumeRef< T >::at(), carto::VolumeRef< T >::getSizeT(), carto::VolumeRef< T >::getSizeX(), carto::VolumeRef< T >::getSizeY(), and carto::VolumeRef< T >::getSizeZ().


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