ITK  5.2.0
Insight Toolkit
itkFrustumSpatialFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
25 
33 {
34 public:
38  enum class RotationPlane : uint8_t
39  {
40  RotateInXZPlane = 1,
42  };
43 };
44 extern ITKCommon_EXPORT std::ostream &
45  operator<<(std::ostream & out, const FrustumSpatialFunctionEnums::RotationPlane value);
46 
47 
61 template <unsigned int VDimension = 3, typename TInput = Point<double, VDimension>>
62 class ITK_TEMPLATE_EXPORT FrustumSpatialFunction : public InteriorExteriorSpatialFunction<VDimension, TInput>
63 {
64 public:
65  ITK_DISALLOW_COPY_AND_MOVE(FrustumSpatialFunction);
66 
72 
74 
77 
79  itkNewMacro(Self);
80 
82  using InputType = typename Superclass::InputType;
83 
86 
89 #if !defined(ITK_LEGACY_REMOVE)
90  // We need to expose the enum values at the class level
91  // for backwards compatibility
92  static constexpr FrustumRotationPlaneType RotateInXZPlane = RotationPlaneEnum::RotateInXZPlane;
93  static constexpr FrustumRotationPlaneType RotateInYZPlane = RotationPlaneEnum::RotateInYZPlane;
94 #endif
95 
98  Evaluate(const InputType & position) const override;
99 
101  itkGetConstMacro(Apex, InputType);
102  itkSetMacro(Apex, InputType);
104 
106  itkGetConstMacro(AngleZ, double);
107  itkSetMacro(AngleZ, double);
109 
111  itkGetConstMacro(ApertureAngleX, double);
112  itkSetMacro(ApertureAngleX, double);
114 
116  itkGetConstMacro(ApertureAngleY, double);
117  itkSetMacro(ApertureAngleY, double);
119 
121  itkGetConstMacro(TopPlane, double);
122  itkSetMacro(TopPlane, double);
124 
126  itkGetConstMacro(BottomPlane, double);
127  itkSetMacro(BottomPlane, double);
129 
131  itkGetConstMacro(RotationPlane, FrustumRotationPlaneType);
134 
135 protected:
137  ~FrustumSpatialFunction() override = default;
138  void
139  PrintSelf(std::ostream & os, Indent indent) const override;
140 
141 private:
143  double m_AngleZ{ 0.0f };
144  double m_ApertureAngleX{ 0.0f };
145  double m_ApertureAngleY{ 0.0f };
146  double m_TopPlane{ 0.0f };
147  double m_BottomPlane{ 0.0f };
148  FrustumRotationPlaneType m_RotationPlane{ RotationPlaneEnum::RotateInXZPlane };
149 };
150 
151 } // end namespace itk
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 # include "itkFrustumSpatialFunction.hxx"
155 #endif
156 
157 #endif
itk::FrustumSpatialFunction::m_Apex
InputType m_Apex
Definition: itkFrustumSpatialFunction.h:142
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::InteriorExteriorSpatialFunction
Returns whether or not a location is "inside" or "outside" a function.
Definition: itkInteriorExteriorSpatialFunction.h:49
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:213
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::InteriorExteriorSpatialFunction::InputType
typename Superclass::InputType InputType
Definition: itkInteriorExteriorSpatialFunction.h:64
itk::FrustumSpatialFunctionEnums::RotationPlane::RotateInXZPlane
itk::FrustumSpatialFunctionEnums::RotationPlane
RotationPlane
Definition: itkFrustumSpatialFunction.h:38
itk::FrustumSpatialFunction::OutputType
typename Superclass::OutputType OutputType
Definition: itkFrustumSpatialFunction.h:85
itk::InteriorExteriorSpatialFunction::OutputType
typename Superclass::OutputType OutputType
Definition: itkInteriorExteriorSpatialFunction.h:67
RotationPlane
itk::FrustumSpatialFunctionEnums::RotationPlane::RotateInYZPlane
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::FrustumSpatialFunction::InputType
typename Superclass::InputType InputType
Definition: itkFrustumSpatialFunction.h:82
itk::FrustumSpatialFunction
Spatial function implementation of a truncated pyramid.
Definition: itkFrustumSpatialFunction.h:62
itkInteriorExteriorSpatialFunction.h
itk::FrustumSpatialFunctionEnums
enums for FrustumSpatialFunction class.
Definition: itkFrustumSpatialFunction.h:32