cartodata  4.5.0
volumeutil.h File Reference
#include <cartodata/volume/volumebase.h>
#include <cartodata/volume/functional.h>
#include <cartobase/type/datatypetraits.h>
#include <cartobase/smart/rcptr.h>
#include <algorithm>
#include <exception>
Include dependency graph for volumeutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  carto::internal::inSet< T, U >
 
struct  carto::internal::notInSet< T, U >
 
struct  carto::internal::changeIf< T, U >
 
struct  carto::internal::invMinMax< T >
 
class  carto::VolumeRef< T >
 Convenient handle for a Volume - this is normally the entry point for all volumes handling. More...
 
class  carto::UnaryFromConstantBinaryFunctor< T, BinaryFunction >
 Utility functor. More...
 
class  carto::UnaryFromConstantBinaryFunctor2< T, BinaryFunction >
 Utility functor. More...
 
class  carto::Scaler< T, U >
 Scaler functor. More...
 
class  carto::Divider< T, U >
 Divider functor. More...
 
class  carto::VolumeUtilBase< T, Scalar >
 
class  carto::VolumeUtilBase< T, true >
 Volume utilities base class for scalar types. More...
 
class  carto::VolumeUtilBase< T, false >
 Volume utilities base class for non scalar types. More...
 
class  carto::VolumeUtil< T >
 Volume utilities classes. More...
 

Namespaces

 carto
 
 carto::volumeutil
 
 carto::internal
 

Functions

template<typename T , typename UnaryFunction >
Volume< typename
UnaryFunction::result_type > 
carto::volumeutil::apply (const Volume< T > &vol, UnaryFunction func)
 Used by the actual Volume and VolumeRef operators It allows to keep the loops in one place and to specialize for non arithmetic types. More...
 
template<typename T , typename U , typename BinaryFunction >
Volume< typename
BinaryFunction::result_type > 
carto::volumeutil::apply (const Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
rc_ptr< Volume< typename
UnaryFunction::result_type > > 
carto::volumeutil::apply (const rc_ptr< Volume< T > > &vol, UnaryFunction func)
 
template<typename T , typename U , typename BinaryFunction >
rc_ptr< Volume< typename
BinaryFunction::result_type > > 
carto::volumeutil::apply (const rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
Volume< T > & carto::volumeutil::selfApply (Volume< T > &vol, UnaryFunction func)
 Apply a function to all the elements of a volume (in place version) More...
 
template<typename T , typename U , typename BinaryFunction >
Volume< T > & carto::volumeutil::selfApply (Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
rc_ptr< Volume< T > > & carto::volumeutil::selfApply (rc_ptr< Volume< T > > &vol, UnaryFunction func)
 
template<typename T , typename U , typename BinaryFunction >
rc_ptr< Volume< T > > & carto::volumeutil::selfApply (rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename OUTP , typename UnaryFunction >
Volume< OUTP > & carto::volumeutil::applyTowards (const Volume< T > &vol, Volume< OUTP > &dst, UnaryFunction func)
 Apply a function to all the elements of a volume (already allocated output version) More...
 
template<typename T , typename U , typename OUTP , typename BinaryFunction >
Volume< OUTP > & carto::volumeutil::applyTowards (const Volume< T > &vol1, const Volume< U > &vol2, Volume< OUTP > &dst, BinaryFunction func)
 
template<typename OUTP , typename T , typename BinaryFunction >
OUTP carto::volumeutil::accumulate (const Volume< T > &vol, BinaryFunction func, OUTP initial)
 Accumulation over a volume. More...
 
template<typename OUTP , typename T , typename BinaryFunction >
OUTP carto::volumeutil::accumulate (const rc_ptr< Volume< T > > &vol, BinaryFunction func, OUTP initial)
 
template<typename T >
void carto::transfer (const Volume< T > &src, Volume< T > &dst)
 Transfer data from an allocated volume to another Allocated sizes must be equal (same number of voxels) More...
 
template<typename T >
void carto::transfer (const rc_ptr< Volume< T > > &src, rc_ptr< Volume< T > > &dst)
 
template<typename OUTP , typename INP >
void carto::transfer (const Volume< INP > &src, Volume< OUTP > &dst)
 
template<typename OUTP , typename INP >
void carto::transfer (const rc_ptr< Volume< INP > > &src, rc_ptr< Volume< OUTP > > &dst)
 
template<typename T >
Volume< T > carto::deepcopy (const Volume< T > &src)
 Performs a copy of the data (not only a reference copy) The whole view hierarchy is fully duplicated. More...
 
template<typename T >
rc_ptr< Volume< T > > carto::deepcopy (const rc_ptr< Volume< T > > &src)
 
template<typename OUTP , typename INP >
Volume< OUTP > carto::deepcopy (const Volume< INP > &src)
 
template<typename OUTP , typename INP >
rc_ptr< Volume< OUTP > > carto::deepcopy (const rc_ptr< Volume< INP > > &src)
 
template<typename T >
Volume< T > carto::copy (const Volume< T > &src)
 Performs a copy of the data (not only a reference copy) Only the data inside the view is copied. More...
 
template<typename T >
rc_ptr< Volume< T > > carto::copy (const rc_ptr< Volume< T > > &src)
 
template<typename OUTP , typename INP >
Volume< OUTP > carto::copy (const Volume< INP > &src)
 
template<typename OUTP , typename INP >
rc_ptr< Volume< OUTP > > carto::copy (const rc_ptr< Volume< INP > > &src)
 
template<typename T >
Volume< T > carto::copyStructure (const Volume< T > &src)
 Performs a copy of the view structure without transfering the data. More...
 
template<typename T >
rc_ptr< Volume< T > > carto::copyStructure (const rc_ptr< Volume< T > > &src)
 
template<typename OUTP , typename INP >
Volume< OUTP > carto::copyStructure (const Volume< INP > &src)
 
template<typename OUTP , typename INP >
rc_ptr< Volume< OUTP > > carto::copyStructure (const rc_ptr< Volume< INP > > &src)
 
template<typename T >
carto::min (const Volume< T > &vol)
 Returns the minimum value of the volume. More...
 
template<typename T >
carto::min (const rc_ptr< Volume< T > > &vol)
 
template<typename T >
carto::max (const Volume< T > &vol)
 Returns the maximum value of the volume. More...
 
template<typename T >
carto::max (const rc_ptr< Volume< T > > &vol)
 
template<typename T >
carto::sum (const Volume< T > &vol)
 Returns the sum of the volume values. More...
 
template<typename OUTP , typename T >
OUTP carto::sum (const Volume< T > &vol)
 
template<typename T >
carto::sum (const rc_ptr< Volume< T > > &vol)
 
template<typename OUTP , typename T >
OUTP carto::sum (const rc_ptr< Volume< T > > &vol)
 
template<typename T >
bool carto::all (const Volume< T > &vol)
 Returns true if all values compare to true. More...
 
template<typename T >
bool carto::all (const rc_ptr< Volume< T > > &vol)
 
template<typename T >
bool carto::any (const Volume< T > &vol)
 Returns true if at least one value compares to true. More...
 
template<typename T >
bool carto::any (const rc_ptr< Volume< T > > &vol)
 
template<typename T , typename U >
Volume< bool > carto::valuesIn (const Volume< T > &volume, const U &set)
 Find values contained in a set. More...
 
template<typename T , typename U >
rc_ptr< Volume< bool > > carto::valuesIn (const rc_ptr< Volume< T > > &volume, const U &set)
 
template<typename T , typename U >
Volume< bool > carto::valuesNotIn (const Volume< T > &volume, const U &set)
 Find values not contained in a set. More...
 
template<typename T , typename U >
rc_ptr< Volume< bool > > carto::valuesNotIn (const rc_ptr< Volume< T > > &volume, const U &set)
 
template<typename T , typename U >
void carto::conditionalSet (Volume< T > &volume, const Volume< U > &condition, const T &value)
 Conditionally fill a volume. More...
 
template<typename T , typename U >
void carto::conditionalSet (rc_ptr< Volume< T > > &volume, const rc_ptr< Volume< U > > &condition, const T &value)
 
template<typename T >
Volume< T > carto::invertMinMax (const Volume< T > &volume)
 Invert a volume between its min and max values. More...
 
template<typename T >
rc_ptr< Volume< T > > carto::invertMinMax (const rc_ptr< Volume< T > > &volume)
 
template<typename T >
void carto::setBorders (Volume< T > &volume, const typename Volume< T >::Position4Di &top, const typename Volume< T >::Position4Di &bottom=typename Volume< T >::Position4Di(-1,-1,-1,-1))
 Set border width. More...
 
template<typename T >
void carto::setBorders (rc_ptr< Volume< T > > &volume, const typename Volume< T >::Position4Di &top, const typename Volume< T >::Position4Di &bottom=typename Volume< T >::Position4Di(-1,-1,-1,-1))
 The actual pointed volume will see its structure change. More...
 
template<typename T >
void carto::setMinBorders (Volume< T > &volume, const typename Volume< T >::Position4Di &top, const typename Volume< T >::Position4Di &bottom=typename Volume< T >::Position4Di(-1,-1,-1,-1))
 Set border width. More...
 
template<typename T >
void carto::setMinBorders (rc_ptr< Volume< T > > &volume, const typename Volume< T >::Position4Di &top, const typename Volume< T >::Position4Di &bottom=typename Volume< T >::Position4Di(-1,-1,-1,-1))
 The actual pointed volume will see its structure change. More...