RTK  2.1.0
Reconstruction Toolkit
rtkDenoisingBPDQImageFilter.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 rtkDenoisingBPDQImageFilter_h
20 #define rtkDenoisingBPDQImageFilter_h
21 
24 
25 #include <itkCastImageFilter.h>
26 #include <itkSubtractImageFilter.h>
27 #include <itkMultiplyImageFilter.h>
28 #include <itkInPlaceImageFilter.h>
29 
30 namespace rtk
31 {
40 template <typename TOutputImage, typename TGradientImage>
41 class DenoisingBPDQImageFilter : public itk::InPlaceImageFilter<TOutputImage, TOutputImage>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_ASSIGN(DenoisingBPDQImageFilter);
45 
51 
53  itkNewMacro(Self);
54 
57 
59  typedef ForwardDifferenceGradientImageFilter<TOutputImage,
60  typename TOutputImage::ValueType,
61  typename TOutputImage::ValueType,
62  TGradientImage>
69 
70  itkGetMacro(NumberOfIterations, int);
71  itkSetMacro(NumberOfIterations, int);
72 
73  itkSetMacro(Gamma, double);
74  itkGetMacro(Gamma, double);
75 
76 protected:
78  ~DenoisingBPDQImageFilter() override = default;
79 
80  void
81  GenerateData() override;
82 
83  void
84  GenerateOutputInformation() override;
85 
86  virtual ThresholdFilterType *
88  {
89  return nullptr;
90  }
91 
98 
99  double m_Gamma;
100  double m_Beta;
101  double m_MinSpacing;
103  bool m_DimensionsProcessed[TOutputImage::ImageDimension];
104 
105 private:
106  virtual void
108  virtual void
110 };
111 
112 } // namespace rtk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 # include "rtkDenoisingBPDQImageFilter.hxx"
116 #endif
117 
118 #endif //__rtkDenoisingBPDQImageFilter__
DivergenceFilterType::Pointer m_DivergenceFilter
ForwardDifferenceGradientImageFilter< TOutputImage, typename TOutputImage::ValueType, typename TOutputImage::ValueType, TGradientImage > GradientFilterType
MultiplyFilterType::Pointer m_MultiplyFilter
Base class for Basis Pursuit DeQuantization denoising filters.
virtual void SetPipelineAfterFirstIteration()
#define itkSetMacro(name, type)
Computes the gradient of an image using forward difference.
SubtractImageFilterType::Pointer m_SubtractFilter
void GenerateOutputInformation() override
SubtractGradientFilterType::Pointer m_SubtractGradientFilter
bool m_DimensionsProcessed[TOutputImage::ImageDimension]
~DenoisingBPDQImageFilter() override=default
virtual void SetPipelineForFirstIteration()
Computes the backward differences divergence (adjoint of the forward differences gradient) of the inp...
GradientFilterType::Pointer m_GradientFilter
virtual ThresholdFilterType * GetThresholdFilter()