Transformation< D, I > Class Template Referenceabstract

generic base class for transformations More...

#include <mia/core/transformation.hh>

Inheritance diagram for Transformation< D, I >:
[legend]
Collaboration diagram for Transformation< D, I >:
[legend]

Public Types

typedef D Data
 typedef for the data type to be transformed by this transformation More...
 
typedef I InterpolatorFactory
 type of the interpolator used by this transformation More...
 

Public Member Functions

double get_energy_penalty () const
 
double get_energy_penalty_and_gradient (CDoubleVector &gradient) const
 
bool has_energy_penalty () const
 
std::shared_ptr< D > operator() (const D &input) const
 
std::shared_ptr< D > operator() (const D &input, const I &ipf_override) const
 
void set_interpolator_factory (const I &ipf)
 
 Transformation (const I &ipf)
 
virtual ~Transformation ()
 
- Public Member Functions inherited from CIOData
const std::string & get_source_format () const
 
void set_source_format (const std::string &format)
 
- Public Member Functions inherited from CAttributedData
CAttributeMap::const_iterator begin_attributes () const
 
void delete_attribute (const std::string &key)
 
CAttributeMap::const_iterator end_attributes () const
 
const PAttribute get_attribute (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key, T default_value) const
 
const std::string get_attribute_as_string (const std::string &key) const
 returns the requested attribute as string, returns an empty string if attribute doesn't exist More...
 
bool has_attribute (const std::string &key) const
 
CAttributedDataoperator= (const CAttributedData &org)
 Assignemt operator. More...
 
void print (std::ostream &os) const
 
void set_attribute (const std::string &key, PAttribute attr)
 
void set_attribute (const std::string &key, const std::string &value)
 
template<typename T >
void set_attribute (const std::string &key, const T &value)
 
void set_attribute (const std::string &key, const char *value)
 
void set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
 
 CAttributedData ()
 
 CAttributedData (const CAttributedData &org)
 
 CAttributedData (PAttributeMap attr)
 

Static Public Attributes

static const char * type_descr = "transform"
 interface type for plugin implementation and search More...
 

Protected Member Functions

const I & get_interpolator_factory () const
 

Detailed Description

template<typename D, typename I>
class Transformation< D, I >

generic base class for transformations

Template of a generic tranformation function

Template Parameters
Ddata type of the object to be transformed
Iinterpolator factory to create resampler for type D
Todo:
the interpolator factory resp. the interpolator kernel should probably be part of the class

Definition at line 44 of file transformation.hh.

Member Typedef Documentation

◆ Data

template<typename D, typename I>
typedef D Transformation< D, I >::Data

typedef for the data type to be transformed by this transformation

Definition at line 53 of file transformation.hh.

◆ InterpolatorFactory

template<typename D, typename I>
typedef I Transformation< D, I >::InterpolatorFactory

type of the interpolator used by this transformation

Definition at line 56 of file transformation.hh.

Constructor & Destructor Documentation

◆ ~Transformation()

template<typename D , typename I >
Transformation< D, I >::~Transformation ( )
virtual

Definition at line 133 of file transformation.hh.

◆ Transformation()

template<typename D , typename I>
Transformation< D, I >::Transformation ( const I &  ipf)

Constructor to create the transformstion

Parameters
ipfthe interpolator factory to be used to create the interpolators for image interpolation

Definition at line 126 of file transformation.hh.

Member Function Documentation

◆ get_energy_penalty()

template<typename D , typename I >
double Transformation< D, I >::get_energy_penalty ( ) const
Returns
the value of the transformation energy penalty

Definition at line 169 of file transformation.hh.

◆ get_energy_penalty_and_gradient()

template<typename D , typename I >
double Transformation< D, I >::get_energy_penalty_and_gradient ( CDoubleVector gradient) const

Evaluate the transformation penalty and it's gradient

Parameters
[in,out]gradientat input an allocated vector of the size equal to the size of the degrees of freedom of the transformation, at output the enegy penalty gradient with respect to the transformation parameters
Returns
the value of the transformation energy penalty

Definition at line 162 of file transformation.hh.

◆ get_interpolator_factory()

template<typename D , typename I >
const I & Transformation< D, I >::get_interpolator_factory ( ) const
protected
Returns
the interpolator factory

Definition at line 144 of file transformation.hh.

◆ has_energy_penalty()

template<typename D , typename I >
bool Transformation< D, I >::has_energy_penalty ( ) const
Returns
true if the transformation provides a penalty term

Definition at line 189 of file transformation.hh.

◆ operator()() [1/2]

template<typename D, typename I >
std::shared_ptr< D > Transformation< D, I >::operator() ( const D &  input) const

Apply the transformation to the input data

Parameters
input
Returns
a shared pointer to the transformed input data

Definition at line 156 of file transformation.hh.

◆ operator()() [2/2]

template<typename D, typename I>
std::shared_ptr< D > Transformation< D, I >::operator() ( const D &  input,
const I &  ipf_override 
) const

Apply the transformation to the input data

Parameters
input
ipf_overrideoveride the image interpolator
Returns
a shared pointer to the transformed input data

Definition at line 150 of file transformation.hh.

◆ set_interpolator_factory()

template<typename D , typename I>
void Transformation< D, I >::set_interpolator_factory ( const I &  ipf)

Set the interpolator factory

Parameters
ipfthe new interpolator factory

Definition at line 138 of file transformation.hh.

Field Documentation

◆ type_descr

template<typename D, typename I>
const char * Transformation< D, I >::type_descr = "transform"
static

interface type for plugin implementation and search

Definition at line 48 of file transformation.hh.


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