Shapeworks Studio
2.1
Shape analysis software suite
|
#include <itkPSMCostFunction.h>
Public Types | |
typedef PSMCostFunction | Self |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef LightObject | Superclass |
typedef PSMParticleSystem< VDimension > | ParticleSystemType |
typedef vnl_vector_fixed< double, VDimension > | VectorType |
Public Member Functions | |
itkTypeMacro (PSMCostFunction, LightObject) | |
itkStaticConstMacro (Dimension, unsigned int, VDimension) | |
virtual VectorType | Evaluate (unsigned int, unsigned int, const ParticleSystemType *, double &maxtimestep) const =0 |
virtual VectorType | Evaluate (unsigned int, unsigned int, const ParticleSystemType *, double &maxtimestep, double &energy) const =0 |
virtual double | Energy (unsigned int, unsigned int, const ParticleSystemType *) const =0 |
virtual void | ResetBuffers () |
virtual void | AfterIteration () |
virtual void | BeforeIteration () |
virtual void | BeforeEvaluate (unsigned int, unsigned int, const ParticleSystemType *) |
virtual void | SetParticleSystem (ParticleSystemType *p) |
virtual ParticleSystemType * | GetParticleSystem () const |
virtual void | SetDomainNumber (unsigned int i) |
virtual int | GetDomainNumber () const |
Protected Member Functions | |
void | operator= (const PSMCostFunction &) |
PSMCostFunction (const PSMCostFunction &) | |
Protected Attributes | |
ParticleSystemType * | m_ParticleSystem |
unsigned int | m_DomainNumber |
This class defines the base API for functions in the PSM optimization framework. These are functions that take a particle system, a particle system domain, and a location index as arguments and return a vector-valued result. Subclasses of these functions are used as metrics in optimizations of the positions of particles in a particle system (PSMParticleSystem).
A unique feature of these function objects is that they implement several methods specific to the PSM optimizer framework, including a BeforeIteration and AfterIteration method, which may be used to apply constraints to gradients, such as constraining particles to lie on surfaces.
Definition at line 52 of file itkPSMCostFunction.h.
typedef PSMParticleSystem<VDimension> itk::PSMCostFunction< VDimension >::ParticleSystemType |
Type of particle system.
Definition at line 63 of file itkPSMCostFunction.h.
typedef PSMCostFunction itk::PSMCostFunction< VDimension >::Self |
Standard class typedefs.
Definition at line 56 of file itkPSMCostFunction.h.
typedef vnl_vector_fixed<double, VDimension> itk::PSMCostFunction< VDimension >::VectorType |
Type of vectors.
Definition at line 66 of file itkPSMCostFunction.h.
|
inlinevirtual |
This method is called by a solver after each iteration. Subclasses may or may not implement this method.
Reimplemented in itk::PSMShapeEntropyFunction< VDimension >, itk::PSMShapeEntropyFunction< Dimension >, itk::PSMTwoCostFunction< VDimension >, itk::PSMTwoCostFunction< Dimension >, itk::TestCostFunction< VDimension >, and itk::TestTwoCostFunction< VDimension >.
Definition at line 91 of file itkPSMCostFunction.h.
|
inlinevirtual |
This method may be called to set up the state of the function object before a call to Evaluate. It is necessary in order to initialize certain constants and variables that may be used for calculating the Energy as well as the Gradients. Typically this is only necessary for the adaptive gradient descent algorithm.
Reimplemented in itk::PSMTwoCostFunction< VDimension >, and itk::PSMTwoCostFunction< Dimension >.
Definition at line 102 of file itkPSMCostFunction.h.
|
inlinevirtual |
This method is called by a solver before each iteration. Subclasses may or may not implement this method.
Reimplemented in itk::PSMShapeEntropyFunction< VDimension >, itk::PSMShapeEntropyFunction< Dimension >, itk::PSMTwoCostFunction< VDimension >, itk::PSMTwoCostFunction< Dimension >, itk::TestCostFunction< VDimension >, and itk::TestTwoCostFunction< VDimension >.
Definition at line 95 of file itkPSMCostFunction.h.
|
pure virtual |
Evaluate returns the vector-valued result of the function. The first argument is a pointer to the particle system. The second argument is the index of the domain within that particle system. The third argument is the index of the particle location within the given domain.
Implemented in itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >, itk::PSMParticleEntropyFunction< typename TImage::PixelType, Dimension >, itk::PSMParticleEntropyFunction< typename ImageType::PixelType, Dimension >, itk::PSMShapeEntropyFunction< VDimension >, itk::PSMShapeEntropyFunction< Dimension >, itk::PSMTwoCostFunction< VDimension >, itk::PSMTwoCostFunction< Dimension >, itk::TestCostFunction< VDimension >, and itk::TestTwoCostFunction< VDimension >.
itk::PSMCostFunction< VDimension >::itkStaticConstMacro | ( | Dimension | , |
unsigned | int, | ||
VDimension | |||
) |
Method for object allocation through the factory. Dimensionality of the domain of the particle system.
|
inlinevirtual |
May be called by the solver class.
Reimplemented in itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >, itk::PSMParticleEntropyFunction< typename TImage::PixelType, Dimension >, and itk::PSMParticleEntropyFunction< typename ImageType::PixelType, Dimension >.
Definition at line 87 of file itkPSMCostFunction.h.
|
inlinevirtual |
Some subclasses may require a pointer to the particle system and its domain number. These methods set/get those values.
Reimplemented in itk::PSMTwoCostFunction< VDimension >, and itk::PSMTwoCostFunction< Dimension >.
Definition at line 106 of file itkPSMCostFunction.h.