RTK  2.0.1
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:
82  ITK_DISALLOW_COPY_AND_ASSIGN(LUTbasedVariableI0RawToAttenuationImageFilter);
83 
89 
90  using InputImagePixelType = typename TInputImage::PixelType;
91  using OutputImagePixelType = typename TOutputImage::PixelType;
92  using LookupTableType = typename Superclass::FunctorType::LookupTableType;
96 
98  itkNewMacro(Self);
99 
102 
105  itkGetMacro(I0, double);
106  itkSetMacro(I0, double);
108 
111  itkGetMacro(IDark, double);
112  itkSetMacro(IDark, double);
114 
115  void BeforeThreadedGenerateData() override;
116 
117 protected:
120 
121 private:
122  double m_I0;
123  double m_IDark;
124  typename SubtractLUTFilterType::Pointer m_SubtractRampFilter;
125  typename ThresholdLUTFilterType::Pointer m_ThresholdRampFilter;
126  typename LogLUTFilterType::Pointer m_LogRampFilter;
127  typename SubtractLUTFilterType::Pointer m_SubtractLUTFilter;
128 };
129 } // end namespace rtk
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
132 #include "rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx"
133 #endif
134 
135 #endif
Function to do the lookup operation.
typename itk::LogImageFilter< LookupTableType, LookupTableType > LogLUTFilterType
typename FunctorType::LookupTableType LookupTableType
typename itk::ThresholdImageFilter< LookupTableType > ThresholdLUTFilterType
typename itk::SubtractImageFilter< LookupTableType > SubtractLUTFilterType
#define itkSetMacro(name, type)