RTK  2.0.1
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  * http://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>
39 public DrawConvexImageFilter< TInputImage, TOutputImage >
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_ASSIGN(DrawQuadricImageFilter);
43 
49 
53 
55  itkNewMacro(Self);
56 
59 
61  itkGetMacro(Density, ScalarType);
62  itkSetMacro(Density, ScalarType);
64 
66  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
67  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
69 
71  void AddClipPlane(const VectorType & dir, const ScalarType & pos);
72 
73  itkGetMacro(A, ScalarType);
75  itkGetMacro(B, ScalarType);
77  itkGetMacro(C, ScalarType);
79  itkGetMacro(D, ScalarType);
81  itkGetMacro(E, ScalarType);
83  itkGetMacro(F, ScalarType);
85  itkGetMacro(G, ScalarType);
87  itkGetMacro(H, ScalarType);
89  itkGetMacro(I, ScalarType);
91  itkGetMacro(J, ScalarType);
93 
94 protected:
96  ~DrawQuadricImageFilter() override = default;
97 
98  void BeforeThreadedGenerateData ( ) override;
99 
100 private:
102  std::vector<VectorType> m_PlaneDirections;
103  std::vector<ScalarType> m_PlanePositions;
104 
115 };
116 
117 } // end namespace rtk
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 #include "rtkDrawQuadricImageFilter.hxx"
121 #endif
122 
123 #endif
ConvexShape::ScalarType ScalarType
std::vector< VectorType > m_PlaneDirections
itk::Vector< ScalarType, Dimension > VectorType
void AddClipPlane(const VectorType &dir, const ScalarType &pos)
Draws a QuadricShape in a 3D image.
void BeforeThreadedGenerateData() override
std::vector< ScalarType > m_PlanePositions
~DrawQuadricImageFilter() override=default
Draws a rtk::ConvexShape in a 3D image.
#define itkSetMacro(name, type)