![]() |
aimsdata 6.0.0
Neuroimaging data handling
|
The template class to make linear combinations. More...
#include <aims/utility/linearcomb.h>
Public Member Functions | |
| AimsLinearCombination (float num1, float den1, float num2=0.0, float den2=1.0) | |
| The programmer should provide at least 2 parameters to the constructor: | |
| virtual | ~AimsLinearCombination () |
| Destructor does nothing. | |
| carto::VolumeRef< T > | operator() (const carto::rc_ptr< carto::Volume< T > > &data1, const carto::rc_ptr< carto::Volume< T > > &data2) |
| Return the combination of data1 and data2. | |
| carto::VolumeRef< T > | operator() (const carto::rc_ptr< carto::Volume< T > > &data1) |
| Return the combination of data1. | |
Protected Attributes | |
| float | _num1 |
| multiplicator for the first data | |
| float | _den1 |
| dividor for the first data | |
| float | _num2 |
| multiplicator for the second data | |
| float | _den2 |
| dividor for the second data | |
The template class to make linear combinations.
This class is useful to make a linear combination num1*data1/den1+num2*data2/den2 because it goes through a float casting.
Definition at line 53 of file linearcomb.h.
|
inline |
The programmer should provide at least 2 parameters to the constructor:
| num1 | multiplicator for the first data |
| den1 | dividor for the first data |
| num2 | multiplicator for the second data [default=0.0] |
| den2 | dividor for the second data [default=1.0] |
Definition at line 72 of file linearcomb.h.
|
inlinevirtual |
Destructor does nothing.
Definition at line 81 of file linearcomb.h.
|
inline |
Return the combination of data1.
Definition at line 151 of file linearcomb.h.
References _den1, _num1, carto::Volume< typename T >::begin(), carto::VolumeRef< typename T >::begin(), carto::VolumeRef< typename T >::end(), and carto::VolumeRef< typename T >::setVoxelSize().
|
inline |
Return the combination of data1 and data2.
Definition at line 129 of file linearcomb.h.
References _den1, _den2, _num1, _num2, AimsError(), carto::Volume< typename T >::begin(), carto::VolumeRef< typename T >::begin(), carto::VolumeRef< typename T >::end(), and carto::VolumeRef< typename T >::setVoxelSize().
|
protected |
dividor for the first data
Definition at line 59 of file linearcomb.h.
Referenced by AimsLinearCombination(), operator()(), and operator()().
|
protected |
dividor for the second data
Definition at line 63 of file linearcomb.h.
Referenced by AimsLinearCombination(), and operator()().
|
protected |
multiplicator for the first data
Definition at line 57 of file linearcomb.h.
Referenced by AimsLinearCombination(), operator()(), and operator()().
|
protected |
multiplicator for the second data
Definition at line 61 of file linearcomb.h.
Referenced by AimsLinearCombination(), and operator()().