RTK  2.5.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 #ifdef itkOverrideGetNameOfClassMacro
64  itkOverrideGetNameOfClassMacro(RayConvexIntersectionImageFilter);
65 #else
67 #endif
68 
69 
71  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
72  itkSetObjectMacro(ConvexShape, ConvexShape);
74 
76  itkGetConstObjectMacro(Geometry, GeometryType);
77  itkSetConstObjectMacro(Geometry, GeometryType);
79 
93  itkGetMacro(Attenuation, double);
94  itkSetMacro(Attenuation, double);
96 
97 protected:
99  ~RayConvexIntersectionImageFilter() override = default;
100 
103  void
104  BeforeThreadedGenerateData() override;
105 
107  void
108  VerifyPreconditions() ITKv5_CONST override;
109 
111  void
112  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
113 
114 private:
115  ConvexShapePointer m_ConvexShape;
117  double m_Attenuation = 0.;
118 };
119 
120 } // end namespace rtk
121 
122 #ifndef ITK_MANUAL_INSTANTIATION
123 # include "rtkRayConvexIntersectionImageFilter.hxx"
124 #endif
125 
126 #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