RTK  2.6.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  * 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 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_TEMPLATE_EXPORT MaskCollimationImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(MaskCollimationImageFilter);
44 
50 
51  using OutputImageRegionType = typename TOutputImage::RegionType;
54  using FileNamesContainer = std::vector<std::string>;
55 
57  itkNewMacro(Self);
58 
60 #ifdef itkOverrideGetNameOfClassMacro
61  itkOverrideGetNameOfClassMacro(MaskCollimationImageFilter);
62 #else
64 #endif
65 
66 
68  itkGetModifiableObjectMacro(Geometry, GeometryType);
69  itkSetObjectMacro(Geometry, GeometryType);
71 
74  itkSetMacro(RotationAxisIndex, unsigned int);
75 
76 protected:
78  ~MaskCollimationImageFilter() override = default;
79 
81  void
82  VerifyPreconditions() const override;
83 
84  void
85  BeforeThreadedGenerateData() override;
86 
88  void
89  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
90 
93  void
94  VerifyInputInformation() const override
95  {}
96 
97  // Set default parameters
98  unsigned int m_RotationAxisIndex = 1; // y-axis
99 
100 private:
103 };
104 
105 } // end namespace rtk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 # include "rtkMaskCollimationImageFilter.hxx"
109 #endif
110 
111 #endif
std::vector< std::string > FileNamesContainer
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)
typename OutputImageType::RegionType OutputImageRegionType
typename GeometryType::Pointer GeometryPointer
Mask out everything behind the jaws (typically in Ora file format, i.e., the medPhoton scanner) ...