RTK  1.4.0
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:
47 
52 
54  itkNewMacro(Self);
55 
58 
60  itkGetMacro(Density, ScalarType);
61  itkSetMacro(Density, ScalarType);
63 
65  itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
66  itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
68 
70  void AddClipPlane(const VectorType & dir, const ScalarType & pos);
71 
73  itkGetMacro(Center, PointType);
74  itkSetMacro(Center, PointType);
76 
78  itkGetMacro(Axis, VectorType);
79  itkSetMacro(Axis, VectorType);
81 
83  itkGetMacro(Angle, ScalarType);
84  itkSetMacro(Angle, ScalarType);
86 
87 protected:
89  virtual ~DrawEllipsoidImageFilter() ITK_OVERRIDE {}
90 
91  void BeforeThreadedGenerateData() ITK_OVERRIDE;
92 
93 private:
94  DrawEllipsoidImageFilter(const Self&); //purposely not implemented
95  void operator=(const Self&); //purposely not implemented
96 
97  ScalarType m_Density;
98  std::vector<VectorType> m_PlaneDirections;
99  std::vector<ScalarType> m_PlanePositions;
100 
101  PointType m_Center;
102  VectorType m_Axis;
103  ScalarType m_Angle;
104 };
105 
106 } // end namespace rtk
107 
108 #ifndef ITK_MANUAL_INSTANTIATION
109 #include "rtkDrawEllipsoidImageFilter.hxx"
110 #endif
111 
112 #endif
std::vector< VectorType > m_PlaneDirections
DrawConvexImageFilter< TInputImage, TOutputImage > Superclass
void BeforeThreadedGenerateData() override
itk::SmartPointer< const Self > ConstPointer
Draws an ellipsoid in a 3D image.
void AddClipPlane(const VectorType &dir, const ScalarType &pos)
Draws a rtk::ConvexShape in a 3D image.
#define itkSetMacro(name, type)
void operator=(const Self &)
std::vector< ScalarType > m_PlanePositions