Go to the documentation of this file.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>
00056 Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00061 itkNewMacro(Self);
00062
00064 itkTypeMacro( ShapePriorMAPCostFunction, ShapePriorMAPCostFunctionBase );
00065
00068 typedef typename Superclass::ParametersType ParametersType;
00069
00071 typedef typename Superclass::FeatureImageType FeatureImageType;
00072 typedef typename Superclass::FeatureImagePointer FeatureImagePointer;
00073
00075 typedef typename Superclass::MeasureType MeasureType;
00076
00078 itkStaticConstMacro( ImageDimension, unsigned int, TFeatureImage::ImageDimension);
00079
00081 typedef typename Superclass::PixelType PixelType;
00082
00084 typedef typename Superclass::NodeType NodeType;
00085
00087 typedef typename Superclass::NodeContainerType NodeContainerType;
00088
00090 typedef typename Superclass::ShapeFunctionType ShapeFunctionType;
00091
00093 typedef Array<double> ArrayType;
00094
00096 itkSetMacro( ShapeParameterMeans, ArrayType );
00097 itkGetConstMacro( ShapeParameterMeans, ArrayType );
00099
00101 itkSetMacro( ShapeParameterStandardDeviations, ArrayType );
00102 itkGetConstMacro( ShapeParameterStandardDeviations, ArrayType );
00104
00109 typedef FixedArray<double,4> WeightsType;
00110 itkSetMacro( Weights, WeightsType );
00111 itkGetConstReferenceMacro( Weights, WeightsType );
00113
00119 virtual MeasureType ComputeLogInsideTerm( const ParametersType & parameters ) const;
00120
00126 virtual MeasureType ComputeLogGradientTerm( const ParametersType & parameters ) const;
00127
00132 virtual MeasureType ComputeLogShapePriorTerm( const ParametersType & parameters ) const;
00133
00137 virtual MeasureType ComputeLogPosePriorTerm( const ParametersType & parameters ) const;
00138
00141 virtual void Initialize(void) throw ( ExceptionObject );
00142
00143 protected:
00144 ShapePriorMAPCostFunction();
00145 virtual ~ShapePriorMAPCostFunction() {};
00146
00147 void PrintSelf(std::ostream& os, Indent indent) const;
00148
00149 private:
00150 ShapePriorMAPCostFunction(const Self&);
00151 void operator=(const Self&);
00152
00153 ArrayType m_ShapeParameterMeans;
00154 ArrayType m_ShapeParameterStandardDeviations;
00155 WeightsType m_Weights;
00156
00157 typename GaussianKernelFunction::Pointer m_GaussianFunction;
00158
00159 };
00160
00161
00162 }
00163
00164
00165 #ifndef ITK_MANUAL_INSTANTIATION
00166 #include "itkShapePriorMAPCostFunction.txx"
00167 #endif
00168
00169 #endif
00170