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

itkPCAShapeSignedDistanceFunction.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPCAShapeSignedDistanceFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:19 $ 00007 Version: $Revision: 1.4 $ 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 _itkPCAShapeSignedDistanceFunction_h 00018 #define _itkPCAShapeSignedDistanceFunction_h 00019 00020 00021 #include "itkShapeSignedDistanceFunction.h" 00022 #include "itkImage.h" 00023 #include "itkInterpolateImageFunction.h" 00024 #include "itkExtrapolateImageFunction.h" 00025 00026 namespace itk 00027 { 00028 00029 00040 template< typename TCoordRep, 00041 unsigned int VSpaceDimension, 00042 typename TImage = Image<double,VSpaceDimension> > 00043 class ITK_EXPORT PCAShapeSignedDistanceFunction : 00044 public ShapeSignedDistanceFunction<TCoordRep, VSpaceDimension> 00045 { 00046 00047 public: 00049 typedef PCAShapeSignedDistanceFunction Self; 00050 typedef ShapeSignedDistanceFunction< 00051 TCoordRep, VSpaceDimension> Superclass; 00052 typedef SmartPointer<Self> Pointer; 00053 typedef SmartPointer<const Self> ConstPointer; 00054 00055 00057 itkTypeMacro(PCAShapeSignedDistanceFunction, ShapeSignedDistancFunction); 00058 00060 itkNewMacro(Self); 00061 00063 itkStaticConstMacro(SpaceDimension,unsigned int,Superclass::SpaceDimension); 00064 00065 00067 typedef typename Superclass::CoordRepType CoordRepType; 00068 00070 typedef typename Superclass::InputType InputType; 00071 00073 typedef typename Superclass::OutputType OutputType; 00074 00076 typedef typename Superclass::PointType PointType; 00077 00079 typedef typename Superclass::ParametersType ParametersType; 00080 00081 00083 typedef TImage ImageType; 00084 typedef typename ImageType::Pointer ImagePointer; 00085 typedef std::vector<ImagePointer> ImagePointerVector; 00086 00088 typedef Transform<CoordRepType, 00089 itkGetStaticConstMacro(SpaceDimension), 00090 itkGetStaticConstMacro(SpaceDimension)> TransformType; 00091 00093 typedef InterpolateImageFunction<ImageType, CoordRepType> InterpolatorType; 00094 typedef typename InterpolatorType::Pointer InterpolatorPointer; 00095 typedef std::vector<InterpolatorPointer> InterpolatorPointerVector; 00096 00098 typedef ExtrapolateImageFunction<ImageType, CoordRepType> ExtrapolatorType; 00099 typedef typename ExtrapolatorType::Pointer ExtrapolatorPointer; 00100 typedef std::vector<ExtrapolatorPointer> ExtrapolatorPointerVector; 00101 00103 typedef ImageFunction<ImageType, double, CoordRepType> FunctionType; 00104 typedef typename FunctionType::Pointer FunctionPointer; 00105 typedef std::vector<FunctionPointer> FunctionPointerVector; 00106 00107 00110 void SetNumberOfPrincipalComponents(unsigned int n); 00111 itkGetMacro(NumberOfPrincipalComponents, unsigned int); 00112 00114 itkSetObjectMacro(MeanImage, ImageType); 00115 itkGetObjectMacro(MeanImage, ImageType); 00116 00118 void SetPrincipalComponentImages(ImagePointerVector v) 00119 { m_PrincipalComponentImages = v; } 00120 // ImagePointerVector & GetPrincipalComponentImages() 00121 // { return m_PrincipalComponentImages; } 00122 00124 itkSetMacro(PrincipalComponentStandardDeviations, ParametersType); 00125 itkGetMacro(PrincipalComponentStandardDeviations, ParametersType); 00126 00128 itkSetObjectMacro(Transform, TransformType); 00129 itkGetObjectMacro(Transform, TransformType); 00130 00131 00133 virtual void SetParameters( const ParametersType & ); 00134 virtual const ParametersType& GetParameters(void) const 00135 { return m_Parameters; } 00136 virtual unsigned int GetNumberOfShapeParameters(void) const 00137 { return m_NumberOfPrincipalComponents; } 00138 virtual unsigned int GetNumberOfPoseParameters(void) const 00139 { return m_Transform ? m_Transform->GetNumberOfParameters() : 0; } 00140 00142 virtual OutputType Evaluate(const PointType& point) const; 00143 00146 virtual void Initialize() throw ( ExceptionObject ); 00147 00148 00149 protected: 00150 PCAShapeSignedDistanceFunction(); 00151 ~PCAShapeSignedDistanceFunction(){}; 00152 00153 void PrintSelf(std::ostream& os, Indent indent) const; 00154 00155 00156 private: 00157 PCAShapeSignedDistanceFunction(const Self&); //purposely not implemented 00158 void operator=( const Self& ); //purposely not implemented 00159 00160 00162 unsigned int m_NumberOfPrincipalComponents; 00163 unsigned int m_NumberOfTransformParameters; 00164 00165 ImagePointer m_MeanImage; 00166 ImagePointerVector m_PrincipalComponentImages; 00167 ParametersType m_PrincipalComponentStandardDeviations; 00168 00170 typename TransformType::Pointer m_Transform; 00171 InterpolatorPointerVector m_Interpolators; 00172 ExtrapolatorPointerVector m_Extrapolators; 00173 mutable FunctionPointerVector m_Selectors; 00174 00176 ParametersType m_WeightOfPrincipalComponents; 00177 ParametersType m_TransformParameters; 00178 00179 }; 00180 00181 } // namespace itk 00182 00183 #ifndef ITK_MANUAL_INSTANTIATION 00184 #include "itkPCAShapeSignedDistanceFunction.txx" 00185 #endif 00186 00187 #endif

Generated at Sat Mar 31 02:27:09 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000