ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel > Class Template Reference

#include <itkShapePriorMAPCostFunction.h>

+ Inheritance diagram for itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >:
+ Collaboration diagram for itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >:

Detailed Description

template<typename TFeatureImage, typename TOutputPixel>
class itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >

Represents the maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetImageFilter to estimate the shape paramaeters.

This class follows the shape and pose parameters estimation developed in [1]. Note that this class returns the negative log of the MAP function. Using the negative function make this cost function compatible with generic optimizers which seeks the minimum of a cost function.

This class has two template parameters, the feature image type representing the edge potential map and the pixel type used to represent the output level set in the ShapePriorSegmentationLevelSetImageFilter.

See Also
ShapePriorSegmentationLevelSetImageFilter
REFERENCES
[1] Leventon, M.E. et al. "Statistical Shape Influence in Geodesic Active Contours", CVPR 2000.
Examples:
Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx.

Definition at line 50 of file itkShapePriorMAPCostFunction.h.

Public Types

typedef Array< double > ArrayType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::FeatureImagePointer 
FeatureImagePointer
 
typedef
Superclass::FeatureImageType 
FeatureImageType
 
typedef Superclass::MeasureType MeasureType
 
typedef
Superclass::NodeContainerType 
NodeContainerType
 
typedef Superclass::NodeType NodeType
 
typedef Superclass::ParametersType ParametersType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef ShapePriorMAPCostFunction Self
 
typedef
Superclass::ShapeFunctionType 
ShapeFunctionType
 
typedef
ShapePriorMAPCostFunctionBase
< TFeatureImage, TOutputPixel > 
Superclass
 
- Public Types inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
FeatureImageType::ConstPointer 
FeatureImagePointer
 
typedef TFeatureImage FeatureImageType
 
typedef Superclass::MeasureType MeasureType
 
typedef
NodeContainerType::ConstPointer 
NodeContainerPointer
 
typedef VectorContainer
< unsigned int, NodeType
NodeContainerType
 
typedef LevelSetNode
< PixelType,
itkGetStaticConstMacro(ImageDimension) > 
NodeType
 
typedef Superclass::ParametersType ParametersType
 
typedef TOutputPixel PixelType
 
typedef SmartPointer< SelfPointer
 
typedef
ShapePriorMAPCostFunctionBase 
Self
 
typedef ShapeFunctionType::Pointer ShapeFunctionPointer
 
typedef
ShapeSignedDistanceFunction
< double,
itkGetStaticConstMacro(ImageDimension) > 
ShapeFunctionType
 
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 MeasureType ComputeLogGradientTerm (const ParametersType &parameters) const override
 
virtual MeasureType ComputeLogInsideTerm (const ParametersType &parameters) const override
 
virtual MeasureType ComputeLogPosePriorTerm (const ParametersType &parameters) const override
 
virtual MeasureType ComputeLogShapePriorTerm (const ParametersType &parameters) const override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual void Initialize () override throw ( ExceptionObject )
 
virtual void SetShapeParameterMeans (ArrayType _arg)
 
virtual ArrayType GetShapeParameterMeans () const
 
virtual void SetShapeParameterStandardDeviations (ArrayType _arg)
 
virtual ArrayType GetShapeParameterStandardDeviations () const
 
- Public Member Functions inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
virtual void GetDerivative (const ParametersType &, DerivativeType &) const override
 
virtual unsigned int GetNumberOfParameters (void) const override
 
virtual MeasureType GetValue (const ParametersType &parameters) const override
 
virtual void SetShapeFunction (ShapeFunctionType *_arg)
 
virtual ShapeFunctionTypeGetModifiableShapeFunction ()
 
virtual const ShapeFunctionTypeGetShapeFunction () const
 
virtual void SetActiveRegion (const NodeContainerType *_arg)
 
virtual const NodeContainerTypeGetActiveRegion () const
 
virtual void SetFeatureImage (const FeatureImageType *_arg)
 
virtual const FeatureImageTypeGetFeatureImage () 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 = TFeatureImage::ImageDimension
 
- Static Public Attributes inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
static const unsigned int ImageDimension = TFeatureImage::ImageDimension
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 ShapePriorMAPCostFunction ()
 
virtual ~ShapePriorMAPCostFunction ()
 
- Protected Member Functions inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
 ShapePriorMAPCostFunctionBase ()
 
virtual ~ShapePriorMAPCostFunctionBase ()
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction ()
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual ~CostFunctionTemplate ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 Member Functions

void operator= (const Self &)
 
 ShapePriorMAPCostFunction (const Self &)
 

Private Attributes

GaussianKernelFunction< double >
::Pointer 
m_GaussianFunction
 
ArrayType m_ShapeParameterMeans
 
ArrayType m_ShapeParameterStandardDeviations
 
WeightsType m_Weights
 
typedef FixedArray< double, 4 > WeightsType
 
virtual void SetWeights (WeightsType _arg)
 
virtual const WeightsTypeGetWeights () const
 

Additional Inherited Members

- Protected Attributes inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
NodeContainerPointer m_ActiveRegion
 
FeatureImagePointer m_FeatureImage
 
ShapeFunctionPointer m_ShapeFunction
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TFeatureImage , typename TOutputPixel >
typedef Array< double > itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ArrayType

Type of the array for storing shape parameter mean and standard deivation. FIXME: should be templated.

Definition at line 95 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef SmartPointer< const Self > itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ConstPointer

Definition at line 58 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::FeatureImagePointer itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::FeatureImagePointer

Definition at line 72 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::FeatureImageType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::FeatureImageType

Type of the feature image representing the edge potential map.

Definition at line 71 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::MeasureType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::MeasureType

Type of the return measure value.

Definition at line 75 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::NodeContainerType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::NodeContainerType

Type of container used to store the level set nodes.

Definition at line 87 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::NodeType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::NodeType

Type of node used to represent the active region around the zero set.

Definition at line 84 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::ParametersType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ParametersType

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

Definition at line 64 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::PixelType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::PixelType

Type of pixel used to represent the level set.

Definition at line 81 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef SmartPointer< Self > itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Pointer

Definition at line 57 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef ShapePriorMAPCostFunction itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Self

Standard class typedefs.

Definition at line 55 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef Superclass::ShapeFunctionType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ShapeFunctionType

Type of the shape signed distance function.

Definition at line 90 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel > itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Superclass

Definition at line 56 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
typedef FixedArray< double, 4 > itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::WeightsType

Set/Get the weights for each term. Default is a vector of all ones. The weights are applied to terms in the following order: LogInsideTerm, LogGradientTerm, LogShapePriorTerm and LogPosePriorTerm.

Definition at line 104 of file itkShapePriorMAPCostFunction.h.

Constructor & Destructor Documentation

template<typename TFeatureImage , typename TOutputPixel >
itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ShapePriorMAPCostFunction ( )
protected
template<typename TFeatureImage , typename TOutputPixel >
virtual itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::~ShapePriorMAPCostFunction ( )
inlineprotectedvirtual

Definition at line 147 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ShapePriorMAPCostFunction ( const Self )
private

Member Function Documentation

template<typename TFeatureImage , typename TOutputPixel >
virtual MeasureType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ComputeLogGradientTerm ( const ParametersType parameters) const
overridevirtual

Compute the gradient term component of the MAP cost function. In particular, this method assume that ( 1 - FeatureImage ) approximates a Gaussian (zero mean, unit variance) algon the normal of the evolving contour. The gradient term is then given by a Laplacian of the goodness of fit of the Gaussian.

Implements itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual MeasureType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ComputeLogInsideTerm ( const ParametersType parameters) const
overridevirtual

Compute the inside term component of the MAP cost function. In particular, the method sums the number of pixels inside the current contour (defined by nodes of the active region that are less than zero) which are outside the shape specified by the input parameters.

Implements itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual MeasureType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ComputeLogPosePriorTerm ( const ParametersType parameters) const
overridevirtual

Compute the pose prior component of the MAP cost function. In particular, this method assumes that the pose parameters are uniformly distributed and returns a constant of zero.

Implements itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual MeasureType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ComputeLogShapePriorTerm ( const ParametersType parameters) const
overridevirtual

Compute the shape prior component of the MAP cost function. In particular, the method assumes that the shape parameters comes from independent Gaussian distributions defined by the ShapeParameterMeans and ShapeParameterVariances array.

Implements itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual::itk::LightObject::Pointer itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::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<typename TFeatureImage , typename TOutputPixel >
virtual const char* itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual ArrayType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::GetShapeParameterMeans ( ) const
virtual

Set/Get the array of shape parameters mean.

template<typename TFeatureImage , typename TOutputPixel >
virtual ArrayType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::GetShapeParameterStandardDeviations ( ) const
virtual

Set/Get the array of shape parameters standard deviation.

template<typename TFeatureImage , typename TOutputPixel >
virtual const WeightsType& itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::GetWeights ( ) const
virtual

Set/Get the weights for each term. Default is a vector of all ones. The weights are applied to terms in the following order: LogInsideTerm, LogGradientTerm, LogShapePriorTerm and LogPosePriorTerm.

template<typename TFeatureImage , typename TOutputPixel >
virtual void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Initialize ( )
throw (ExceptionObject
)
overridevirtual

Initialize the cost function by making sure that all the components are present.

Reimplemented from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
static Pointer itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::New ( )
static

Method for creation through the object factory.

template<typename TFeatureImage , typename TOutputPixel >
void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::operator= ( const Self )
private
template<typename TFeatureImage , typename TOutputPixel >
void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::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::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.

template<typename TFeatureImage , typename TOutputPixel >
virtual void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::SetShapeParameterMeans ( ArrayType  _arg)
virtual

Set/Get the array of shape parameters mean.

template<typename TFeatureImage , typename TOutputPixel >
virtual void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::SetShapeParameterStandardDeviations ( ArrayType  _arg)
virtual

Set/Get the array of shape parameters standard deviation.

template<typename TFeatureImage , typename TOutputPixel >
virtual void itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::SetWeights ( WeightsType  _arg)
virtual

Set/Get the weights for each term. Default is a vector of all ones. The weights are applied to terms in the following order: LogInsideTerm, LogGradientTerm, LogShapePriorTerm and LogPosePriorTerm.

Member Data Documentation

template<typename TFeatureImage , typename TOutputPixel >
const unsigned int itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ImageDimension = TFeatureImage::ImageDimension
static

Dimension constant.

Definition at line 78 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
GaussianKernelFunction<double>::Pointer itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::m_GaussianFunction
private

Definition at line 159 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
ArrayType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::m_ShapeParameterMeans
private

Definition at line 155 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
ArrayType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::m_ShapeParameterStandardDeviations
private

Definition at line 156 of file itkShapePriorMAPCostFunction.h.

template<typename TFeatureImage , typename TOutputPixel >
WeightsType itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::m_Weights
private

Definition at line 157 of file itkShapePriorMAPCostFunction.h.


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