The generic cost function interface. More...
#include <mia/template/masked_cost.hh>
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 M | Mask |
typedef for generic programming: The data type used 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 masked_cost_type | plugin_type |
plugin searchpath helper type More... | |
typedef TRefHolder< T > | RData |
Const reference holder TRefHolder of the cost function data. More... | |
Public Types inherited from CPropertyFlagHolder | |
typedef std::set< const char * > | Set |
define the type of the set of flags More... | |
Public Member Functions | |
double | evaluate_force (const T &mov, const M &mask, V &force) const |
void | set_reference (const T &ref) |
double | value (const T &mov, const M &mask) const |
virtual | ~TMaskedCost () |
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 () |
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
T | the data type of the objects that the cost evaluation is based on |
V | the type of the gradient force field created by this cost function |
Definition at line 64 of file masked_cost.hh.
typedef T TMaskedCost< T, M, V >::Data |
typedef for generic programming: The data type used by the cost function
Definition at line 67 of file masked_cost.hh.
typedef V TMaskedCost< T, M, V >::Force |
typedef for generic programming: The gradient forca type create by the cost function
Definition at line 73 of file masked_cost.hh.
typedef M TMaskedCost< T, M, V >::Mask |
typedef for generic programming: The data type used by the cost function
Definition at line 70 of file masked_cost.hh.
typedef RData::Pointer TMaskedCost< T, M, V >::PData |
Pointer to const reference holder TRefHolder of the cost function data.
Definition at line 79 of file masked_cost.hh.
typedef T TMaskedCost< T, M, V >::plugin_data |
plugin searchpath helper type
Definition at line 82 of file masked_cost.hh.
typedef masked_cost_type TMaskedCost< T, M, V >::plugin_type |
plugin searchpath helper type
Definition at line 85 of file masked_cost.hh.
typedef TRefHolder<T> TMaskedCost< T, M, V >::RData |
Const reference holder TRefHolder of the cost function data.
Definition at line 76 of file masked_cost.hh.
|
virtual |
ensure virtual destruction, since we have virtual functions
double TMaskedCost< T, M, V >::evaluate_force | ( | const T & | mov, |
const M & | mask, | ||
V & | force | ||
) | const |
Evaluate the value of the cost function and its gradient with respect to the given moving image and the reference that was set by calling set_reference(const T& ref).
mov | the moving image | |
mask | the mask to be applied when evaluating the cost function | |
[out] | force | gradient force |
void TMaskedCost< T, M, 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.
double TMaskedCost< T, M, V >::value | ( | const T & | mov, |
const M & | mask | ||
) | const |
Evaluate the value of the cost function petreen the given moving image and the reference that was set by calling set_reference(const T& ref).
mov | the moving image |
mask | the mask to be applied when evaluating the cost function |