RTK  2.6.0
Reconstruction Toolkit
rtkRayEllipsoidIntersectionImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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  * 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 
19 #ifndef rtkRayEllipsoidIntersectionImageFilter_h
20 #define rtkRayEllipsoidIntersectionImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
25 
28 
29 namespace rtk
30 {
31 
42 template <class TInputImage, class TOutputImage>
43 class ITK_TEMPLATE_EXPORT RayEllipsoidIntersectionImageFilter
44  : public RayConvexIntersectionImageFilter<TInputImage, TOutputImage>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_MOVE(RayEllipsoidIntersectionImageFilter);
48 
54 
59 
61  itkNewMacro(Self);
62 
64 #ifdef itkOverrideGetNameOfClassMacro
65  itkOverrideGetNameOfClassMacro(RayEllipsoidIntersectionImageFilter);
66 #else
68 #endif
69 
70 
72  itkGetMacro(Density, ScalarType);
73  itkSetMacro(Density, ScalarType);
75 
77  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
78  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
80 
82  void
83  AddClipPlane(const VectorType & dir, const ScalarType & pos);
84 
86  itkGetMacro(Center, PointType);
87  itkSetMacro(Center, PointType);
89 
91  itkGetMacro(Axis, VectorType);
92  itkSetMacro(Axis, VectorType);
94 
96  itkGetMacro(Angle, ScalarType);
97  itkSetMacro(Angle, ScalarType);
99 
100 protected:
102  ~RayEllipsoidIntersectionImageFilter() override = default;
103 
104  void
105  BeforeThreadedGenerateData() override;
106 
107 private:
108  ScalarType m_Density{ 1. };
109  std::vector<VectorType> m_PlaneDirections;
110  std::vector<ScalarType> m_PlanePositions;
111 
114  ScalarType m_Angle{ 0. };
115 };
116 
117 } // end namespace rtk
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 # include "rtkRayEllipsoidIntersectionImageFilter.hxx"
121 #endif
122 
123 #endif
itk::Vector< ScalarType, Dimension > VectorType
#define itkSetMacro(name, type)
itk::Vector< ScalarType, Dimension > PointType