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

itkSphereSignedDistanceFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSphereSignedDistanceFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-03 15:09:42 $
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 __itkSphereSignedDistanceFunction_h
00018 #define __itkSphereSignedDistanceFunction_h
00019 
00020 #include "itkShapeSignedDistanceFunction.h"
00021 #include "itkVector.h"
00022 
00023 namespace itk
00024 {
00025 
00041 template <typename TCoordRep, unsigned int VSpaceDimension>
00042 class ITK_EXPORT SphereSignedDistanceFunction : 
00043   public ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension >
00044 {
00045 public:
00047   typedef SphereSignedDistanceFunction                              Self;
00048   typedef ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension > Superclass;
00049   typedef SmartPointer<Self>                                        Pointer;
00050   typedef SmartPointer<const Self>                                  ConstPointer;
00051 
00053   itkTypeMacro(SphereSignedDistanceFunction, ShapeSignedDistancFunction);
00054 
00056   itkNewMacro( Self );
00057 
00059   typedef typename Superclass::OutputType OutputType;
00060 
00062   typedef typename Superclass::InputType InputType;
00063 
00065   itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
00066 
00068   typedef typename Superclass::CoordRepType CoordRepType;
00069 
00071   typedef typename Superclass::PointType PointType;
00072 
00074   typedef typename Superclass::ParametersType ParametersType;
00075 
00078   virtual void SetParameters( const ParametersType & );
00079   virtual unsigned int GetNumberOfShapeParameters(void) const
00080     { return 1; }
00081   virtual unsigned int GetNumberOfPoseParameters(void) const
00082     { return SpaceDimension; }
00084 
00086   virtual OutputType Evaluate( const PointType& point ) const;
00087 
00088 protected:
00089   SphereSignedDistanceFunction();
00090   ~SphereSignedDistanceFunction(){};
00091 
00092   void PrintSelf(std::ostream& os, Indent indent) const;
00093 
00094 private:
00095   SphereSignedDistanceFunction( const Self& ); //purposely not implemented
00096   void operator=( const Self& ); //purposely not implemented
00097 
00098   typedef Vector<CoordRepType,itkGetStaticConstMacro(SpaceDimension)> VectorType;
00099 
00100   VectorType   m_Translation;
00101   double       m_Radius;
00102 
00103 };
00104 
00105 } // end namespace itk
00106 
00107 
00108 // Define instantiation macro for this template.
00109 #define ITK_TEMPLATE_SphereSignedDistanceFunction(_, EXPORT, x, y) namespace itk { \
00110   _(2(class EXPORT SphereSignedDistanceFunction< ITK_TEMPLATE_2 x >)) \
00111   namespace Templates { typedef SphereSignedDistanceFunction< ITK_TEMPLATE_2 x > \
00112                                          SphereSignedDistanceFunction##y; } \
00113   }
00114 
00115 #if ITK_TEMPLATE_EXPLICIT
00116 # include "Templates/itkSphereSignedDistanceFunction+-.h"
00117 #endif
00118 
00119 #if ITK_TEMPLATE_TXX
00120 # include "itkSphereSignedDistanceFunction.txx"
00121 #endif
00122 
00123 #endif
00124 

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