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: 2003/09/10 14:29:26 $
00007   Version:   $Revision: 1.3 $
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 
00036 template <typename TCoordRep, unsigned int VSpaceDimension>
00037 class ITK_EXPORT SphereSignedDistanceFunction : 
00038   public ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension >
00039 {
00040 public:
00042   typedef SphereSignedDistanceFunction Self;
00043   typedef ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension > Superclass;
00044   typedef SmartPointer<Self> Pointer;
00045   typedef SmartPointer<const Self>  ConstPointer;
00046   
00048   itkTypeMacro(SphereSignedDistanceFunction, ShapeSignedDistancFunction);
00049 
00051   itkNewMacro( Self );
00052 
00054   typedef typename Superclass::OutputType OutputType;
00055 
00057   typedef typename Superclass::InputType InputType;
00058   
00060   itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
00061 
00063   typedef typename Superclass::CoordRepType CoordRepType;
00064 
00066   typedef typename Superclass::PointType PointType;
00067 
00069   typedef typename Superclass::ParametersType ParametersType;
00070 
00073   virtual void SetParameters( const ParametersType & );
00074   virtual const ParametersType& GetParameters(void) const;
00075   virtual unsigned int GetNumberOfShapeParameters(void) const
00076     { return 1; }
00077   virtual unsigned int GetNumberOfPoseParameters(void) const
00078     { return SpaceDimension; }
00079 
00081   virtual OutputType Evaluate( const PointType& point ) const;
00082 
00083 protected:
00084   SphereSignedDistanceFunction();
00085   ~SphereSignedDistanceFunction(){};
00086 
00087   void PrintSelf(std::ostream& os, Indent indent) const;
00088 
00089 private:
00090   SphereSignedDistanceFunction( const Self& ); //purposely not implemented
00091   void operator=( const Self& ); //purposely not implemented
00092 
00093   typedef Vector<CoordRepType,itkGetStaticConstMacro(SpaceDimension)> VectorType;
00094 
00095   VectorType   m_Translation;
00096   double       m_Radius;
00097 
00098 };
00099 
00100 } // namespace itk
00101 
00102 #ifndef ITK_MANUAL_INSTANTIATION
00103 #include "itkSphereSignedDistanceFunction.txx"
00104 #endif
00105 
00106 #endif

Generated at Tue Sep 16 11:32:10 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000