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

itkSphereSpatialFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSphereSpatialFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:24:12 $
00007   Version:   $Revision: 1.18 $
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 __itkSphereSpatialFunction_h
00018 #define __itkSphereSpatialFunction_h
00019 
00020 #include "itkInteriorExteriorSpatialFunction.h"
00021 
00022 namespace itk
00023 {
00024 
00033 template <unsigned int VImageDimension=3,typename TInput=Point<double,VImageDimension> >
00034 class ITK_EXPORT SphereSpatialFunction
00035 : public InteriorExteriorSpatialFunction<VImageDimension,TInput>
00036 {
00037 public:
00039   typedef SphereSpatialFunction<VImageDimension,TInput>           Self;
00040   typedef InteriorExteriorSpatialFunction<VImageDimension,TInput> Superclass;
00041   typedef SmartPointer<Self>                                      Pointer;
00042   typedef SmartPointer<const Self>                                ConstPointer;
00043 
00045   itkNewMacro(Self);
00046 
00048   itkTypeMacro(SphereSpatialFunction,InteriorExteriorSpatialFunction);
00049 
00051   typedef typename Superclass::InputType InputType;
00052 
00054   typedef typename Superclass::OutputType OutputType;
00055 
00057   OutputType Evaluate(const InputType& position) const;
00058 
00060   itkGetConstMacro( Center, InputType);
00061   itkSetMacro( Center, InputType);
00063 
00065   itkGetConstMacro( Radius, double);
00066   itkSetMacro( Radius, double);
00068 
00069 protected:
00070   SphereSpatialFunction();
00071   virtual ~SphereSpatialFunction();
00072   void PrintSelf(std::ostream& os, Indent indent) const;
00073 
00074 private:
00075   SphereSpatialFunction(const Self&); //purposely not implemented
00076   void operator=(const Self&); //purposely not implemented
00077 
00079   InputType m_Center;
00080 
00082   double m_Radius;
00083 
00084 };
00085 
00086 } // end namespace itk
00087 
00088 // Define instantiation macro for this template.
00089 #define ITK_TEMPLATE_SphereSpatialFunction(_, EXPORT, x, y) namespace itk { \
00090   _(2(class EXPORT SphereSpatialFunction< ITK_TEMPLATE_2 x >)) \
00091   namespace Templates { typedef SphereSpatialFunction< ITK_TEMPLATE_2 x > \
00092                                            SphereSpatialFunction##y; } \
00093   }
00094 
00095 #if ITK_TEMPLATE_EXPLICIT
00096 # include "Templates/itkSphereSpatialFunction+-.h"
00097 #endif
00098 
00099 #if ITK_TEMPLATE_TXX
00100 # include "itkSphereSpatialFunction.txx"
00101 #endif
00102 
00103 #endif
00104 

Generated at Thu May 28 11:43:14 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000