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

itkShapePriorMAPCostFunctionBase.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkShapePriorMAPCostFunctionBase.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:39 $ 00007 Version: $Revision: 1.5 $ 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 __itkShapePriorMAPCostFunctionBase_h 00018 #define __itkShapePriorMAPCostFunctionBase_h 00019 00020 #include "itkSingleValuedCostFunction.h" 00021 #include "itkLevelSet.h" 00022 #include "itkShapeSignedDistanceFunction.h" 00023 00024 namespace itk 00025 { 00026 00046 template <class TFeatureImage, class TOutputPixel> 00047 class ITK_EXPORT ShapePriorMAPCostFunctionBase : 00048 public SingleValuedCostFunction 00049 { 00050 public: 00052 typedef ShapePriorMAPCostFunctionBase Self; 00053 typedef SingleValuedCostFunction Superclass; 00054 typedef SmartPointer<Self> Pointer; 00055 typedef SmartPointer<const Self> ConstPointer; 00056 00058 itkTypeMacro( ShapePriorMAPCostFunctionBase, SingleValuedCostFunction ); 00059 00062 typedef typename Superclass::MeasureType MeasureType; 00063 00066 typedef typename Superclass::DerivativeType DerivativeType; 00067 00070 typedef typename Superclass::ParametersType ParametersType; 00071 00073 typedef TFeatureImage FeatureImageType; 00074 typedef typename FeatureImageType::ConstPointer FeatureImagePointer; 00075 00077 itkStaticConstMacro( ImageDimension, unsigned int, TFeatureImage::ImageDimension); 00078 00080 typedef TOutputPixel PixelType; 00081 00083 typedef LevelSetNode<PixelType, itkGetStaticConstMacro(ImageDimension)> NodeType; 00084 00086 typedef VectorContainer<unsigned int, NodeType> NodeContainerType; 00087 typedef typename NodeContainerType::ConstPointer NodeContainerPointer; 00088 00090 typedef ShapeSignedDistanceFunction<double, 00091 itkGetStaticConstMacro(ImageDimension)> ShapeFunctionType; 00092 typedef typename ShapeFunctionType::Pointer ShapeFunctionPointer; 00093 00095 itkSetObjectMacro( ShapeFunction, ShapeFunctionType ); 00096 itkGetObjectMacro( ShapeFunction, ShapeFunctionType ); 00097 00099 itkSetConstObjectMacro( ActiveRegion, NodeContainerType ); 00100 itkGetConstObjectMacro( ActiveRegion, NodeContainerType ); 00101 00103 itkSetConstObjectMacro( FeatureImage, FeatureImageType ); 00104 itkGetConstObjectMacro( FeatureImage, FeatureImageType ); 00105 00108 virtual MeasureType GetValue( const ParametersType & parameters ) const; 00109 00110 00113 virtual void GetDerivative( const ParametersType &, DerivativeType & ) const 00114 { itkExceptionMacro( << "This function is currently not supported." ); } 00115 00117 virtual unsigned int GetNumberOfParameters(void) const 00118 { return m_ShapeFunction->GetNumberOfParameters(); } 00119 00120 00123 virtual MeasureType ComputeLogInsideTerm( const ParametersType & ) const = 0; 00124 00127 virtual MeasureType ComputeLogGradientTerm( const ParametersType & ) const = 0; 00128 00131 virtual MeasureType ComputeLogShapePriorTerm( const ParametersType & ) const = 0; 00132 00135 virtual MeasureType ComputeLogPosePriorTerm( const ParametersType & ) const = 0; 00136 00139 virtual void Initialize(void) throw ( ExceptionObject ); 00140 00141 00142 protected: 00143 ShapePriorMAPCostFunctionBase(); 00144 virtual ~ShapePriorMAPCostFunctionBase() {}; 00145 00146 void PrintSelf(std::ostream& os, Indent indent) const; 00147 00148 ShapeFunctionPointer m_ShapeFunction; 00149 NodeContainerPointer m_ActiveRegion; 00150 FeatureImagePointer m_FeatureImage; 00151 00152 private: 00153 ShapePriorMAPCostFunctionBase(const Self&); //purposely not implemented 00154 void operator=(const Self&); //purposely not implemented 00155 00156 }; 00157 00158 00159 } // end namespace itk 00160 00161 00162 #ifndef ITK_MANUAL_INSTANTIATION 00163 #include "itkShapePriorMAPCostFunctionBase.txx" 00164 #endif 00165 00166 #endif 00167 00168 00169

Generated at Sun Apr 1 02:44:03 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000