RTK  2.6.0
Reconstruction Toolkit
rtkRayConvexIntersectionImageFilter.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  * https://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 rtkRayConvexIntersectionImageFilter_h
20 #define rtkRayConvexIntersectionImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 #include "rtkConfiguration.h"
25 #include "rtkConvexShape.h"
26 
27 namespace rtk
28 {
29 
39 template <class TInputImage, class TOutputImage>
40 class ITK_TEMPLATE_EXPORT RayConvexIntersectionImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(RayConvexIntersectionImageFilter);
44 
50 
52  using OutputImageRegionType = typename TOutputImage::RegionType;
58 
60  itkNewMacro(Self);
61 
63  itkOverrideGetNameOfClassMacro(RayConvexIntersectionImageFilter);
64 
66  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
67  itkSetObjectMacro(ConvexShape, ConvexShape);
69 
71  itkGetConstObjectMacro(Geometry, GeometryType);
72  itkSetConstObjectMacro(Geometry, GeometryType);
74 
88  itkGetMacro(Attenuation, double);
89  itkSetMacro(Attenuation, double);
91 
92 protected:
94  ~RayConvexIntersectionImageFilter() override = default;
95 
98  void
99  BeforeThreadedGenerateData() override;
100 
102  void
103  VerifyPreconditions() const override;
104 
106  void
107  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
108 
109 private:
112  double m_Attenuation = 0.;
113 };
114 
115 } // end namespace rtk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 # include "rtkRayConvexIntersectionImageFilter.hxx"
119 #endif
120 
121 #endif
typename GeometryType::ConstPointer GeometryConstPointer
itk::SmartPointer< Self > Pointer
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)
typename OutputImageType::RegionType OutputImageRegionType
Base class for a 3D convex shape.
itk::Vector< ScalarType, Dimension > PointType