KWStyle - itkTorusInteriorExteriorSpatialFunction.h
 
Matrix View
Description

1
2 HRD /*=========================================================================
3
4 HRD   Program:   Insight Segmentation & Registration Toolkit
5 HRD   Module:    $RCSfile: itkTorusInteriorExteriorSpatialFunction.h.html,v $
6 HRD   Language:  C++
7 HRD   Date:      $Date: 2006/01/17 19:15:48 $
8   Version:   $Revision: 1.4 $
9
10 HRD   Copyright (c) Insight Software Consortium. All rights reserved.
11   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12
13 HRD      This software is distributed WITHOUT ANY WARRANTY; without even 
14 HRD      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notices for more information.
16 HRD
17 =========================================================================*/
18 #ifndef __itkTorusInteriorExteriorSpatialFunction_h
19 #define __itkTorusInteriorExteriorSpatialFunction_h
20
21 #include "vnl/vnl_vector.h"
22 #include "itkInteriorExteriorSpatialFunction.h"
23 #include "itkCovariantVector.h"
24
25 namespace itk
26 {
27
28 /**
29  * \class TorusInteriorExteriorSpatialFunction
30 LEN  * \brief Spatial function implementation of torus symmetric about the z-axis in 3D
31  *
32 LEN  * Handle with care! May behave in strange ways when used with dimensions other than 3
33  *
34  * \ingroup SpatialFunctions
35  *
36  * */
37
38 template <unsigned int VDimension=3, typename TInput=Point<double,3> >
39 class ITK_EXPORT TorusInteriorExteriorSpatialFunction:
40 IND ****public InteriorExteriorSpatialFunction<VDimension, TInput>
41 {
42 public:
43
44   /** Standard class typedefs. */
45   typedef TorusInteriorExteriorSpatialFunction Self;
46 TDA   typedef InteriorExteriorSpatialFunction<VDimension> Superclass;
47 TDA   typedef SmartPointer<Self>  Pointer;
48 TDA   typedef SmartPointer<const Self>  ConstPointer;
49     
50   /** Run time information. */
51 LEN   itkTypeMacro(TorusInteriorExteriorSpatialFunction,InteriorExteriorSpatialFunction);
52
53   /** Method for creation through the object factory. */
54   itkNewMacro(Self);
55
56   /** Input type for the function. */
57   typedef typename Superclass::InputType InputType;
58
59   /** Output type for the function. */
60   typedef typename Superclass::OutputType OutputType;
61   
62   /** Evaluates the function at a given position */
63   OutputType Evaluate(const InputType& position) const;
64
65   /** Set/Get the origin of the torus (the point from which the major
66    * radius is measured). */
67   itkGetMacro( Origin, InputType);
68   itkSetMacro( Origin, InputType);
69   
70   /** Set/Get the major radius of the torus. */
71   itkGetMacro( MajorRadius, double);
72   itkSetMacro( MajorRadius, double);
73   
74   /** Set/Get the major radius of the torus. */
75   itkGetMacro( MinorRadius, double);
76   itkSetMacro( MinorRadius, double);
77        
78 protected:
79   TorusInteriorExteriorSpatialFunction();
80   virtual ~TorusInteriorExteriorSpatialFunction();
81   void PrintSelf(std::ostream& os, Indent indent) const;
82
83 private:
84   TorusInteriorExteriorSpatialFunction(const Self&); //purposely not implemented
85   void operator=(const Self&); //purposely not implemented
86
87   /** The origin of the torus (the point from which the major
88    * radius is measured) */
89   InputType m_Origin;
90
91   /** The distance from the origin of the torus to the center of the "tube" */
92   double m_MajorRadius;
93
94   /** The diameter of the "tube" */
95   double m_MinorRadius;
96
97 };
98
99 // end namespace itk
100
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "itkTorusInteriorExteriorSpatialFunction.txx"
103 #endif
104
105 #endif
106

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:50PM
© Kitware Inc.