cartodata  5.0.5
carto::volumeutil Namespace Reference

Classes

struct  basic_type_result
 
struct  basic_type_result< int16_t, int16_t >
 
struct  basic_type_result< int16_t, int8_t >
 
struct  basic_type_result< int16_t, uint16_t >
 
struct  basic_type_result< int16_t, uint8_t >
 
struct  basic_type_result< int8_t, int16_t >
 
struct  basic_type_result< int8_t, int8_t >
 
struct  basic_type_result< int8_t, uint16_t >
 
struct  basic_type_result< int8_t, uint8_t >
 
struct  basic_type_result< uint16_t, int16_t >
 
struct  basic_type_result< uint16_t, int8_t >
 
struct  basic_type_result< uint16_t, uint16_t >
 
struct  basic_type_result< uint16_t, uint8_t >
 
struct  basic_type_result< uint8_t, int16_t >
 
struct  basic_type_result< uint8_t, int8_t >
 
struct  basic_type_result< uint8_t, uint16_t >
 
struct  basic_type_result< uint8_t, uint8_t >
 
struct  bitwise_and
 
struct  bitwise_and_result
 
struct  bitwise_and_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  bitwise_and_result< CONTAINER< LEFT >, RIGHT >
 
struct  bitwise_and_result< int16_t, int16_t >
 
struct  bitwise_and_result< int16_t, int8_t >
 
struct  bitwise_and_result< int16_t, uint16_t >
 
struct  bitwise_and_result< int16_t, uint8_t >
 
struct  bitwise_and_result< int8_t, int16_t >
 
struct  bitwise_and_result< int8_t, int8_t >
 
struct  bitwise_and_result< int8_t, uint16_t >
 
struct  bitwise_and_result< int8_t, uint8_t >
 
struct  bitwise_and_result< LEFT, CONTAINER< RIGHT > >
 
struct  bitwise_and_result< uint16_t, int16_t >
 
struct  bitwise_and_result< uint16_t, int8_t >
 
struct  bitwise_and_result< uint16_t, uint16_t >
 
struct  bitwise_and_result< uint16_t, uint8_t >
 
struct  bitwise_and_result< uint8_t, int16_t >
 
struct  bitwise_and_result< uint8_t, int8_t >
 
struct  bitwise_and_result< uint8_t, uint16_t >
 
struct  bitwise_and_result< uint8_t, uint8_t >
 
struct  bitwise_left_shift
 
struct  bitwise_not
 
struct  bitwise_or
 
struct  bitwise_or_result
 
struct  bitwise_or_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  bitwise_or_result< CONTAINER< LEFT >, RIGHT >
 
struct  bitwise_or_result< int16_t, int16_t >
 
struct  bitwise_or_result< int16_t, int8_t >
 
struct  bitwise_or_result< int16_t, uint16_t >
 
struct  bitwise_or_result< int16_t, uint8_t >
 
struct  bitwise_or_result< int8_t, int16_t >
 
struct  bitwise_or_result< int8_t, int8_t >
 
struct  bitwise_or_result< int8_t, uint16_t >
 
struct  bitwise_or_result< int8_t, uint8_t >
 
struct  bitwise_or_result< LEFT, CONTAINER< RIGHT > >
 
struct  bitwise_or_result< uint16_t, int16_t >
 
struct  bitwise_or_result< uint16_t, int8_t >
 
struct  bitwise_or_result< uint16_t, uint16_t >
 
struct  bitwise_or_result< uint16_t, uint8_t >
 
struct  bitwise_or_result< uint8_t, int16_t >
 
struct  bitwise_or_result< uint8_t, int8_t >
 
struct  bitwise_or_result< uint8_t, uint16_t >
 
struct  bitwise_or_result< uint8_t, uint8_t >
 
struct  bitwise_right_shift
 
struct  bitwise_xor
 
struct  bitwise_xor_result
 
struct  bitwise_xor_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  bitwise_xor_result< CONTAINER< LEFT >, RIGHT >
 
struct  bitwise_xor_result< int16_t, int16_t >
 
struct  bitwise_xor_result< int16_t, int8_t >
 
struct  bitwise_xor_result< int16_t, uint16_t >
 
struct  bitwise_xor_result< int16_t, uint8_t >
 
struct  bitwise_xor_result< int8_t, int16_t >
 
struct  bitwise_xor_result< int8_t, int8_t >
 
struct  bitwise_xor_result< int8_t, uint16_t >
 
struct  bitwise_xor_result< int8_t, uint8_t >
 
struct  bitwise_xor_result< LEFT, CONTAINER< RIGHT > >
 
struct  bitwise_xor_result< uint16_t, int16_t >
 
struct  bitwise_xor_result< uint16_t, int8_t >
 
struct  bitwise_xor_result< uint16_t, uint16_t >
 
struct  bitwise_xor_result< uint16_t, uint8_t >
 
struct  bitwise_xor_result< uint8_t, int16_t >
 
struct  bitwise_xor_result< uint8_t, int8_t >
 
struct  bitwise_xor_result< uint8_t, uint16_t >
 
struct  bitwise_xor_result< uint8_t, uint8_t >
 
struct  decrement
 
struct  decrement< bool >
 
struct  divides
 
struct  divides< cdouble, double >
 
struct  divides< cdouble, float >
 
struct  divides< cdouble, long >
 
struct  divides< cfloat, double >
 
struct  divides< cfloat, long >
 
struct  divides_result
 
struct  divides_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  divides_result< CONTAINER< LEFT >, RIGHT >
 
struct  divides_result< int16_t, int16_t >
 
struct  divides_result< int16_t, int8_t >
 
struct  divides_result< int16_t, uint16_t >
 
struct  divides_result< int16_t, uint8_t >
 
struct  divides_result< int8_t, int16_t >
 
struct  divides_result< int8_t, int8_t >
 
struct  divides_result< int8_t, uint16_t >
 
struct  divides_result< int8_t, uint8_t >
 
struct  divides_result< LEFT, CONTAINER< RIGHT > >
 
struct  divides_result< uint16_t, int16_t >
 
struct  divides_result< uint16_t, int8_t >
 
struct  divides_result< uint16_t, uint16_t >
 
struct  divides_result< uint16_t, uint8_t >
 
struct  divides_result< uint8_t, int16_t >
 
struct  divides_result< uint8_t, int8_t >
 
struct  divides_result< uint8_t, uint16_t >
 
struct  divides_result< uint8_t, uint8_t >
 
struct  equal_to
 
struct  greater
 
struct  greater_equal
 
struct  identity
 
struct  increment
 
struct  increment< bool >
 
struct  less
 
struct  less_equal
 
struct  logical_and
 
struct  logical_and< bool, cdouble >
 
struct  logical_and< bool, cfloat >
 
struct  logical_not
 
struct  logical_not< cdouble >
 
struct  logical_not< cfloat >
 
struct  logical_or
 
struct  logical_or< bool, cdouble >
 
struct  logical_or< bool, cfloat >
 
struct  minus
 
struct  minus_result
 
struct  minus_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  minus_result< CONTAINER< LEFT >, RIGHT >
 
struct  minus_result< int16_t, int16_t >
 
struct  minus_result< int16_t, int8_t >
 
struct  minus_result< int16_t, uint16_t >
 
struct  minus_result< int16_t, uint8_t >
 
struct  minus_result< int8_t, int16_t >
 
struct  minus_result< int8_t, int8_t >
 
struct  minus_result< int8_t, uint16_t >
 
struct  minus_result< int8_t, uint8_t >
 
struct  minus_result< LEFT, CONTAINER< RIGHT > >
 
struct  minus_result< uint16_t, int16_t >
 
struct  minus_result< uint16_t, int8_t >
 
struct  minus_result< uint16_t, uint16_t >
 
struct  minus_result< uint16_t, uint8_t >
 
struct  minus_result< uint8_t, int16_t >
 
struct  minus_result< uint8_t, int8_t >
 
struct  minus_result< uint8_t, uint16_t >
 
struct  minus_result< uint8_t, uint8_t >
 
struct  modulus
 
struct  modulus_result
 
struct  modulus_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  modulus_result< CONTAINER< LEFT >, RIGHT >
 
struct  modulus_result< int16_t, int16_t >
 
struct  modulus_result< int16_t, int8_t >
 
struct  modulus_result< int16_t, uint16_t >
 
struct  modulus_result< int16_t, uint8_t >
 
struct  modulus_result< int8_t, int16_t >
 
struct  modulus_result< int8_t, int8_t >
 
struct  modulus_result< int8_t, uint16_t >
 
struct  modulus_result< int8_t, uint8_t >
 
struct  modulus_result< LEFT, CONTAINER< RIGHT > >
 
struct  modulus_result< uint16_t, int16_t >
 
struct  modulus_result< uint16_t, int8_t >
 
struct  modulus_result< uint16_t, uint16_t >
 
struct  modulus_result< uint16_t, uint8_t >
 
struct  modulus_result< uint8_t, int16_t >
 
struct  modulus_result< uint8_t, int8_t >
 
struct  modulus_result< uint8_t, uint16_t >
 
struct  modulus_result< uint8_t, uint8_t >
 
struct  multiplies
 
struct  multiplies< cdouble, float >
 
struct  multiplies< cdouble, long >
 
struct  multiplies< cfloat, double >
 
struct  multiplies< cfloat, long >
 
struct  multiplies_result
 
struct  multiplies_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  multiplies_result< CONTAINER< LEFT >, RIGHT >
 
struct  multiplies_result< int16_t, int16_t >
 
struct  multiplies_result< int16_t, int8_t >
 
struct  multiplies_result< int16_t, uint16_t >
 
struct  multiplies_result< int16_t, uint8_t >
 
struct  multiplies_result< int8_t, int16_t >
 
struct  multiplies_result< int8_t, int8_t >
 
struct  multiplies_result< int8_t, uint16_t >
 
struct  multiplies_result< int8_t, uint8_t >
 
struct  multiplies_result< LEFT, CONTAINER< RIGHT > >
 
struct  multiplies_result< uint16_t, int16_t >
 
struct  multiplies_result< uint16_t, int8_t >
 
struct  multiplies_result< uint16_t, uint16_t >
 
struct  multiplies_result< uint16_t, uint8_t >
 
struct  multiplies_result< uint8_t, int16_t >
 
struct  multiplies_result< uint8_t, int8_t >
 
struct  multiplies_result< uint8_t, uint16_t >
 
struct  multiplies_result< uint8_t, uint8_t >
 
struct  negate
 
struct  negate< VoxelHSV >
 
struct  negate< VoxelRGB >
 
struct  negate< VoxelRGBA >
 
struct  not_equal_to
 
struct  plus
 
struct  plus_result
 
struct  plus_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  plus_result< CONTAINER< LEFT >, RIGHT >
 
struct  plus_result< int16_t, int16_t >
 
struct  plus_result< int16_t, int8_t >
 
struct  plus_result< int16_t, uint16_t >
 
struct  plus_result< int16_t, uint8_t >
 
struct  plus_result< int8_t, int16_t >
 
struct  plus_result< int8_t, int8_t >
 
struct  plus_result< int8_t, uint16_t >
 
struct  plus_result< int8_t, uint8_t >
 
struct  plus_result< LEFT, CONTAINER< RIGHT > >
 
struct  plus_result< uint16_t, int16_t >
 
struct  plus_result< uint16_t, int8_t >
 
struct  plus_result< uint16_t, uint16_t >
 
struct  plus_result< uint16_t, uint8_t >
 
struct  plus_result< uint8_t, int16_t >
 
struct  plus_result< uint8_t, int8_t >
 
struct  plus_result< uint8_t, uint16_t >
 
struct  plus_result< uint8_t, uint8_t >
 
struct  select_left
 
struct  select_max
 
struct  select_min
 
struct  select_result
 
struct  select_result< CONTAINER1< LEFT >, CONTAINER2< RIGHT > >
 
struct  select_result< CONTAINER< LEFT >, RIGHT >
 
struct  select_result< int16_t, int16_t >
 
struct  select_result< int16_t, int8_t >
 
struct  select_result< int16_t, uint16_t >
 
struct  select_result< int16_t, uint8_t >
 
struct  select_result< int8_t, int16_t >
 
struct  select_result< int8_t, int8_t >
 
struct  select_result< int8_t, uint16_t >
 
struct  select_result< int8_t, uint8_t >
 
struct  select_result< LEFT, CONTAINER< RIGHT > >
 
struct  select_result< uint16_t, int16_t >
 
struct  select_result< uint16_t, int8_t >
 
struct  select_result< uint16_t, uint16_t >
 
struct  select_result< uint16_t, uint8_t >
 
struct  select_result< uint8_t, int16_t >
 
struct  select_result< uint8_t, int8_t >
 
struct  select_result< uint8_t, uint16_t >
 
struct  select_result< uint8_t, uint8_t >
 
struct  select_right
 

Functions

template<typename T , typename UnaryFunction >
Volume< typename UnaryFunction::result_type > 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 > apply (const Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
rc_ptr< Volume< typename UnaryFunction::result_type > > apply (const rc_ptr< Volume< T > > &vol, UnaryFunction func)
 
template<typename T , typename U , typename BinaryFunction >
rc_ptr< Volume< typename BinaryFunction::result_type > > apply (const rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
Volume< T > & 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 > & selfApply (Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename UnaryFunction >
rc_ptr< Volume< T > > & selfApply (rc_ptr< Volume< T > > &vol, UnaryFunction func)
 
template<typename T , typename U , typename BinaryFunction >
rc_ptr< Volume< T > > & selfApply (rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func)
 
template<typename T , typename OUTP , typename UnaryFunction >
Volume< OUTP > & 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 > & applyTowards (const Volume< T > &vol1, const Volume< U > &vol2, Volume< OUTP > &dst, BinaryFunction func)
 
template<typename OUTP , typename T , typename BinaryFunction >
OUTP accumulate (const Volume< T > &vol, BinaryFunction func, OUTP initial)
 Accumulation over a volume. More...
 
template<typename OUTP , typename T , typename BinaryFunction >
OUTP accumulate (const rc_ptr< Volume< T > > &vol, BinaryFunction func, OUTP initial)
 

Function Documentation

◆ accumulate() [1/2]

template<typename OUTP , typename T , typename BinaryFunction >
OUTP carto::volumeutil::accumulate ( const Volume< T > &  vol,
BinaryFunction  func,
OUTP  initial 
)

Accumulation over a volume.

The result is equivalent to

for value in vol:
initial = func( initial, value )
return initial

Examples:

  • Calling it with function plus performs a sum over the volume
  • Calling it with function select_min returns its minimum value

Definition at line 453 of file volumeutil.h.

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

Referenced by carto::VolumeUtil< T >::accumulate(), carto::all(), carto::any(), carto::max(), carto::min(), and carto::sum().

◆ accumulate() [2/2]

template<typename OUTP , typename T , typename BinaryFunction >
OUTP carto::volumeutil::accumulate ( const rc_ptr< Volume< T > > &  vol,
BinaryFunction  func,
OUTP  initial 
)

Definition at line 466 of file volumeutil.h.

◆ apply() [1/4]

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.

Apply a function to all the elements of a volume (create output version)

Definition at line 353 of file volumeutil.h.

References applyTowards().

Referenced by carto::invertMinMax(), carto::operator &(), carto::operator%(), carto::operator*(), carto::operator+(), carto::operator-(), carto::operator/(), carto::operator^(), carto::operator|(), and carto::operator~().

◆ apply() [2/4]

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 
)

Definition at line 363 of file volumeutil.h.

References applyTowards().

◆ apply() [3/4]

template<typename T , typename UnaryFunction >
rc_ptr< Volume< typename UnaryFunction::result_type > > carto::volumeutil::apply ( const rc_ptr< Volume< T > > &  vol,
UnaryFunction  func 
)

Definition at line 375 of file volumeutil.h.

References applyTowards().

◆ apply() [4/4]

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 
)

Definition at line 385 of file volumeutil.h.

References applyTowards().

◆ applyTowards() [1/2]

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)

Note
Loop usage is restricted to these 2 functions. Maybe a bit of multithreading could be done here ?

Definition at line 428 of file volumeutil.h.

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

Referenced by apply(), carto::operator &&(), carto::operator!(), carto::operator!=(), carto::operator<(), carto::operator<=(), carto::operator==(), carto::operator>(), carto::operator>=(), carto::operator||(), selfApply(), carto::transfer(), carto::valuesIn(), and carto::valuesNotIn().

◆ applyTowards() [2/2]

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 
)

◆ selfApply() [1/4]

template<typename T , typename UnaryFunction >
Volume< T > & carto::volumeutil::selfApply ( Volume< T > &  vol,
UnaryFunction  func 
)

◆ selfApply() [2/4]

template<typename T , typename U , typename BinaryFunction >
Volume< T > & carto::volumeutil::selfApply ( Volume< T > &  vol1,
const Volume< U > &  vol2,
BinaryFunction  func 
)

Definition at line 403 of file volumeutil.h.

References applyTowards().

◆ selfApply() [3/4]

template<typename T , typename UnaryFunction >
rc_ptr< Volume< T > > & carto::volumeutil::selfApply ( rc_ptr< Volume< T > > &  vol,
UnaryFunction  func 
)

Definition at line 412 of file volumeutil.h.

References selfApply().

◆ selfApply() [4/4]

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 
)

Definition at line 419 of file volumeutil.h.

References selfApply().