RTK  2.0.1
Reconstruction Toolkit
rtkRayEllipsoidIntersectionImageFilter.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 rtkRayEllipsoidIntersectionImageFilter_h
20 #define rtkRayEllipsoidIntersectionImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
25 
28 
29 namespace rtk
30 {
31 
42 template <class TInputImage, class TOutputImage>
44  public RayConvexIntersectionImageFilter<TInputImage,TOutputImage>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(RayEllipsoidIntersectionImageFilter);
48 
54 
59 
61  itkNewMacro(Self);
62 
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 AddClipPlane(const VectorType & dir, const ScalarType & pos);
78 
80  itkGetMacro(Center, PointType);
81  itkSetMacro(Center, PointType);
83 
85  itkGetMacro(Axis, VectorType);
86  itkSetMacro(Axis, VectorType);
88 
90  itkGetMacro(Angle, ScalarType);
91  itkSetMacro(Angle, ScalarType);
93 
94 protected:
96  ~RayEllipsoidIntersectionImageFilter() override = default;
97 
98  void BeforeThreadedGenerateData() override;
99 
100 private:
101  ScalarType m_Density{1.};
102  std::vector<VectorType> m_PlaneDirections;
103  std::vector<ScalarType> m_PlanePositions;
104 
107  ScalarType m_Angle{0.};
108 };
109 
110 } // end namespace rtk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "rtkRayEllipsoidIntersectionImageFilter.hxx"
114 #endif
115 
116 #endif
itk::Vector< ScalarType, Dimension > VectorType
itk::Vector< ScalarType, Dimension > PointType
#define itkSetMacro(name, type)