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 
00004   Program:   Insight Segmentation & Registration Toolkit
00005   Module:    $RCSfile: itkSphereSpatialFunction.h,v $
00006   Language:  C++
00007   Date:      $Date: 2007-01-30 23:39:53 $
00008   Version:   $Revision: 1.16 $
00009 
00010   Copyright (c) Insight Software Consortium. All rights reserved.
00011   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00012 
00013      This software is distributed WITHOUT ANY WARRANTY; without even 
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00015      PURPOSE.  See the above copyright notices for more information.
00016 
00017 =========================================================================*/
00018 #ifndef __itkSphereSpatialFunction_h
00019 #define __itkSphereSpatialFunction_h
00020 
00021 #include "itkInteriorExteriorSpatialFunction.h"
00022 
00023 namespace itk
00024 {
00025 
00034 template <unsigned int VImageDimension=3,typename TInput=Point<double,VImageDimension> >
00035 class ITK_EXPORT SphereSpatialFunction
00036 : public InteriorExteriorSpatialFunction<VImageDimension,TInput>
00037 {
00038 public:
00040   typedef SphereSpatialFunction<VImageDimension,TInput> Self;
00041   typedef InteriorExteriorSpatialFunction<VImageDimension,TInput> Superclass;
00042   typedef SmartPointer<Self>  Pointer;
00043   typedef SmartPointer<const Self>  ConstPointer;
00044 
00046   itkNewMacro(Self);
00047 
00049   itkTypeMacro(SphereSpatialFunction,InteriorExteriorSpatialFunction);
00050 
00052   typedef typename Superclass::InputType InputType;
00053 
00055   typedef typename Superclass::OutputType OutputType;
00056 
00058   OutputType Evaluate(const InputType& position) const;
00059 
00061   itkGetMacro( Center, InputType);
00062   itkSetMacro( Center, InputType);
00064 
00066   itkGetMacro( Radius, double);
00067   itkSetMacro( Radius, double);
00069 
00070 protected:
00071   SphereSpatialFunction();
00072   virtual ~SphereSpatialFunction();
00073   void PrintSelf(std::ostream& os, Indent indent) const;
00074 
00075 private:
00076   SphereSpatialFunction(const Self&); //purposely not implemented
00077   void operator=(const Self&); //purposely not implemented
00078 
00080   InputType m_Center;
00081 
00083   double m_Radius;
00084 
00085 };
00086 
00087 } // end namespace itk
00088 
00089 // Define instantiation macro for this template.
00090 #define ITK_TEMPLATE_SphereSpatialFunction(_, EXPORT, x, y) namespace itk { \
00091   _(2(class EXPORT SphereSpatialFunction< ITK_TEMPLATE_2 x >)) \
00092   namespace Templates { typedef SphereSpatialFunction< ITK_TEMPLATE_2 x > \
00093                                            SphereSpatialFunction##y; } \
00094   }
00095 
00096 #if ITK_TEMPLATE_EXPLICIT
00097 # include "Templates/itkSphereSpatialFunction+-.h"
00098 #endif
00099 
00100 #if ITK_TEMPLATE_TXX
00101 # include "itkSphereSpatialFunction.txx"
00102 #endif
00103 
00104 #endif
00105 

Generated at Mon Apr 14 14:31:22 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000