RTK  2.1.0
Reconstruction Toolkit
rtkEdfRawToAttenuationImageFilter.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 rtkEdfRawToAttenuationImageFilter_h
20 #define rtkEdfRawToAttenuationImageFilter_h
21 
22 #include <itkImageToImageFilter.h>
23 #include <itkImageSeriesReader.h>
24 
25 #include "rtkConfiguration.h"
26 
27 namespace rtk
28 {
29 
38 template <class TInputImage, class TOutputImage = TInputImage>
39 class ITKIOImageBase_HIDDEN EdfRawToAttenuationImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_ASSIGN(EdfRawToAttenuationImageFilter);
43 
49 
51  using InputImageType = TInputImage;
52  using OutputImageType = TOutputImage;
53  using OutputImageRegionType = typename TOutputImage::RegionType;
54 
55  using FileNamesContainer = std::vector<std::string>;
56 
58  itkNewMacro(Self);
59 
62 
65  void
67  {
68  if (m_FileNames != name)
69  {
70  m_FileNames = name;
71  this->Modified();
72  }
73  }
75 
76  const FileNamesContainer &
77  GetFileNames() const
78  {
79  return m_FileNames;
80  }
81 
82 protected:
84  ~EdfRawToAttenuationImageFilter() override = default;
85 
86  void
87  BeforeThreadedGenerateData() override;
88 
89  void
90  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
91 
92 private:
96 
99 
101  std::vector<typename InputImageType::IndexValueType> m_ReferenceIndices;
102 }; // end of class
103 
104 } // end namespace rtk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 # include "rtkEdfRawToAttenuationImageFilter.hxx"
108 #endif
109 
110 #endif
const FileNamesContainer & GetFileNames() const
void SetFileNames(const FileNamesContainer &name)
std::vector< typename InputImageType::IndexValueType > m_ReferenceIndices
TInputImage InputImageType
Convert raw ESRF data to attenuation images.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType