Public Types | Public Member Functions
TCost< T, V > Class Template Referenceabstract

The generic cost function interface. More...

#include <mia/core/cost.hh>

Inheritance diagram for TCost< T, V >:
CProductBase CPropertyFlagHolder

Public Types

typedef T Data
 typedef for generic programming: The data type used by the cost function More...
 
typedef V Force
 typedef for generic programming: The gradient forca type create by the cost function More...
 
typedef RData::Pointer PData
 Pointer to const reference holder TRefHolder of the cost function data. More...
 
typedef T plugin_data
 plugin searchpath helper type More...
 
typedef cost_type plugin_type
 plugin searchpath helper type More...
 
typedef TRefHolder< T > RData
 Const reference holder TRefHolder of the cost function data. More...
 

Public Member Functions

double evaluate_force (const T &src, V &force) const
 
void set_reference (const T &ref)
 
double value (const T &src) const
 
virtual ~TCost ()
 ensure virtual destruction, since we have virtual functions More...
 
- Public Member Functions inherited from CProductBase
const char * get_init_string () const
 
void set_init_string (const char *init)
 
void set_module (PPluginModule module)
 
- Public Member Functions inherited from CPropertyFlagHolder
void add (const char *property)
 
Set get_missing_properties (const CPropertyFlagHolder &testset) const
 
bool has (const char *property) const
 
bool has_all_in (const CPropertyFlagHolder &testset) const
 
virtual ~CPropertyFlagHolder ()
 

Detailed Description

template<typename T, typename V>
class TCost< T, V >

The generic cost function interface.

The class defines an abstract interface for a cost function between two entities of the same type. The pure virtual functions -double do_value(const T& a, const T& b) const, and -double do_evaluate_force(const T& a, const T& b, float scale, V& force) const have to be implemented in the derived class to make it a real cost function. The virtual function

Definition at line 64 of file core/cost.hh.

Member Typedef Documentation

template<typename T , typename V >
typedef T TCost< T, V >::Data

typedef for generic programming: The data type used by the cost function

Definition at line 67 of file core/cost.hh.

template<typename T , typename V >
typedef V TCost< T, V >::Force

typedef for generic programming: The gradient forca type create by the cost function

Definition at line 70 of file core/cost.hh.

template<typename T , typename V >
typedef RData::Pointer TCost< T, V >::PData

Pointer to const reference holder TRefHolder of the cost function data.

Definition at line 76 of file core/cost.hh.

template<typename T , typename V >
typedef T TCost< T, V >::plugin_data

plugin searchpath helper type

Definition at line 79 of file core/cost.hh.

template<typename T , typename V >
typedef cost_type TCost< T, V >::plugin_type

plugin searchpath helper type

Definition at line 82 of file core/cost.hh.

template<typename T , typename V >
typedef TRefHolder<T> TCost< T, V >::RData

Const reference holder TRefHolder of the cost function data.

Definition at line 73 of file core/cost.hh.

Constructor & Destructor Documentation

template<typename T , typename V >
virtual TCost< T, V >::~TCost ( )
virtual

ensure virtual destruction, since we have virtual functions

Member Function Documentation

template<typename T , typename V >
double TCost< T, V >::evaluate_force ( const T &  src,
V &  force 
) const

Evaluate the value of the cost function and its gradient with respect to the given src image and the reference that was set by calling set_reference(const T& ref).

Parameters
src
[out]forcegradient force
Returns
the cost function value
template<typename T , typename V >
void TCost< T, V >::set_reference ( const T &  ref)

Set the new reference of the cost function. The virtual private function post_set_reference(const T& ref) is then called to run possible preparations on the reference image.

template<typename T , typename V >
double TCost< T, V >::value ( const T &  src) const

Evaluate the value of the cost function petreen the given src image and the reference that was set by calling set_reference(const T& ref).

Parameters
src
Returns
the cost function value

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