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: 2004/11/04 20:40:34 $
00007   Version:   $Revision: 1.6 $
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>  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 );
00098 
00100   itkSetMacro( ShapeParameterStandardDeviations, ArrayType );
00101   itkGetMacro( ShapeParameterStandardDeviations, ArrayType );
00103 
00107   typedef FixedArray<double,4> WeightsType;
00108   itkSetMacro( Weights, WeightsType );
00109   itkGetConstReferenceMacro( Weights, WeightsType );  
00111 
00117   virtual MeasureType ComputeLogInsideTerm( const ParametersType & parameters ) const;
00118 
00124   virtual MeasureType ComputeLogGradientTerm( const ParametersType & parameters ) const;
00125 
00130   virtual MeasureType ComputeLogShapePriorTerm( const ParametersType & parameters ) const;
00131 
00135   virtual MeasureType ComputeLogPosePriorTerm( const ParametersType & parameters ) const;
00136 
00139   virtual void Initialize(void) throw ( ExceptionObject );
00140 
00141 protected:
00142   ShapePriorMAPCostFunction();
00143   virtual ~ShapePriorMAPCostFunction() {};
00144 
00145   void PrintSelf(std::ostream& os, Indent indent) const;
00146 
00147 private:
00148   ShapePriorMAPCostFunction(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150 
00151   ArrayType      m_ShapeParameterMeans;
00152   ArrayType      m_ShapeParameterStandardDeviations;
00153   WeightsType    m_Weights;
00154 
00155   typename GaussianKernelFunction::Pointer  m_GaussianFunction;
00156 
00157 };
00158 
00159 
00160 } // end namespace itk
00161 
00162 
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkShapePriorMAPCostFunction.txx"
00165 #endif
00166 
00167 #endif
00168 
00169 
00170 
00171 

Generated at Mon Mar 12 02:57:38 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000