KWStyle - itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4 LEN   Module:    $RCSfile: itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:48 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkSymmetricEllipsoidInteriorExteriorSpatialFunction_h
18 #define __itkSymmetricEllipsoidInteriorExteriorSpatialFunction_h
19
20 #include "itkInteriorExteriorSpatialFunction.h"
21
22 namespace itk
23 {
24
25 /** \class EllipsoidSpatialFunction
26  * \brief Function implementation of an ellipsoid
27  *
28  * Similar to itkEllipsoidInteriorExteriorSpatialFunction in that it 
29  * implements a function that returns 1 for points inside or on the surface
30  * of a ellipsoid and 0 for points outside the ellipsoid. However, this
31  * ellipsoid is defined by a single orientation vector and deals
32  * only with symmetric ellipsoids. An n-dimensional symmetric ellipsoid 
33  * is one which has m axes of equal length and (n - m) unique axes lengths.
34  * Specifically, this class deals with the case where (n - m) = 1 and
35  * the ellipsoid's major axis is oriented along a singles orientation vector.
36  */
37 template <unsigned int VDimension = 3,
38           typename TInput = Point<double, VDimension> >
39 class ITK_EXPORT SymmetricEllipsoidInteriorExteriorSpatialFunction:
40 IND ****public InteriorExteriorSpatialFunction<VDimension, TInput>
41 {
42 public:
43   /** Standard class typedefs. */
44   typedef SymmetricEllipsoidInteriorExteriorSpatialFunction Self;
45 TDA   typedef InteriorExteriorSpatialFunction<VDimension> Superclass;
46 TDA   typedef SmartPointer<Self>  Pointer;
47 TDA   typedef SmartPointer<const Self>  ConstPointer;
48 TDA   typedef Vector<double,VDimension> VectorType;
49       
50   /** Method for creation through the object factory. */
51   itkNewMacro(Self);
52
53   /** Run-time information. */
54 LEN   itkTypeMacro(SymmetricEllipsoidInteriorExteriorSpatialFunction,InteriorExteriorSpatialFunction);
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   /** Get and set the center of the ellipsoid. */
66   itkGetMacro(Center, InputType);
67   itkSetMacro(Center, InputType);
68   
69 LEN   /** Set the orientation vector of the ellipsoid's unique axis and axes lengths.
70    * Must be normalized!!!!! */
71 LEN   void SetOrientation(VectorType orientation, double uniqueAxis, double symmetricAxes);
72      
73 protected:
74   SymmetricEllipsoidInteriorExteriorSpatialFunction();
75   virtual ~SymmetricEllipsoidInteriorExteriorSpatialFunction();
76
77   void PrintSelf(std::ostream& os, Indent indent) const;
78
79 private:
80 LEN   SymmetricEllipsoidInteriorExteriorSpatialFunction(const Self&); //purposely not implemented
81   void operator=(const Self&); //purposely not implemented
82
83   /** The center of the ellipsoid. */
84   InputType m_Center;
85
86   /** The unique axis length of the ellipsoid. */
87   double m_UniqueAxis;
88   
89   /** The symmetric axes lengths of the ellipsoid. */
90   double m_SymmetricAxes;
91
92   /** The orientation vector of the ellipsoid's unique axis. */  
93   Vector<double, VDimension> m_Orientation;
94
95   /** The vector ratio. */  
96   double m_VectorRatio;
97
98 };
99
100 // end namespace itk
101
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkSymmetricEllipsoidInteriorExteriorSpatialFunction.txx"
104 #endif
105
106 #endif
107

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