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  itkOverrideGetNameOfClassMacro(RayEllipsoidIntersectionImageFilter);
65 
67  itkGetMacro(Density, ScalarType);
68  itkSetMacro(Density, ScalarType);
70 
72  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
73  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
75 
77  void
78  AddClipPlane(const VectorType & dir, const ScalarType & pos);
79 
81  itkGetMacro(Center, PointType);
82  itkSetMacro(Center, PointType);
84 
86  itkGetMacro(Axis, VectorType);
87  itkSetMacro(Axis, VectorType);
89 
91  itkGetMacro(Angle, ScalarType);
92  itkSetMacro(Angle, ScalarType);
94 
95 protected:
97  ~RayEllipsoidIntersectionImageFilter() override = default;
98 
99  void
100  BeforeThreadedGenerateData() override;
101 
102 private:
103  ScalarType m_Density{ 1. };
104  std::vector<VectorType> m_PlaneDirections;
105  std::vector<ScalarType> m_PlanePositions;
106 
109  ScalarType m_Angle{ 0. };
110 };
111 
112 } // end namespace rtk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 # include "rtkRayEllipsoidIntersectionImageFilter.hxx"
116 #endif
117 
118 #endif
itk::Vector< ScalarType, Dimension > VectorType
#define itkSetMacro(name, type)
itk::Vector< ScalarType, Dimension > PointType