ITK
6.0.0
Insight Toolkit
|
#include <itkShapePriorMAPCostFunction.h>
Represents the maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetImageFilter to estimate the shape parameters.
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.
Definition at line 50 of file itkShapePriorMAPCostFunction.h.
Public Member Functions | |
MeasureType | ComputeLogGradientTerm (const ParametersType ¶meters) const override |
MeasureType | ComputeLogInsideTerm (const ParametersType ¶meters) const override |
MeasureType | ComputeLogPosePriorTerm (const ParametersType ¶meters) const override |
MeasureType | ComputeLogShapePriorTerm (const ParametersType ¶meters) const override |
const char * | GetNameOfClass () const override |
void | Initialize () override |
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 MeasureType | ComputeLogGradientTerm (const ParametersType &) const =0 |
virtual MeasureType | ComputeLogInsideTerm (const ParametersType &) const =0 |
virtual MeasureType | ComputeLogPosePriorTerm (const ParametersType &) const =0 |
virtual MeasureType | ComputeLogShapePriorTerm (const ParametersType &) const =0 |
void | GetDerivative (const ParametersType &, DerivativeType &) const override |
const char * | GetNameOfClass () const override |
unsigned int | GetNumberOfParameters () const override |
MeasureType | GetValue (const ParametersType ¶meters) const override |
virtual void | Initialize () |
virtual void | SetShapeFunction (ShapeFunctionType *_arg) |
virtual ShapeFunctionType * | GetModifiableShapeFunction () |
virtual void | SetActiveRegion (const NodeContainerType *_arg) |
virtual const NodeContainerType * | GetActiveRegion () const |
virtual void | SetFeatureImage (const FeatureImageType *_arg) |
virtual const FeatureImageType * | GetFeatureImage () const |
Public Member Functions inherited from itk::SingleValuedCostFunction | |
virtual void | GetDerivative (const ParametersType ¶meters, DerivativeType &derivative) const =0 |
const char * | GetNameOfClass () const override |
virtual MeasureType | GetValue (const ParametersType ¶meters) const =0 |
virtual void | GetValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const |
Public Member Functions inherited from itk::CostFunctionTemplate< double > | |
const char * | GetNameOfClass () const override |
virtual unsigned int | GetNumberOfParameters () const=0 |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
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 val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TFeatureImage::ImageDimension |
Static Public Attributes inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel > | |
static constexpr unsigned int | ImageDimension = TFeatureImage::ImageDimension |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ShapePriorMAPCostFunction () | |
~ShapePriorMAPCostFunction () override=default | |
Protected Member Functions inherited from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel > | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ShapePriorMAPCostFunctionBase () | |
~ShapePriorMAPCostFunctionBase () override=default | |
Protected Member Functions inherited from itk::SingleValuedCostFunction | |
SingleValuedCostFunction ()=default | |
~SingleValuedCostFunction () override | |
Protected Member Functions inherited from itk::CostFunctionTemplate< double > | |
CostFunctionTemplate ()=default | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~CostFunctionTemplate () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~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 | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
GaussianKernelFunction< double >::Pointer | m_GaussianFunction {} |
ArrayType | m_ShapeParameterMeans {} |
ArrayType | m_ShapeParameterStandardDeviations {} |
WeightsType | m_Weights {} |
using | WeightsType = FixedArray< double, 4 > |
virtual void | SetWeights (WeightsType _arg) |
virtual const WeightsType & | GetWeights () 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 | |
std::atomic< int > | m_ReferenceCount {} |
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ArrayType = Array<double> |
Type of the array for storing shape parameter mean and standard deviation. FIXME: should be templated.
Definition at line 96 of file itkShapePriorMAPCostFunction.h.
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::ConstPointer = SmartPointer<const Self> |
Definition at line 59 of file itkShapePriorMAPCostFunction.h.
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Pointer = SmartPointer<Self> |
Definition at line 58 of file itkShapePriorMAPCostFunction.h.
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Self = ShapePriorMAPCostFunction |
Standard class type aliases.
Definition at line 56 of file itkShapePriorMAPCostFunction.h.
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::Superclass = ShapePriorMAPCostFunctionBase<TFeatureImage, TOutputPixel> |
Definition at line 57 of file itkShapePriorMAPCostFunction.h.
using itk::ShapePriorMAPCostFunction< TFeatureImage, TOutputPixel >::WeightsType = FixedArray<double, 4> |
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 112 of file itkShapePriorMAPCostFunction.h.
|
protected |
|
overrideprotecteddefault |
|
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) along 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 >.
|
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 >.
|
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 >.
|
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 >.
|
overridevirtual |
Reimplemented from itk::SingleValuedCostFunction.
|
virtual |
Set/Get the array of shape parameters mean.
|
virtual |
Set/Get the array of shape parameters standard deviation.
|
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.
|
overridevirtual |
Initialize the cost function by making sure that all the components are present.
Reimplemented from itk::ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >.
|
static |
Method for creation through the object factory.
|
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::Object.
|
virtual |
Set/Get the array of shape parameters mean.
|
virtual |
Set/Get the array of shape parameters standard deviation.
|
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.
|
staticconstexpr |
Dimension constant.
Definition at line 79 of file itkShapePriorMAPCostFunction.h.
|
private |
Definition at line 163 of file itkShapePriorMAPCostFunction.h.
|
private |
Definition at line 159 of file itkShapePriorMAPCostFunction.h.
|
private |
Definition at line 160 of file itkShapePriorMAPCostFunction.h.
|
private |
Definition at line 161 of file itkShapePriorMAPCostFunction.h.