RTK  2.0.1
Reconstruction Toolkit
rtkDrawEllipsoidImageFilter.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 rtkDrawEllipsoidImageFilter_h
20 #define rtkDrawEllipsoidImageFilter_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(DrawEllipsoidImageFilter);
43 
49 
54 
56  itkNewMacro(Self);
57 
60 
62  itkGetMacro(Density, ScalarType);
63  itkSetMacro(Density, ScalarType);
65 
67  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
68  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
70 
72  void AddClipPlane(const VectorType & dir, const ScalarType & pos);
73 
75  itkGetMacro(Center, PointType);
76  itkSetMacro(Center, PointType);
78 
80  itkGetMacro(Axis, VectorType);
81  itkSetMacro(Axis, VectorType);
83 
85  itkGetMacro(Angle, ScalarType);
86  itkSetMacro(Angle, ScalarType);
88 
89 protected:
91  ~DrawEllipsoidImageFilter() override = default;
92 
93  void BeforeThreadedGenerateData() override;
94 
95 private:
97  std::vector<VectorType> m_PlaneDirections;
98  std::vector<ScalarType> m_PlanePositions;
99 
103 };
104 
105 } // end namespace rtk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "rtkDrawEllipsoidImageFilter.hxx"
109 #endif
110 
111 #endif
std::vector< VectorType > m_PlaneDirections
itk::Vector< ScalarType, Dimension > VectorType
void BeforeThreadedGenerateData() override
itk::Vector< ScalarType, Dimension > PointType
Draws an ellipsoid in a 3D image.
~DrawEllipsoidImageFilter() override=default
void AddClipPlane(const VectorType &dir, const ScalarType &pos)
Draws a rtk::ConvexShape in a 3D image.
#define itkSetMacro(name, type)
std::vector< ScalarType > m_PlanePositions