Shapeworks Studio
2.1
Shape analysis software suite
|
#include <itkPSMTwoCostFunction.h>
Public Types | |
typedef PSMTwoCostFunction | Self |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef PSMCostFunction< VDimension > | Superclass |
typedef Superclass::ParticleSystemType | ParticleSystemType |
typedef Superclass::VectorType | VectorType |
Public Types inherited from itk::PSMCostFunction< VDimension > | |
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 (PSMTwoCostFunction, PSMCostFunction) | |
itkNewMacro (Self) | |
itkStaticConstMacro (Dimension, unsigned int, VDimension) | |
virtual VectorType | Evaluate (unsigned int idx, unsigned int d, const ParticleSystemType *system, double &maxmove) const |
virtual VectorType | Evaluate (unsigned int idx, unsigned int d, const ParticleSystemType *system, double &maxmove, double &energy) const |
virtual double | Energy (unsigned int idx, unsigned int d, const ParticleSystemType *system) const |
virtual void | BeforeEvaluate (unsigned int idx, unsigned int d, const ParticleSystemType *system) |
virtual void | AfterIteration () |
virtual void | BeforeIteration () |
virtual void | SetParticleSystem (ParticleSystemType *p) |
void | SetDomainNumber (unsigned int i) |
void | SetFunctionA (PSMCostFunction< VDimension > *o) |
void | SetFunctionB (PSMCostFunction< VDimension > *o) |
void | SetAOn () |
void | SetAOff () |
void | SetAOn (bool s) |
bool | GetAOn () const |
void | SetBOn () |
void | SetBOff () |
void | SetBOn (bool s) |
bool | GetBOn () const |
void | SetRelativeEnergyScaling (double r) |
double | GetRelativeEnergyScaling () const |
void | SetRelativeGradientScaling (double r) |
double | GetRelativeGradientScaling () const |
double | GetAverageGradMagA () const |
double | GetAverageGradMagB () const |
double | GetAverageEnergyA () const |
double | GetAverageEnergyB () const |
Public Member Functions inherited from itk::PSMCostFunction< VDimension > | |
itkTypeMacro (PSMCostFunction, LightObject) | |
itkStaticConstMacro (Dimension, unsigned int, VDimension) | |
virtual void | ResetBuffers () |
virtual ParticleSystemType * | GetParticleSystem () const |
virtual int | GetDomainNumber () const |
Protected Member Functions | |
void | operator= (const PSMTwoCostFunction &) |
PSMTwoCostFunction (const PSMTwoCostFunction &) | |
Protected Member Functions inherited from itk::PSMCostFunction< VDimension > | |
void | operator= (const PSMCostFunction &) |
PSMCostFunction (const PSMCostFunction &) | |
Protected Attributes | |
bool | m_AOn |
bool | m_BOn |
double | m_RelativeGradientScaling |
double | m_RelativeEnergyScaling |
double | m_AverageGradMagA |
double | m_AverageGradMagB |
double | m_AverageEnergyA |
double | m_AverageEnergyB |
double | m_Counter |
PSMCostFunction< VDimension >::Pointer | m_FunctionA |
PSMCostFunction< VDimension >::Pointer | m_FunctionB |
Protected Attributes inherited from itk::PSMCostFunction< VDimension > | |
ParticleSystemType * | m_ParticleSystem |
unsigned int | m_DomainNumber |
This class combines two PSMCostFunction objects into a single PSMCostFunction that is the linear combination of the two. The second function (FunctionB) can be scaled relative to the first function (SetRelativeGradientScaling), and evaluation of both functions may be toggled on and off.
An example of how to use this class is given by itkPSMEntropyModelFilter, which combines an itkPSMParticleEntropyFunction (FunctionA) with an itkPSMShapeEntropyFunction (Function B) to perform simultaneous maximization of entropy on the surfaces of a collection of shapes with minimization of the entropy of the collection's distribution in shape space.
Definition at line 51 of file itkPSMTwoCostFunction.h.
typedef Superclass::ParticleSystemType itk::PSMTwoCostFunction< VDimension >::ParticleSystemType |
Type of particle system.
Definition at line 62 of file itkPSMTwoCostFunction.h.
typedef PSMTwoCostFunction itk::PSMTwoCostFunction< VDimension >::Self |
Standard class typedefs.
Definition at line 55 of file itkPSMTwoCostFunction.h.
typedef Superclass::VectorType itk::PSMTwoCostFunction< VDimension >::VectorType |
Vector type.
Definition at line 65 of file itkPSMTwoCostFunction.h.
|
inlinevirtual |
This method is called by a solver after each iteration. Subclasses may or may not implement this method.
Reimplemented from itk::PSMCostFunction< VDimension >.
Definition at line 96 of file itkPSMTwoCostFunction.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 from itk::PSMCostFunction< VDimension >.
Definition at line 87 of file itkPSMTwoCostFunction.h.
|
inlinevirtual |
This method is called by a solver before each iteration. Subclasses may or may not implement this method.
Reimplemented from itk::PSMCostFunction< VDimension >.
Definition at line 104 of file itkPSMTwoCostFunction.h.
|
virtual |
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.
Implements itk::PSMCostFunction< VDimension >.
Definition at line 28 of file itkPSMTwoCostFunction.hxx.
itk::PSMTwoCostFunction< VDimension >::itkNewMacro | ( | Self | ) |
Method for creation through the object factory.
itk::PSMTwoCostFunction< VDimension >::itkStaticConstMacro | ( | Dimension | , |
unsigned | int, | ||
VDimension | |||
) |
Dimensionality of the domain of the particle system.
|
inline |
Turn each term on and off.
Definition at line 149 of file itkPSMTwoCostFunction.h.
|
inlinevirtual |
Some subclasses may require a pointer to the particle system and its domain number. These methods set/get those values.
Reimplemented from itk::PSMCostFunction< VDimension >.
Definition at line 120 of file itkPSMTwoCostFunction.h.
|
inline |
The relative scaling scales the gradient B relative to A. By default this value is 1.0.
Definition at line 160 of file itkPSMTwoCostFunction.h.