Public Types | Public Member Functions

cmtk::Functional Class Reference
[cmtkBase Library]

Class defining a real-valued functional on a multi-dimensional domain. More...

#include <cmtkFunctional.h>

Inheritance diagram for cmtk::Functional:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Functional Self
 This class.
typedef SmartPointer< SelfSmartPtr
 Smart pointer to Functional.
typedef Types::Combined
< Types::Coordinate,
Types::DataItem >::Type 
ReturnType
 Functional return type.
typedef Vector< Types::CoordinateParameterVectorType
 Parameter vector type.
typedef Types::Coordinate ParameterType
 Functional return type.

Public Member Functions

virtual void SetParamVector (ParameterVectorType &)
 Set parameter vector.
virtual void GetParamVector (ParameterVectorType &)
 Return parameter vector.
virtual Self::ReturnType Evaluate ()
 Evaluate functional.
virtual Self::ReturnType EvaluateAt (ParameterVectorType &v)
 Evaluate functional with new parameter vector.
virtual Self::ReturnType EvaluateAlongGradientAt (ParameterVectorType &v)
 Evaluate functional with new parameter vector along previously computed gradient direction.
virtual Self::ReturnType EvaluateWithGradient (ParameterVectorType &v, ParameterVectorType &g, const Types::Coordinate step=1)
 Evaluate functional and also return its gradient.
virtual size_t ParamVectorDim () const =0
 Return dimension of the parameter vector.
virtual size_t VariableParamVectorDim () const
 Return dimension of the parmater vector's variable part.
virtual ~Functional ()
 Virtual destructor.
virtual Types::Coordinate GetParamStep (const size_t, const Types::Coordinate mmStep=1) const
 Get stepping for one parameter.
virtual bool Wiggle ()
 Wiggle a little.

Detailed Description

Class defining a real-valued functional on a multi-dimensional domain.

Definition at line 56 of file cmtkFunctional.h.


Member Typedef Documentation

Functional return type.

Definition at line 77 of file cmtkFunctional.h.

Parameter vector type.

Definition at line 74 of file cmtkFunctional.h.

Functional return type.

We set this to float (rather than double) because with double we get different results using different CPUs, even between Pentium4 Nocoma and Core2/Xeon using the exact same compiled bainary. That is not good for regression testing, nor is it for consistent results.

Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, cmtk::ImagePairAffineRegistrationFunctionalTemplate< VM >, and cmtk::VoxelMatchingAffineFunctionalTemplate< VM >.

Definition at line 71 of file cmtkFunctional.h.

This class.

Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, cmtk::ImagePairAffineRegistrationFunctionalDevice, cmtk::ImageSymmetryPlaneFunctionalDevice, cmtk::CongealingFunctional< TXform >, cmtk::FunctionalAffine2D, cmtk::GroupwiseRegistrationFunctionalBase, cmtk::GroupwiseRegistrationFunctionalXformTemplate< TXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplate< AffineXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplate< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< TXform >, cmtk::GroupwiseRegistrationRMIFunctional< TXform >, cmtk::ImagePairAffineRegistrationFunctional, cmtk::ImagePairAffineRegistrationFunctionalTemplate< VM >, cmtk::ImagePairNonrigidRegistrationFunctional, cmtk::ImagePairNonrigidRegistrationFunctionalTemplate< VM >, cmtk::ImagePairRegistrationFunctional, cmtk::ImagePairSymmetricNonrigidRegistrationFunctional, cmtk::ImagePairSymmetricNonrigidRegistrationFunctionalTemplate< VM, W >, cmtk::ImageSymmetryPlaneFunctional, cmtk::ImageSymmetryPlaneFunctionalBase, cmtk::MultiChannelHistogramRegistrationFunctional< TDataType, TInterpolator, THashKeyType, NBitsPerChannel >, cmtk::MultiChannelRegistrationFunctional< TInterpolator >, cmtk::MultiChannelRegistrationFunctionalBase, cmtk::MultiChannelRMIRegistrationFunctional< TRealType, TDataType, TInterpolator >, cmtk::ParallelElasticFunctional< VM >, cmtk::SplineWarpCongealingFunctional, cmtk::SplineWarpGroupwiseRegistrationRMIFunctional, cmtk::SymmetricElasticFunctional, cmtk::SymmetricElasticFunctional_Template< VM >, cmtk::SymmetryPlaneFunctional, cmtk::VoxelMatchingAffineFunctional, cmtk::VoxelMatchingAffineFunctionalTemplate< VM >, cmtk::VoxelMatchingElasticFunctional, cmtk::VoxelMatchingElasticFunctional_WarpTemplate< W >, cmtk::VoxelMatchingElasticFunctional_Template< VM >, cmtk::VoxelMatchingFunctional, cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >, cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase, cmtk::CongealingFunctional< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< AffineXform >, cmtk::GroupwiseRegistrationRMIFunctional< SplineWarpXform >, and cmtk::VoxelMatchingElasticFunctional_WarpTemplate< SplineWarpXform >.

Definition at line 60 of file cmtkFunctional.h.

Smart pointer to Functional.

Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, cmtk::ImagePairAffineRegistrationFunctionalDevice, cmtk::ImageSymmetryPlaneFunctionalDevice, cmtk::CongealingFunctional< TXform >, cmtk::FunctionalAffine2D, cmtk::GroupwiseRegistrationFunctionalBase, cmtk::GroupwiseRegistrationFunctionalXformTemplate< TXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplate< AffineXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplate< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< TXform >, cmtk::GroupwiseRegistrationRMIFunctional< TXform >, cmtk::ImagePairAffineRegistrationFunctional, cmtk::ImagePairAffineRegistrationFunctionalTemplate< VM >, cmtk::ImagePairNonrigidRegistrationFunctional, cmtk::ImagePairNonrigidRegistrationFunctionalTemplate< VM >, cmtk::ImagePairSymmetricNonrigidRegistrationFunctional, cmtk::ImagePairSymmetricNonrigidRegistrationFunctionalTemplate< VM, W >, cmtk::ImageSymmetryPlaneFunctional, cmtk::ImageSymmetryPlaneFunctionalBase, cmtk::MultiChannelHistogramRegistrationFunctional< TDataType, TInterpolator, THashKeyType, NBitsPerChannel >, cmtk::MultiChannelRegistrationFunctional< TInterpolator >, cmtk::MultiChannelRegistrationFunctionalBase, cmtk::MultiChannelRMIRegistrationFunctional< TRealType, TDataType, TInterpolator >, cmtk::SplineWarpCongealingFunctional, cmtk::SplineWarpGroupwiseRegistrationRMIFunctional, cmtk::SymmetricElasticFunctional, cmtk::SymmetricElasticFunctional_Template< VM >, cmtk::SymmetryPlaneFunctional, cmtk::VoxelMatchingAffineFunctional, cmtk::VoxelMatchingAffineFunctionalTemplate< VM >, cmtk::VoxelMatchingElasticFunctional, cmtk::VoxelMatchingElasticFunctional_WarpTemplate< W >, cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >, cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase, cmtk::CongealingFunctional< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< SplineWarpXform >, cmtk::GroupwiseRegistrationFunctionalXformTemplateBase< AffineXform >, cmtk::GroupwiseRegistrationRMIFunctional< SplineWarpXform >, and cmtk::VoxelMatchingElasticFunctional_WarpTemplate< SplineWarpXform >.

Definition at line 63 of file cmtkFunctional.h.


Constructor & Destructor Documentation

virtual cmtk::Functional::~Functional (  ) [inline, virtual]

Virtual destructor.

Definition at line 132 of file cmtkFunctional.h.


Member Function Documentation

virtual Self::ReturnType cmtk::Functional::Evaluate (  ) [inline, virtual]
virtual Self::ReturnType cmtk::Functional::EvaluateAlongGradientAt ( ParameterVectorType v ) [inline, virtual]

Evaluate functional with new parameter vector along previously computed gradient direction.

By default this function simply calls Evaluate(), but derived classes can override it to provide more computationally efficient, i.e., restricted, implementations.

Definition at line 112 of file cmtkFunctional.h.

virtual Self::ReturnType cmtk::Functional::EvaluateAt ( ParameterVectorType v ) [inline, virtual]

Evaluate functional with new parameter vector.

Definition at line 97 of file cmtkFunctional.h.

virtual Types::Coordinate cmtk::Functional::GetParamStep ( const   size_t,
const Types::Coordinate  mmStep = 1 
) const [inline, virtual]
virtual void cmtk::Functional::GetParamVector ( ParameterVectorType  ) [inline, virtual]

Return parameter vector.

Definition at line 87 of file cmtkFunctional.h.

References cmtk::StdErr.

virtual size_t cmtk::Functional::ParamVectorDim (  ) const [pure virtual]
virtual void cmtk::Functional::SetParamVector ( ParameterVectorType  ) [inline, virtual]

Set parameter vector.

Definition at line 80 of file cmtkFunctional.h.

References cmtk::StdErr.

virtual size_t cmtk::Functional::VariableParamVectorDim (  ) const [inline, virtual]

Return dimension of the parmater vector's variable part.

For example, the rotation center of a rigid body transformation is not considered variable. Therefore it should not be used for gradient computation. By default this function returns the total parameter vector length.

Reimplemented in cmtk::FunctionalAffine2D, cmtk::GroupwiseRegistrationFunctionalBase, cmtk::ImagePairAffineRegistrationFunctional, cmtk::ImagePairNonrigidRegistrationFunctional, cmtk::ImagePairSymmetricNonrigidRegistrationFunctionalTemplate< VM, W >, cmtk::ImageSymmetryPlaneFunctionalBase, cmtk::SymmetricElasticFunctional_Template< VM >, cmtk::SymmetryPlaneFunctional, cmtk::VoxelMatchingAffineFunctional, cmtk::VoxelMatchingElasticFunctional_WarpTemplate< W >, and cmtk::VoxelMatchingElasticFunctional_WarpTemplate< SplineWarpXform >.

Definition at line 126 of file cmtkFunctional.h.

virtual bool cmtk::Functional::Wiggle (  ) [inline, virtual]

Wiggle a little.

If the functional is not time-invariant, e.g., due to randomization, then the optimizer can tell it to re-organize itself for example for a repeated search.

Returns:
If this function returns true, then the functional did indeed wiggle a little, i.e., potentially change. If the function returns false, then the functional does not support this operation, and the optimizer can assume that further evaluations will produce exactly the same values as before.

Reimplemented in cmtk::CongealingFunctional< TXform >, cmtk::GroupwiseRegistrationFunctionalBase, cmtk::GroupwiseRegistrationFunctionalXformTemplate< SplineWarpXform >, cmtk::GroupwiseRegistrationRMIFunctional< TXform >, cmtk::CongealingFunctional< SplineWarpXform >, and cmtk::GroupwiseRegistrationRMIFunctional< SplineWarpXform >.

Definition at line 154 of file cmtkFunctional.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines