Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::SimpleBarrierConstraintChecker Class Reference

This class implements constraints as simple barrier functions. More...

#include <mitkSimpleBarrierConstraintChecker.h>

Inheritance diagram for mitk::SimpleBarrierConstraintChecker:
Collaboration diagram for mitk::SimpleBarrierConstraintChecker:

Classes

struct  Constraint
 

Public Types

typedef SimpleBarrierConstraintChecker Self
 
typedef ConstraintCheckerBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::PenaltyValueType PenaltyValueType
 
typedef Superclass::PenaltyArrayType PenaltyArrayType
 
typedef Superclass::SignalType SignalType
 
typedef Superclass::ParametersType ParametersType
 
typedef double BarrierValueType
 
typedef double BarrierWidthType
 
typedef ParametersType::SizeValueType ParameterIndexType
 
typedef std::vector< ParameterIndexTypeParameterIndexVectorType
 
- Public Types inherited from mitk::ConstraintCheckerBase
typedef ConstraintCheckerBase Self
 
typedef ConstraintCheckerInterface Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::PenaltyValueType PenaltyValueType
 
typedef Superclass::PenaltyArrayType PenaltyArrayType
 
typedef Superclass::SignalType SignalType
 
typedef Superclass::ParametersType ParametersType
 
- Public Types inherited from mitk::ConstraintCheckerInterface
typedef ConstraintCheckerInterface Self
 
typedef double PenaltyValueType
 
typedef itk::Array< PenaltyValueTypePenaltyArrayType
 
typedef itk::Array< double > SignalType
 
typedef ModelBase::ParametersType ParametersType
 

Public Member Functions

PenaltyArrayType GetPenalties (const ParametersType &parameters) const override
 
unsigned int GetNumberOfConstraints () const override
 
PenaltyValueType GetFailedConstraintValue () const override
 
void SetLowerBarrier (ParameterIndexType parameterID, BarrierValueType barrier, BarrierWidthType width=0.0)
 
void SetUpperBarrier (ParameterIndexType parameterID, BarrierValueType barrier, BarrierWidthType width=0.0)
 
void SetLowerSumBarrier (const ParameterIndexVectorType &parameterIDs, BarrierValueType barrier, BarrierWidthType width=0.0)
 
void SetUpperSumBarrier (const ParameterIndexVectorType &parameterIDs, BarrierValueType barrier, BarrierWidthType width=0.0)
 
ConstraintGetConstraint (unsigned int index)
 
const ConstraintGetConstraint (unsigned int index) const
 
void DeleteConstraint (unsigned int index)
 
void ResetConstraints ()
 
virtual void SetMaxConstraintPenalty (PenaltyValueType _arg)
 
virtual PenaltyValueType GetMaxConstraintPenalty () const
 
- Public Member Functions inherited from mitk::ConstraintCheckerBase
PenaltyValueType GetPenaltySum (const ParametersType &parameters) const override
 
- Public Member Functions inherited from mitk::ConstraintCheckerInterface
virtual PenaltyArrayType GetPenalties (const ParametersType &parameters) const =0
 

Static Public Member Functions

static Pointer New ()
 

Protected Types

typedef std::vector< ConstraintConstraintVectorType
 

Protected Member Functions

PenaltyValueType CalcPenalty (const ParametersType &parameters, const Constraint &constraint) const
 
 SimpleBarrierConstraintChecker ()
 
 ~SimpleBarrierConstraintChecker () override
 
- Protected Member Functions inherited from mitk::ConstraintCheckerBase
 ConstraintCheckerBase ()
 
 ~ConstraintCheckerBase () override
 
- Protected Member Functions inherited from mitk::ConstraintCheckerInterface
 ConstraintCheckerInterface ()
 
virtual ~ConstraintCheckerInterface ()
 

Protected Attributes

ConstraintVectorType m_Constraints
 

Detailed Description

This class implements constraints as simple barrier functions.

SimpleBarrierConstraintChecker is used to check parameters against inequality constraints realized as simple barrier functions.
Inequality constraints will be transformed to an inequality greater or equal zero (c(x)>= 0). The BarrierSize indicates the size of the region in front of the border of the legal value range. The barrier function is modelled by log(c(x)/BarrierSize).
Example:
The given constraint is 500<= param_1. Its barriersize is 50, so the barrier region is between 500 and 550.
The constraint will be transformed in 0 <= param_1 - 500. The barrier function will 0 for any param_1 > 550 and min(-log((param_1 - 500)/50), MaxConstraintPenalty) for any other value of param_1.
If you have set a sum barrier, it will be checked against the value sum of the specified parameters.

Definition at line 42 of file mitkSimpleBarrierConstraintChecker.h.

Member Typedef Documentation

◆ BarrierValueType

◆ BarrierWidthType

◆ ConstPointer

◆ ConstraintVectorType

◆ ParameterIndexType

typedef ParametersType::SizeValueType mitk::SimpleBarrierConstraintChecker::ParameterIndexType

Definition at line 59 of file mitkSimpleBarrierConstraintChecker.h.

◆ ParameterIndexVectorType

◆ ParametersType

◆ PenaltyArrayType

◆ PenaltyValueType

◆ Pointer

◆ Self

◆ SignalType

◆ Superclass

Constructor & Destructor Documentation

◆ SimpleBarrierConstraintChecker()

mitk::SimpleBarrierConstraintChecker::SimpleBarrierConstraintChecker ( )
inlineprotected

Definition at line 114 of file mitkSimpleBarrierConstraintChecker.h.

◆ ~SimpleBarrierConstraintChecker()

mitk::SimpleBarrierConstraintChecker::~SimpleBarrierConstraintChecker ( )
inlineoverrideprotected

Definition at line 118 of file mitkSimpleBarrierConstraintChecker.h.

Member Function Documentation

◆ CalcPenalty()

PenaltyValueType mitk::SimpleBarrierConstraintChecker::CalcPenalty ( const ParametersType parameters,
const Constraint constraint 
) const
protected

◆ DeleteConstraint()

void mitk::SimpleBarrierConstraintChecker::DeleteConstraint ( unsigned int  index)

◆ GetConstraint() [1/2]

Constraint& mitk::SimpleBarrierConstraintChecker::GetConstraint ( unsigned int  index)

◆ GetConstraint() [2/2]

const Constraint& mitk::SimpleBarrierConstraintChecker::GetConstraint ( unsigned int  index) const

◆ GetFailedConstraintValue()

PenaltyValueType mitk::SimpleBarrierConstraintChecker::GetFailedConstraintValue ( ) const
overridevirtual

Returns the penalty value that indicates at least one failed constrained.

Implements mitk::ConstraintCheckerInterface.

◆ GetMaxConstraintPenalty()

virtual PenaltyValueType mitk::SimpleBarrierConstraintChecker::GetMaxConstraintPenalty ( ) const
virtual

◆ GetNumberOfConstraints()

unsigned int mitk::SimpleBarrierConstraintChecker::GetNumberOfConstraints ( ) const
overridevirtual

Returns the number of defined constraints, that will be checked. Thus also the size of the penalty vector.

Implements mitk::ConstraintCheckerInterface.

◆ GetPenalties()

PenaltyArrayType mitk::SimpleBarrierConstraintChecker::GetPenalties ( const ParametersType parameters) const
override

◆ New()

◆ ResetConstraints()

void mitk::SimpleBarrierConstraintChecker::ResetConstraints ( )

◆ SetLowerBarrier()

void mitk::SimpleBarrierConstraintChecker::SetLowerBarrier ( ParameterIndexType  parameterID,
BarrierValueType  barrier,
BarrierWidthType  width = 0.0 
)

Sets a lower barrier for one parameter

◆ SetLowerSumBarrier()

void mitk::SimpleBarrierConstraintChecker::SetLowerSumBarrier ( const ParameterIndexVectorType parameterIDs,
BarrierValueType  barrier,
BarrierWidthType  width = 0.0 
)

Sets a lower sum barrier for a set of parameter

◆ SetMaxConstraintPenalty()

virtual void mitk::SimpleBarrierConstraintChecker::SetMaxConstraintPenalty ( PenaltyValueType  _arg)
virtual

◆ SetUpperBarrier()

void mitk::SimpleBarrierConstraintChecker::SetUpperBarrier ( ParameterIndexType  parameterID,
BarrierValueType  barrier,
BarrierWidthType  width = 0.0 
)

Sets an upper barrier for one parameter

◆ SetUpperSumBarrier()

void mitk::SimpleBarrierConstraintChecker::SetUpperSumBarrier ( const ParameterIndexVectorType parameterIDs,
BarrierValueType  barrier,
BarrierWidthType  width = 0.0 
)

Sets an upper sum barrier for a set of parameter

Member Data Documentation

◆ m_Constraints

ConstraintVectorType mitk::SimpleBarrierConstraintChecker::m_Constraints
protected

Definition at line 110 of file mitkSimpleBarrierConstraintChecker.h.


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