RTK  1.4.0
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:
52 
57 
59  itkNewMacro(Self);
60 
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 AddClipPlane(const VectorType & dir, const ScalarType & pos);
76 
78  itkGetMacro(Center, PointType);
79  itkSetMacro(Center, PointType);
81 
83  itkGetMacro(Axis, VectorType);
84  itkSetMacro(Axis, VectorType);
86 
88  itkGetMacro(Angle, ScalarType);
89  itkSetMacro(Angle, ScalarType);
91 
92 protected:
94  virtual ~RayEllipsoidIntersectionImageFilter() ITK_OVERRIDE {}
95 
96  void BeforeThreadedGenerateData() ITK_OVERRIDE;
97 
98 private:
99  RayEllipsoidIntersectionImageFilter(const Self&); //purposely not implemented
100  void operator=(const Self&); //purposely not implemented
101 
102  ScalarType m_Density;
103  std::vector<VectorType> m_PlaneDirections;
104  std::vector<ScalarType> m_PlanePositions;
105 
106  PointType m_Center;
107  VectorType m_Axis;
108  ScalarType m_Angle;
109 };
110 
111 } // end namespace rtk
112 
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "rtkRayEllipsoidIntersectionImageFilter.hxx"
115 #endif
116 
117 #endif
RayConvexIntersectionImageFilter< TInputImage, TOutputImage > Superclass
#define itkSetMacro(name, type)