ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkFrustumSpatialFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkFrustumSpatialFunction_h
19 #define __itkFrustumSpatialFunction_h
20 
22 
23 namespace itk
24 {
38 template< unsigned int VImageDimension = 3, typename TInput = Point< double, 3 > >
39 class ITK_EXPORT FrustumSpatialFunction:
40  public InteriorExteriorSpatialFunction< VImageDimension, TInput >
41 {
42 public:
43 
49 
52 
54  itkNewMacro(Self);
55 
57  typedef typename Superclass::InputType InputType;
58 
61 
63  typedef enum {
64  RotateInXZPlane = 1,
65  RotateInYZPlane
66  } FrustumRotationPlaneType;
67 
69  OutputType Evaluate(const InputType & position) const;
70 
72  itkGetConstMacro(Apex, InputType);
73  itkSetMacro(Apex, InputType);
75 
78  itkGetConstMacro(AngleZ, double);
79  itkSetMacro(AngleZ, double);
81 
83  itkGetConstMacro(ApertureAngleX, double);
84  itkSetMacro(ApertureAngleX, double);
86 
88  itkGetConstMacro(ApertureAngleY, double);
89  itkSetMacro(ApertureAngleY, double);
91 
93  itkGetConstMacro(TopPlane, double);
94  itkSetMacro(TopPlane, double);
96 
98  itkGetConstMacro(BottomPlane, double);
99  itkSetMacro(BottomPlane, double);
101 
103  itkSetMacro(RotationPlane, FrustumRotationPlaneType);
104 protected:
106  virtual ~FrustumSpatialFunction();
107  void PrintSelf(std::ostream & os, Indent indent) const;
109 
110 private:
111  FrustumSpatialFunction(const Self &); //purposely not implemented
112  void operator=(const Self &); //purposely not implemented
113 
116 
118  double m_AngleZ;
119 
122 
125 
127  double m_TopPlane;
128 
131 
134 };
135 } // end namespace itk
136 
137 // Define instantiation macro for this template.
138 #define ITK_TEMPLATE_FrustumSpatialFunction(_, EXPORT, TypeX, TypeY) \
139  namespace itk \
140  { \
141  _( 2 ( class EXPORT FrustumSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \
142  namespace Templates \
143  { \
144  typedef FrustumSpatialFunction< ITK_TEMPLATE_2 TypeX > \
145  FrustumSpatialFunction##TypeY; \
146  } \
147  }
148 
149 #if ITK_TEMPLATE_EXPLICIT
150 #include "Templates/itkFrustumSpatialFunction+-.h"
151 #endif
152 
153 #if ITK_TEMPLATE_TXX
154 #include "itkFrustumSpatialFunction.hxx"
155 #endif
156 
157 #endif
158