ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
itk::SingleImageCostFunction< TImage > Class Template Reference

#include <itkSingleImageCostFunction.h>

+ Inheritance diagram for itk::SingleImageCostFunction< TImage >:
+ Collaboration diagram for itk::SingleImageCostFunction< TImage >:

Detailed Description

template<class TImage>
class itk::SingleImageCostFunction< TImage >

This class is a cost function which queries an underlying image for the single value.

The user is expected to provide an image representing the underlying cost function. The user may also provide an image interpolator (if not provided the LinearInterpolateImageFunction is used by default). The gradient is computed using central differences in physical space.

The parameters are the physical location (itkPoint) of the current position. Initialize() must be called before using this cost function.

Author
Dan Mueller, Queensland University of Technology, dan.muel[at]gmail.com

Definition at line 52 of file itkSingleImageCostFunction.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef ContinuousIndex
< CoordRepType, ImageDimension
ContinuousIndexType
 
typedef
Superclass::ParametersValueType 
CoordRepType
 
typedef
LinearInterpolateImageFunction
< ImageType, CoordRepType
DefaultInterpolatorType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
PhysicalCentralDifferenceImageFunction
< ImageType, CoordRepType
GradientImageFunctionType
 
typedef ImageType::ConstPointer ImageConstPointer
 
typedef TImage::PixelType ImagePixelType
 
typedef TImage ImageType
 
typedef Index< ImageDimensionIndexType
 
typedef
InterpolateImageFunction
< ImageType, CoordRepType
InterpolatorType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Point< CoordRepType,
ImageDimension
PointType
 
typedef SingleImageCostFunction Self
 
typedef SingleValuedCostFunction Superclass
 
- Public Types inherited from itk::SingleValuedCostFunction
typedef SmartPointer< const SelfConstPointer
 
typedef Array
< ParametersValueType
DerivativeType
 
typedef double MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef
Superclass::ParametersValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef SingleValuedCostFunction Self
 
typedef CostFunction Superclass
 
- Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
typedef SmartPointer< const SelfConstPointer
 
typedef OptimizerParameters
< TInternalComputationValueType > 
ParametersType
 
typedef
TInternalComputationValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef CostFunctionTemplate Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNumberOfParameters (void) const override
 
virtual MeasureType GetValue (const ParametersType &parameters) const override
 
virtual void Initialize (void) throw ( ExceptionObject )
 
virtual void SetInterpolator (InterpolatorType *_arg)
 
virtual const InterpolatorTypeGetInterpolator () const
 
virtual void SetImage (const ImageType *_arg)
 
virtual const ImageTypeGetImage () const
 
- Public Member Functions inherited from itk::SingleValuedCostFunction
virtual void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = ImageType::ImageDimension
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 SingleImageCostFunction ()
 
virtual ~SingleImageCostFunction ()
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction () override
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual ~CostFunctionTemplate () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

GradientImageFunctionType::Pointer m_GradientImageFunction
 
ImageConstPointer m_Image
 
InterpolatorType::Pointer m_Interpolator
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<class TImage >
typedef SmartPointer<const Self> itk::SingleImageCostFunction< TImage >::ConstPointer

Definition at line 60 of file itkSingleImageCostFunction.h.

Definition at line 95 of file itkSingleImageCostFunction.h.

Type used for representing point components

Definition at line 89 of file itkSingleImageCostFunction.h.

Definition at line 101 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef Superclass::DerivativeType itk::SingleImageCostFunction< TImage >::DerivativeType

DerivativeType typedef. It defines a type used to return the cost function derivative.

Definition at line 74 of file itkSingleImageCostFunction.h.

Type of the GradientImageFunction class

Definition at line 105 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef ImageType::ConstPointer itk::SingleImageCostFunction< TImage >::ImageConstPointer

Definition at line 83 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef TImage::PixelType itk::SingleImageCostFunction< TImage >::ImagePixelType

Definition at line 82 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef TImage itk::SingleImageCostFunction< TImage >::ImageType

Type of the Image.

Definition at line 81 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef Index< ImageDimension > itk::SingleImageCostFunction< TImage >::IndexType

Type for locations

Definition at line 92 of file itkSingleImageCostFunction.h.

Type of the Interpolator class

Definition at line 99 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef Superclass::MeasureType itk::SingleImageCostFunction< TImage >::MeasureType

MeasureType typedef. It defines a type used to return the cost function value.

Definition at line 66 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef Superclass::ParametersType itk::SingleImageCostFunction< TImage >::ParametersType

ParametersType typedef. It defines a position in the optimization search space.

Definition at line 78 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef SmartPointer<Self> itk::SingleImageCostFunction< TImage >::Pointer

Definition at line 59 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef Point< CoordRepType, ImageDimension > itk::SingleImageCostFunction< TImage >::PointType

Definition at line 93 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef SingleImageCostFunction itk::SingleImageCostFunction< TImage >::Self

Standard class typedefs.

Definition at line 57 of file itkSingleImageCostFunction.h.

template<class TImage >
typedef SingleValuedCostFunction itk::SingleImageCostFunction< TImage >::Superclass

Definition at line 58 of file itkSingleImageCostFunction.h.

Constructor & Destructor Documentation

template<class TImage >
itk::SingleImageCostFunction< TImage >::SingleImageCostFunction ( )
protected
template<class TImage >
virtual itk::SingleImageCostFunction< TImage >::~SingleImageCostFunction ( )
inlineprotectedvirtual

Definition at line 135 of file itkSingleImageCostFunction.h.

Member Function Documentation

template<class TImage >
virtual::itk::LightObject::Pointer itk::SingleImageCostFunction< TImage >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

template<class TImage >
virtual void itk::SingleImageCostFunction< TImage >::GetDerivative ( const ParametersType parameters,
DerivativeType derivative 
) const
overridevirtual

This method returns the derivative of the cost function corresponding to the specified parameters.

Implements itk::SingleValuedCostFunction.

template<class TImage >
virtual const ImageType* itk::SingleImageCostFunction< TImage >::GetImage ( ) const
virtual

Get/set the Image.

template<class TImage >
virtual const InterpolatorType* itk::SingleImageCostFunction< TImage >::GetInterpolator ( ) const
virtual

Get/set the Interpolator.

template<class TImage >
virtual const char* itk::SingleImageCostFunction< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedCostFunction.

template<class TImage >
unsigned int itk::SingleImageCostFunction< TImage >::GetNumberOfParameters ( void  ) const
inlineoverridevirtual

Return the number of parameters required by the Transform

Implements itk::CostFunctionTemplate< TInternalComputationValueType >.

Definition at line 121 of file itkSingleImageCostFunction.h.

template<class TImage >
virtual MeasureType itk::SingleImageCostFunction< TImage >::GetValue ( const ParametersType parameters) const
overridevirtual

This method returns the value of the cost function corresponding to the specified parameters.

Implements itk::SingleValuedCostFunction.

template<class TImage >
virtual void itk::SingleImageCostFunction< TImage >::Initialize ( void  )
throw (ExceptionObject
)
virtual

Initialize the cost function

template<class TImage >
static Pointer itk::SingleImageCostFunction< TImage >::New ( )
static

Method for creation through the object factory.

template<class TImage >
void itk::SingleImageCostFunction< TImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::CostFunctionTemplate< TInternalComputationValueType >.

template<class TImage >
virtual void itk::SingleImageCostFunction< TImage >::SetImage ( const ImageType _arg)
virtual

Get/set the Image.

template<class TImage >
virtual void itk::SingleImageCostFunction< TImage >::SetInterpolator ( InterpolatorType _arg)
virtual

Get/set the Interpolator.

Member Data Documentation

template<class TImage >
const unsigned int itk::SingleImageCostFunction< TImage >::ImageDimension = ImageType::ImageDimension
static

Constant for the image dimension

Definition at line 86 of file itkSingleImageCostFunction.h.

template<class TImage >
GradientImageFunctionType::Pointer itk::SingleImageCostFunction< TImage >::m_GradientImageFunction
private

Definition at line 143 of file itkSingleImageCostFunction.h.

template<class TImage >
ImageConstPointer itk::SingleImageCostFunction< TImage >::m_Image
private

Definition at line 139 of file itkSingleImageCostFunction.h.

template<class TImage >
InterpolatorType::Pointer itk::SingleImageCostFunction< TImage >::m_Interpolator
private

Definition at line 142 of file itkSingleImageCostFunction.h.


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