RTK  1.4.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  * 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 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>
41  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
42 {
43 public:
49 
51  typedef typename TOutputImage::RegionType OutputImageRegionType;
57 
59  itkNewMacro(Self);
60 
63 
65  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
66  itkSetObjectMacro(ConvexShape, ConvexShape);
68 
70  itkGetConstObjectMacro(Geometry, GeometryType);
71  itkSetConstObjectMacro(Geometry, GeometryType);
73 
74 protected:
77 
80  void BeforeThreadedGenerateData() ITK_OVERRIDE;
81 
83 #if ITK_VERSION_MAJOR<5
84  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
85  ThreadIdType threadId ) ITK_OVERRIDE;
86 #else
87  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread ) ITK_OVERRIDE;
88 #endif
89 
90 
91 private:
92  RayConvexIntersectionImageFilter(const Self&); //purposely not implemented
93  void operator=(const Self&); //purposely not implemented
94 
95  ConvexShapePointer m_ConvexShape;
96  GeometryConstPointer m_Geometry;
97 };
98 
99 } // end namespace rtk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "rtkRayConvexIntersectionImageFilter.hxx"
103 #endif
104 
105 #endif
rtk::ThreeDCircularProjectionGeometry GeometryType
Projection geometry for a source and a 2-D flat panel.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
unsigned int ThreadIdType
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
Base class for a 3D convex shape.