ITK  6.0.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  * https://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 
76  itkOverrideGetNameOfClassMacro(FrustumSpatialFunction);
77 
79  itkNewMacro(Self);
80 
82  using typename Superclass::InputType;
83 
85  using typename Superclass::OutputType;
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);
106  itkGetConstMacro(AngleZ, double);
107  itkSetMacro(AngleZ, double);
111  itkGetConstMacro(ApertureAngleX, double);
112  itkSetMacro(ApertureAngleX, double);
116  itkGetConstMacro(ApertureAngleY, double);
117  itkSetMacro(ApertureAngleY, double);
121  itkGetConstMacro(TopPlane, double);
122  itkSetMacro(TopPlane, double);
126  itkGetConstMacro(BottomPlane, double);
127  itkSetMacro(BottomPlane, double);
131  itkGetConstMacro(RotationPlane, FrustumRotationPlaneType);
132  itkSetMacro(RotationPlane, FrustumRotationPlaneType);
135 protected:
136  FrustumSpatialFunction() = default;
137  ~FrustumSpatialFunction() override = default;
138  void
139  PrintSelf(std::ostream & os, Indent indent) const override;
140 
141 private:
142  InputType m_Apex{};
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::InteriorExteriorSpatialFunction
Returns whether or not a location is "inside" or "outside" a function.
Definition: itkInteriorExteriorSpatialFunction.h:49
itk::FrustumSpatialFunctionEnums::RotationPlane::RotateInXZPlane
itk::FrustumSpatialFunctionEnums::RotationPlane
RotationPlane
Definition: itkFrustumSpatialFunction.h:38
itk::operator<<
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FunctionBase< TInput, bool >::OutputType
bool OutputType
Definition: itkFunctionBase.h:62
itk::FrustumSpatialFunctionEnums::RotationPlane::RotateInYZPlane
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::FrustumSpatialFunction
Spatial function implementation of a truncated pyramid.
Definition: itkFrustumSpatialFunction.h:62
itkInteriorExteriorSpatialFunction.h
itk::FunctionBase< TInput, bool >::InputType
TInput InputType
Definition: itkFunctionBase.h:59
itk::FrustumSpatialFunctionEnums
enums for FrustumSpatialFunction class.
Definition: itkFrustumSpatialFunction.h:32