TFullCost< Transform > Class Template Referenceabstract
Image Registration and Transformation

Base class for a general cost function. More...

`#include <mia/template/fullcost.hh>`

Inheritance diagram for TFullCost< Transform >:
[legend]
Collaboration diagram for TFullCost< Transform >:
[legend]

## Public Types

typedef TFullCost< Transform > | plugin_data
| helper type for plug-in handling
typedef TFullCost< Transform > | plugin_type
| helper type for plug-in handling
typedef std::shared_ptr< TFullCost< Transform > > | Pointer
| The shatred pointer type for this cost function.
typedef Transform::Size | Size
| Typedef of the size of the data considered by this cost function.
Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > | Set
| define the type of the set of flags

## Public Member Functions

double | cost_value () const
double | cost_value (const Transform &t) const
double | evaluate (const Transform &t, CDoubleVector &gradient) const
bool | get_full_size (Size &size) const
void | reinit ()
void | set_size (const Size &size)
| TFullCost (double weight)
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 ()

## Static Public Attributes

static const char * | data_descr
| helper string for plug-in handling
static const char * | type_descr
| helper string for plug-in handling

## Protected Member Functions

const Size & | get_current_size () const
double | get_weight () const

## Detailed Description

template<typename Transform>
class TFullCost< Transform >

Base class for a general cost function.

Template Parameters

  Transform | the transformation type used to achieve registration by optimizing the cost function

This base class for a cost function does not make any assumptions about what kind of cost is measured. It only considers a transformation to be applied to input data or to measure a transformation penalty.

Definition at line 43 of file template/fullcost.hh.

## Member Typedef Documentation

## plugin_data

template<typename Transform>

typedef TFullCost<Transform> TFullCost< Transform >::plugin_data

helper type for plug-in handling

Definition at line 51 of file template/fullcost.hh.

## plugin_type

template<typename Transform>

typedef TFullCost<Transform> TFullCost< Transform >::plugin_type

helper type for plug-in handling

Definition at line 54 of file template/fullcost.hh.

## Pointer

template<typename Transform>

typedef std::shared_ptr<TFullCost<Transform> > TFullCost< Transform >::Pointer

The shatred pointer type for this cost function.

Definition at line 63 of file template/fullcost.hh.

## Size

template<typename Transform>

typedef Transform::Size TFullCost< Transform >::Size

Typedef of the size of the data considered by this cost function.

Definition at line 48 of file template/fullcost.hh.

## Constructor & Destructor Documentation

## TFullCost()

template<typename Transform>

TFullCost< Transform >::TFullCost | ( | double | weight | ) |

Initialize the cost function with a weight

Parameters

  weight |

## Member Function Documentation

## cost_value() [1/2]

template<typename Transform>

double TFullCost< Transform >::cost_value | ( |  | ) | const

Evaluate the weighted cost value without transforming the image

Returns
  weighted cost value

## cost_value() [2/2]

template<typename Transform>

double TFullCost< Transform >::cost_value | ( | const Transform & | t | ) | const

Evaluate the weighted cost value

Parameters

  t | tranformation to be applied

Returns
  weighted cost value

## evaluate()

template<typename Transform>

double TFullCost< Transform >::evaluate | ( | const Transform & | t,
|  | CDoubleVector & | gradient ) const

Evaluate the weighted cost value and the weighted gradient in optimizer space given a current transformation.

Parameters

  | t | tranformation to be applied
  [out] | gradient | gradient in optimizer space

Returns
  weighted cost value

## get_current_size()

template<typename Transform>

const Size & TFullCost< Transform >::get_current_size | ( |  | ) | const

protected

Returns
  the current size of the data in the cost function

## get_full_size()

template<typename Transform>

bool TFullCost< Transform >::get_full_size | ( | Size & | size | ) | const

Get the full size of the registration problem and see if everybody agrees on it.

Parameters

  size | if it is at Size() at input input it will simply be overwritten, if it is not equal to Size(), it will be checked that the size is equal to the local one

Returns
  true if the cost function has setthe size or has the same size as the nonzero one give at input

## get_weight()

template<typename Transform>

double TFullCost< Transform >::get_weight | ( |  | ) | const

protected

Returns
  cost function weight

## reinit()

template<typename Transform>

void TFullCost< Transform >::reinit | ( |  | ) |

Re-initialalize the cost function

## set_size()

template<typename Transform>

void TFullCost< Transform >::set_size | ( | const Size & | size | ) |

Set the size of the cost function

## Field Documentation

## data_descr

template<typename Transform>

const char* TFullCost< Transform >::data_descr

static

helper string for plug-in handling

Definition at line 60 of file template/fullcost.hh.

## type_descr

template<typename Transform>

const char* TFullCost< Transform >::type_descr

static

helper string for plug-in handling

Definition at line 57 of file template/fullcost.hh.

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

- template/fullcost.hh