RTK  2.6.0
Reconstruction Toolkit
rtkDrawQuadricImageFilter.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 rtkDrawQuadricImageFilter_h
20 #define rtkDrawQuadricImageFilter_h
21 
23 #include "rtkConfiguration.h"
24 
25 namespace rtk
26 {
27 
37 template <class TInputImage, class TOutputImage>
38 class ITK_TEMPLATE_EXPORT DrawQuadricImageFilter : public DrawConvexImageFilter<TInputImage, TOutputImage>
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_MOVE(DrawQuadricImageFilter);
42 
48 
52 
54  itkNewMacro(Self);
55 
57 #ifdef itkOverrideGetNameOfClassMacro
58  itkOverrideGetNameOfClassMacro(DrawQuadricImageFilter);
59 #else
61 #endif
62 
63 
65  itkGetMacro(Density, ScalarType);
66  itkSetMacro(Density, ScalarType);
68 
70  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
71  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
73 
75  void
76  AddClipPlane(const VectorType & dir, const ScalarType & pos);
77 
78  itkGetMacro(A, ScalarType);
80  itkGetMacro(B, ScalarType);
82  itkGetMacro(C, ScalarType);
84  itkGetMacro(D, ScalarType);
86  itkGetMacro(E, ScalarType);
88  itkGetMacro(F, ScalarType);
90  itkGetMacro(G, ScalarType);
92  itkGetMacro(H, ScalarType);
94  itkGetMacro(I, ScalarType);
96  itkGetMacro(J, ScalarType);
98 
99 protected:
101  ~DrawQuadricImageFilter() override = default;
102 
103  void
104  BeforeThreadedGenerateData() override;
105 
106 private:
107  ScalarType m_Density{ 1. };
108  std::vector<VectorType> m_PlaneDirections;
109  std::vector<ScalarType> m_PlanePositions;
110 
111  ScalarType m_A{ 0. };
112  ScalarType m_B{ 0. };
113  ScalarType m_C{ 0. };
114  ScalarType m_D{ 0. };
115  ScalarType m_E{ 0. };
116  ScalarType m_F{ 0. };
117  ScalarType m_G{ 0. };
118  ScalarType m_H{ 0. };
119  ScalarType m_I{ 0. };
120  ScalarType m_J{ 0. };
121 };
122 
123 } // end namespace rtk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "rtkDrawQuadricImageFilter.hxx"
127 #endif
128 
129 #endif
ConvexShape::ScalarType ScalarType
itk::Vector< ScalarType, Dimension > VectorType
std::vector< VectorType > m_PlaneDirections
Draws a QuadricShape in a 3D image.
#define itkSetMacro(name, type)
std::vector< ScalarType > m_PlanePositions
Draws a rtk::ConvexShape in a 3D image.