RTK  2.6.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  * 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 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_MOVE(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 
61 #ifdef itkOverrideGetNameOfClassMacro
62  itkOverrideGetNameOfClassMacro(EdfRawToAttenuationImageFilter);
63 #else
65 #endif
66 
67 
70  void
72  {
73  if (m_FileNames != name)
74  {
75  m_FileNames = name;
76  this->Modified();
77  }
78  }
80 
81  const FileNamesContainer &
82  GetFileNames() const
83  {
84  return m_FileNames;
85  }
86 
87 protected:
89  ~EdfRawToAttenuationImageFilter() override = default;
90 
91  void
92  BeforeThreadedGenerateData() override;
93 
94  void
95  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
96 
97 private:
101 
104 
106  std::vector<typename InputImageType::IndexValueType> m_ReferenceIndices;
107 }; // end of class
108 
109 } // end namespace rtk
110 
111 #ifndef ITK_MANUAL_INSTANTIATION
112 # include "rtkEdfRawToAttenuationImageFilter.hxx"
113 #endif
114 
115 #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