00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkShapePriorMAPCostFunction_h
00018
#define __itkShapePriorMAPCostFunction_h
00019
00020
#include "itkShapePriorMAPCostFunctionBase.h"
00021
#include "itkGaussianKernelFunction.h"
00022
00023
namespace itk
00024 {
00025
00048
template <
class TFeatureImage,
class TOutputPixel>
00049 class ITK_EXPORT ShapePriorMAPCostFunction :
00050
public ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel>
00051 {
00052
public:
00054 typedef ShapePriorMAPCostFunction
Self;
00055 typedef ShapePriorMAPCostFunctionBase<TFeatureImage,TOutputPixel> Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060
itkNewMacro(
Self);
00061
00063
itkTypeMacro( ShapePriorMAPCostFunction,
ShapePriorMAPCostFunctionBase );
00064
00067 typedef typename Superclass::ParametersType
ParametersType;
00068
00070 typedef typename Superclass::FeatureImageType
FeatureImageType;
00071 typedef typename Superclass::FeatureImagePointer
FeatureImagePointer;
00072
00074 typedef typename Superclass::MeasureType
MeasureType;
00075
00077
itkStaticConstMacro( ImageDimension,
unsigned int, TFeatureImage::ImageDimension);
00078
00080 typedef typename Superclass::PixelType
PixelType;
00081
00083 typedef typename Superclass::NodeType
NodeType;
00084
00086 typedef typename Superclass::NodeContainerType
NodeContainerType;
00087
00089 typedef typename Superclass::ShapeFunctionType
ShapeFunctionType;
00090
00092 typedef Array<double> ArrayType;
00093
00095
itkSetMacro( ShapeParameterMeans,
ArrayType );
00096
itkGetMacro( ShapeParameterMeans,
ArrayType );
00097
00099
itkSetMacro( ShapeParameterStandardDeviations,
ArrayType );
00100
itkGetMacro( ShapeParameterStandardDeviations,
ArrayType );
00101
00105
typedef FixedArray<double,4> WeightsType;
00106
itkSetMacro( Weights,
WeightsType );
00107 itkGetConstMacro( Weights,
WeightsType );
00108
00114
virtual MeasureType ComputeLogInsideTerm(
const ParametersType & parameters )
const;
00115
00121
virtual MeasureType ComputeLogGradientTerm(
const ParametersType & parameters )
const;
00122
00127
virtual MeasureType ComputeLogShapePriorTerm(
const ParametersType & parameters )
const;
00128
00132
virtual MeasureType ComputeLogPosePriorTerm(
const ParametersType & parameters )
const;
00133
00136
virtual void Initialize(
void) throw ( ExceptionObject );
00137
00138 protected:
00139 ShapePriorMAPCostFunction();
00140 virtual ~ShapePriorMAPCostFunction() {};
00141
00142
void PrintSelf(std::ostream& os,
Indent indent)
const;
00143
00144
private:
00145 ShapePriorMAPCostFunction(
const Self&);
00146
void operator=(
const Self&);
00147
00148
ArrayType m_ShapeParameterMeans;
00149
ArrayType m_ShapeParameterStandardDeviations;
00150
WeightsType m_Weights;
00151
00152
typename GaussianKernelFunction::Pointer m_GaussianFunction;
00153
00154 };
00155
00156
00157 }
00158
00159
00160
#ifndef ITK_MANUAL_INSTANTIATION
00161
#include "itkShapePriorMAPCostFunction.txx"
00162
#endif
00163
00164
#endif
00165
00166
00167