RTK  2.1.0
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 : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_ASSIGN(MaskCollimationImageFilter);
44 
50 
51  using OutputImageRegionType = typename TOutputImage::RegionType;
54  using FileNamesContainer = std::vector<std::string>;
55 
57  itkNewMacro(Self);
58 
61 
63  itkGetModifiableObjectMacro(Geometry, GeometryType);
64  itkSetObjectMacro(Geometry, GeometryType);
66 
67 protected:
69  ~MaskCollimationImageFilter() override = default;
70 
72  void
73  VerifyPreconditions() ITKv5_CONST override;
74 
75  void
76  BeforeThreadedGenerateData() override;
77 
79  void
80  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
81 
84  void
85  VerifyInputInformation() const override
86  {}
87 
88 private:
91 
93  double m_X1;
94  double m_X2;
95  double m_Y1;
96  double m_Y2;
97 };
98 
99 } // end namespace rtk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 # include "rtkMaskCollimationImageFilter.hxx"
103 #endif
104 
105 #endif
std::vector< std::string > FileNamesContainer
Projection geometry for a source and a 2-D flat panel.
typename OutputImageType::RegionType OutputImageRegionType
typename GeometryType::Pointer GeometryPointer
Mask out everything behind the jaws (typically in Ora file format, i.e., the medPhoton scanner) ...