RTK  2.6.0
Reconstruction Toolkit
rtkRayQuadricIntersectionImageFilter.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 rtkRayQuadricIntersectionImageFilter_h
20 #define rtkRayQuadricIntersectionImageFilter_h
21 
23 #include "rtkConfiguration.h"
24 
25 namespace rtk
26 {
27 
37 template <class TInputImage, class TOutputImage>
38 class ITK_TEMPLATE_EXPORT RayQuadricIntersectionImageFilter
39  : public RayConvexIntersectionImageFilter<TInputImage, TOutputImage>
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_MOVE(RayQuadricIntersectionImageFilter);
43 
49 
54 
56  itkNewMacro(Self);
57 
59 #ifdef itkOverrideGetNameOfClassMacro
60  itkOverrideGetNameOfClassMacro(RayQuadricIntersectionImageFilter);
61 #else
63 #endif
64 
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(A, ScalarType);
83  itkGetMacro(B, ScalarType);
85  itkGetMacro(C, ScalarType);
87  itkGetMacro(D, ScalarType);
89  itkGetMacro(E, ScalarType);
91  itkGetMacro(F, ScalarType);
93  itkGetMacro(G, ScalarType);
95  itkGetMacro(H, ScalarType);
97  itkGetMacro(I, ScalarType);
99  itkGetMacro(J, ScalarType);
102 
103 protected:
105  ~RayQuadricIntersectionImageFilter() override = default;
106 
107  void
108  BeforeThreadedGenerateData() override;
109 
110 private:
111  ScalarType m_Density{ 1. };
112  std::vector<VectorType> m_PlaneDirections;
113  std::vector<ScalarType> m_PlanePositions;
114 
115  ScalarType m_A{ 0. };
116  ScalarType m_B{ 0. };
117  ScalarType m_C{ 0. };
118  ScalarType m_D{ 0. };
119  ScalarType m_E{ 0. };
120  ScalarType m_F{ 0. };
121  ScalarType m_G{ 0. };
122  ScalarType m_H{ 0. };
123  ScalarType m_I{ 0. };
124  ScalarType m_J{ 0. };
125 };
126 
127 } // end namespace rtk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 # include "rtkRayQuadricIntersectionImageFilter.hxx"
131 #endif
132 
133 #endif
itk::Vector< ScalarType, Dimension > VectorType
#define itkSetMacro(name, type)
Analytical projection of a QuadricShape.
itk::Vector< ScalarType, Dimension > PointType