ITK  4.13.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 VDimension = 3,
39  typename TInput = Point< double, VDimension > >
40 class ITK_TEMPLATE_EXPORT FrustumSpatialFunction:
41  public InteriorExteriorSpatialFunction< VDimension, TInput >
42 {
43 public:
44 
50 
53 
55  itkNewMacro(Self);
56 
58  typedef typename Superclass::InputType InputType;
59 
62 
64  typedef enum {
65  RotateInXZPlane = 1,
66  RotateInYZPlane
67  } FrustumRotationPlaneType;
68 
70  OutputType Evaluate(const InputType & position) const ITK_OVERRIDE;
71 
73  itkGetConstMacro(Apex, InputType);
74  itkSetMacro(Apex, InputType);
76 
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  itkGetConstMacro(RotationPlane, FrustumRotationPlaneType);
104  itkSetMacro(RotationPlane, FrustumRotationPlaneType);
106 
107 protected:
109  virtual ~FrustumSpatialFunction() ITK_OVERRIDE;
110  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(FrustumSpatialFunction);
114 
115  InputType m_Apex;
116  double m_AngleZ;
117  double m_ApertureAngleX;
118  double m_ApertureAngleY;
119  double m_TopPlane;
120  double m_BottomPlane;
121  FrustumRotationPlaneType m_RotationPlane;
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkFrustumSpatialFunction.hxx"
127 #endif
128 
129 #endif
Spatial function implementation of a truncated pyramid.
FrustumSpatialFunction< VDimension, TInput > Self
SmartPointer< const Self > ConstPointer
InteriorExteriorSpatialFunction< VDimension, TInput > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Returns whether or not a location is &quot;inside&quot; or &quot;outside&quot; a function.