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

itkShapeSignedDistanceFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShapeSignedDistanceFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006-02-06 22:01:58 $
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 __itkShapeSignedDistanceFunction_h
00018 #define __itkShapeSignedDistanceFunction_h
00019 
00020 #include "itkSpatialFunction.h"
00021 #include "itkArray.h"
00022 
00023 namespace itk
00024 {
00025 
00049 template <typename TCoordRep, unsigned int VSpaceDimension>
00050 class ITK_EXPORT ShapeSignedDistanceFunction : 
00051   public SpatialFunction< double, VSpaceDimension, Point<TCoordRep,VSpaceDimension> >
00052 {
00053 public:
00055   typedef ShapeSignedDistanceFunction Self;
00056   typedef SpatialFunction< double, VSpaceDimension, 
00057                                    Point<TCoordRep,VSpaceDimension> > Superclass;
00058   typedef SmartPointer<Self> Pointer;
00059   typedef SmartPointer<const Self>  ConstPointer;
00060 
00062   itkTypeMacro(ShapeSignedDistanceFunction, SpatialFunction);
00063 
00065   typedef typename Superclass::OutputType OutputType;
00066 
00068   typedef typename Superclass::InputType InputType;
00069 
00071   itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension);
00072 
00074   typedef TCoordRep CoordRepType;
00075 
00077   typedef InputType PointType;
00078 
00080   typedef Array<double>      ParametersType;
00081 
00083   virtual void SetParameters( const ParametersType & ) = 0;
00084   virtual ParametersType& GetParameters(void)
00085     { return m_Parameters; }
00086   virtual unsigned int GetNumberOfShapeParameters(void) const = 0;
00087   virtual unsigned int GetNumberOfPoseParameters(void) const = 0;
00088   virtual unsigned int GetNumberOfParameters(void) const
00089     { return this->GetNumberOfShapeParameters() + this->GetNumberOfPoseParameters(); }
00091 
00093   virtual OutputType Evaluate( const PointType& point ) const = 0;
00094 
00097   virtual void Initialize() throw ( ExceptionObject ) {};
00098 
00099 protected:
00100 
00101   ShapeSignedDistanceFunction() {};
00102 
00103   ~ShapeSignedDistanceFunction(){};
00104 
00105   void PrintSelf(std::ostream& os, Indent indent) const
00106     { 
00107     Superclass::PrintSelf( os, indent );
00108 //FIX    os << indent << "Parameters: " << m_Parameters << std::endl;
00109     }
00110 
00111   ParametersType  m_Parameters;
00112 
00113 private:
00114   ShapeSignedDistanceFunction( const Self& ); //purposely not implemented
00115   void operator=( const Self& ); //purposely not implemented
00116 
00117 };
00118 
00119 } // end namespace itk
00120 
00121 #endif
00122 

Generated at Sat Feb 28 13:32:47 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000