RTK  2.0.1
Reconstruction Toolkit
rtkMaskCollimationImageFilter.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 rtkMaskCollimationImageFilter_h
20 #define rtkMaskCollimationImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 #include "rtkConfiguration.h"
25 
26 namespace rtk
27 {
28 
39 template <class TInputImage, class TOutputImage>
40 class ITK_EXPORT MaskCollimationImageFilter :
41  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_ASSIGN(MaskCollimationImageFilter);
45 
51 
52  using OutputImageRegionType = typename TOutputImage::RegionType;
55  using FileNamesContainer = std::vector<std::string>;
56 
58  itkNewMacro(Self);
59 
62 
64  itkGetModifiableObjectMacro(Geometry, GeometryType);
65  itkSetObjectMacro(Geometry, GeometryType);
67 
68 protected:
70  ~MaskCollimationImageFilter() override = default;
71 
72  void BeforeThreadedGenerateData() override;
73 
75 #if ITK_VERSION_MAJOR<5
76  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
77  ThreadIdType threadId ) override;
78 #else
79  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread ) override;
80 #endif
81 
82 
85 #if ITK_VERSION_MAJOR<5
86  void VerifyInputInformation() override {}
87 #else
88  void VerifyInputInformation() const override {}
89 #endif
90 
91 
92 private:
95 
97  double m_X1;
98  double m_X2;
99  double m_Y1;
100  double m_Y2;
101 };
102 
103 } // end namespace rtk
104 
105 #ifndef ITK_MANUAL_INSTANTIATION
106 #include "rtkMaskCollimationImageFilter.hxx"
107 #endif
108 
109 #endif
std::vector< std::string > FileNamesContainer
typename TOutputImage::RegionType OutputImageRegionType
Projection geometry for a source and a 2-D flat panel.
typename GeometryType::Pointer GeometryPointer
unsigned int ThreadIdType
Mask out everything behind the jaws (typically in Ora file format, i.e., the medPhoton scanner) ...