RTK  1.4.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 :
41  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
42 {
43 public:
49 
50  typedef typename TOutputImage::RegionType OutputImageRegionType;
53  typedef std::vector<std::string> FileNamesContainer;
54 
56  itkNewMacro(Self);
57 
60 
62  itkGetModifiableObjectMacro(Geometry, GeometryType);
63  itkSetObjectMacro(Geometry, GeometryType);
65 
66 protected:
68  virtual ~MaskCollimationImageFilter() ITK_OVERRIDE {};
69 
70  void BeforeThreadedGenerateData() ITK_OVERRIDE;
71 
73 #if ITK_VERSION_MAJOR<5
74  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
75  ThreadIdType threadId ) ITK_OVERRIDE;
76 #else
77  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread ) ITK_OVERRIDE;
78 #endif
79 
80 
83  void VerifyInputInformation() ITK_OVERRIDE {}
84 
85 private:
86  MaskCollimationImageFilter(const Self&); //purposely not implemented
87  void operator=(const Self&); //purposely not implemented
88 
90  GeometryPointer m_Geometry;
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.
unsigned int ThreadIdType
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
Mask out everything behind the jaws (typically in Ora file format, i.e., the medPhoton scanner) ...
itk::SmartPointer< const Self > ConstPointer
rtk::ThreeDCircularProjectionGeometry GeometryType