aimsdata 6.0.0
Neuroimaging data handling
aims::AimsLinearCombination< T > Class Template Reference

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
 

Detailed Description

template<class T>
class aims::AimsLinearCombination< T >

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.

Constructor & Destructor Documentation

◆ AimsLinearCombination()

template<class T>
aims::AimsLinearCombination< T >::AimsLinearCombination ( float num1,
float den1,
float num2 = 0.0,
float den2 = 1.0 )
inline

The programmer should provide at least 2 parameters to the constructor:

Parameters
num1multiplicator for the first data
den1dividor for the first data
num2multiplicator for the second data [default=0.0]
den2dividor for the second data [default=1.0]

Definition at line 72 of file linearcomb.h.

References _den1, _den2, _num1, and _num2.

◆ ~AimsLinearCombination()

template<class T>
virtual aims::AimsLinearCombination< T >::~AimsLinearCombination ( )
inlinevirtual

Destructor does nothing.

Definition at line 81 of file linearcomb.h.

Member Function Documentation

◆ operator()() [1/2]

◆ operator()() [2/2]

template<class T>
carto::VolumeRef< T > aims::AimsLinearCombination< T >::operator() ( const carto::rc_ptr< carto::Volume< T > > & data1,
const carto::rc_ptr< carto::Volume< T > > & data2 )
inline

Member Data Documentation

◆ _den1

template<class T>
float aims::AimsLinearCombination< T >::_den1
protected

dividor for the first data

Definition at line 59 of file linearcomb.h.

Referenced by AimsLinearCombination(), operator()(), and operator()().

◆ _den2

template<class T>
float aims::AimsLinearCombination< T >::_den2
protected

dividor for the second data

Definition at line 63 of file linearcomb.h.

Referenced by AimsLinearCombination(), and operator()().

◆ _num1

template<class T>
float aims::AimsLinearCombination< T >::_num1
protected

multiplicator for the first data

Definition at line 57 of file linearcomb.h.

Referenced by AimsLinearCombination(), operator()(), and operator()().

◆ _num2

template<class T>
float aims::AimsLinearCombination< T >::_num2
protected

multiplicator for the second data

Definition at line 61 of file linearcomb.h.

Referenced by AimsLinearCombination(), and operator()().


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