RTK  2.0.1
Reconstruction Toolkit
rtkXRadRawToAttenuationImageFilter.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 rtkXRadRawToAttenuationImageFilter_h
20 #define rtkXRadRawToAttenuationImageFilter_h
21 
22 #include <itkImageToImageFilter.h>
23 #include "rtkConfiguration.h"
24 
32 namespace rtk
33 {
34 
35 template<class TInputImage, class TOutputImage=TInputImage>
37  public itk::ImageToImageFilter<TInputImage, TOutputImage>
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(XRadRawToAttenuationImageFilter);
41 
47 
49  using InputImageType = TInputImage;
50  using OutputImageType = TOutputImage;
51  using OutputImagePointer = typename OutputImageType::Pointer;
52  using OutputImageRegionType = typename TOutputImage::RegionType;
53 
55  itkNewMacro(Self);
56 
59 
60 protected:
62  ~XRadRawToAttenuationImageFilter() override = default;
63 
64  void BeforeThreadedGenerateData() override;
65 
66 #if ITK_VERSION_MAJOR<5
67  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override;
68 #else
69  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread) override;
70 #endif
71 
72 private:
75  std::string m_DarkImageFileName;
76  std::string m_FlatImageFileName;
77 }; // end of class
78 
79 } // end namespace rtk
80 
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "rtkXRadRawToAttenuationImageFilter.hxx"
83 #endif
84 
85 #endif
unsigned int ThreadIdType
typename OutputImageType::Pointer OutputImagePointer
typename TOutputImage::RegionType OutputImageRegionType