Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkShapePriorMAPCostFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShapePriorMAPCostFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-23 03:53:37 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00151   void operator=(const Self&); //purposely not implemented
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 } // end namespace itk
00163 
00164 
00165 #ifndef ITK_MANUAL_INSTANTIATION
00166 #include "itkShapePriorMAPCostFunction.txx"
00167 #endif
00168 
00169 #endif
00170 

Generated at Mon Jul 12 2010 19:51:25 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000