C2DSplineTransformPenalty Class Referenceabstract

Base class for transformation penalties in spline based deformations. More...

#include <mia/2d/splinetransformpenalty.hh>

Inheritance diagram for C2DSplineTransformPenalty:
[legend]
Collaboration diagram for C2DSplineTransformPenalty:
[legend]

Public Types

typedef C2DSplineTransformPenalty plugin_data
 
typedef C2DSplineTransformPenalty plugin_type
 
- Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > Set
 define the type of the set of flags More...
 

Public Member Functions

 C2DSplineTransformPenalty (double weight, bool normalize)
 
 C2DSplineTransformPenalty (const C2DSplineTransformPenalty &org)=delete
 
C2DSplineTransformPenaltyclone () const __attribute__((warn_unused_result))
 
void initialize (const C2DBounds &size, const C2DFVector &range, PSplineKernel kernel)
 
C2DSplineTransformPenaltyoperator= (const C2DSplineTransformPenalty &org)=delete
 
double value (const C2DFVectorfield &coefficients) const
 
double value_and_gradient (const C2DFVectorfield &coefficients, CDoubleVector &gradient) const
 
virtual ~C2DSplineTransformPenalty ()
 
- 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
 
static const char * type_descr
 

Protected Member Functions

PSplineKernel get_kernel () const
 
bool get_normalize () const
 
const C2DFVectorget_range () const
 
const C2DBoundsget_size () const
 
double get_weight () const
 

Detailed Description

Base class for transformation penalties in spline based deformations.

This class ist the base class for the possible penalties on spline based transformations that provide an additional smoothness constrait.

Definition at line 39 of file 2d/splinetransformpenalty.hh.

Member Typedef Documentation

◆ plugin_data

◆ plugin_type

Constructor & Destructor Documentation

◆ C2DSplineTransformPenalty() [1/2]

C2DSplineTransformPenalty::C2DSplineTransformPenalty ( double  weight,
bool  normalize 
)

Constructor that sets the weight of the penalty term

Parameters
weight
normalize

◆ C2DSplineTransformPenalty() [2/2]

C2DSplineTransformPenalty::C2DSplineTransformPenalty ( const C2DSplineTransformPenalty org)
delete

◆ ~C2DSplineTransformPenalty()

virtual C2DSplineTransformPenalty::~C2DSplineTransformPenalty ( )
virtual

Member Function Documentation

◆ clone()

C2DSplineTransformPenalty* C2DSplineTransformPenalty::clone ( ) const

Provides a deep copy of the penalty

Returns
newly created copy of the spline penalty term.

◆ get_kernel()

PSplineKernel C2DSplineTransformPenalty::get_kernel ( ) const
protected

◆ get_normalize()

bool C2DSplineTransformPenalty::get_normalize ( ) const
protected

◆ get_range()

const C2DFVector& C2DSplineTransformPenalty::get_range ( ) const
protected

◆ get_size()

const C2DBounds& C2DSplineTransformPenalty::get_size ( ) const
protected

◆ get_weight()

double C2DSplineTransformPenalty::get_weight ( ) const
protected

◆ initialize()

void C2DSplineTransformPenalty::initialize ( const C2DBounds size,
const C2DFVector range,
PSplineKernel  kernel 
)

The initializer of the spline transform penalty to set up required data structurs

Parameters
sizesize of the coefficient field
rangetransformation range
kernelkernel used to define the spline transformation

◆ operator=()

C2DSplineTransformPenalty& C2DSplineTransformPenalty::operator= ( const C2DSplineTransformPenalty org)
delete

◆ value()

double C2DSplineTransformPenalty::value ( const C2DFVectorfield coefficients) const

Evaluate the penalty of a spline transformation defined by its coefficients

Parameters
coefficientsthe spline transformation coefficients
Returns
the weighted penalty

◆ value_and_gradient()

double C2DSplineTransformPenalty::value_and_gradient ( const C2DFVectorfield coefficients,
CDoubleVector gradient 
) const

Evaluate the penalty and the gradient of a spline transformation defined by its coefficients

Parameters
coefficientsthe spline transformation coefficients
[out]gradientthe weighted gradient of the spline transformation penalty given so that coefficients + \(\delta\) gradient moves toward the minimum of the penalty term.
Returns
the weighted penalty

Field Documentation

◆ data_descr

const char* C2DSplineTransformPenalty::data_descr
static

Definition at line 43 of file 2d/splinetransformpenalty.hh.

◆ type_descr

const char* C2DSplineTransformPenalty::type_descr
static

Definition at line 45 of file 2d/splinetransformpenalty.hh.


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