RTK  1.4.0
Reconstruction Toolkit
rtkLUTbasedVariableI0RawToAttenuationImageFilter.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 rtkLUTbasedVariableI0RawToAttenuationImageFilter_h
20 #define rtkLUTbasedVariableI0RawToAttenuationImageFilter_h
21 
22 #include <itkNumericTraits.h>
23 #include <itkSubtractImageFilter.h>
24 #include <itkLogImageFilter.h>
26 
28 
29 namespace rtk
30 {
77 template <class TInputImage, class TOutputImage>
79  public LookupTableImageFilter<TInputImage, TOutputImage>
80 {
81 public:
87 
88  typedef typename TInputImage::PixelType InputImagePixelType;
89  typedef typename TOutputImage::PixelType OutputImagePixelType;
90  typedef typename Superclass::FunctorType::LookupTableType LookupTableType;
94 
96  itkNewMacro(Self);
97 
100 
103  itkGetMacro(I0, double);
104  itkSetMacro(I0, double);
106 
109  itkGetMacro(IDark, double);
110  itkSetMacro(IDark, double);
112 
113  void BeforeThreadedGenerateData() ITK_OVERRIDE;
114 
115 protected:
117  virtual ~LUTbasedVariableI0RawToAttenuationImageFilter() ITK_OVERRIDE {}
118 
119 private:
120  LUTbasedVariableI0RawToAttenuationImageFilter(const Self &); //purposely not implemented
121  void operator=(const Self &); //purposely not implemented
122 
123  double m_I0;
124  double m_IDark;
129 };
130 } // end namespace rtk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx"
134 #endif
135 
136 #endif
Function to do the lookup operation.
itk::LogImageFilter< LookupTableType, LookupTableType > LogLUTFilterType
#define itkSetMacro(name, type)