RTK  2.0.1
Reconstruction Toolkit
rtkLastDimensionL0GradientDenoisingImageFilter.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 #ifndef rtkLastDimensionL0GradientDenoisingImageFilter_h
19 #define rtkLastDimensionL0GradientDenoisingImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
22 
24 
25 namespace rtk
26 {
41 template< class TInputImage >
42 
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(LastDimensionL0GradientDenoisingImageFilter);
47 
52  using InputPixelType = typename TInputImage::PixelType;
53 
55  itkNewMacro(Self)
56 
57 
59 
61  itkGetMacro(Lambda, double);
62  itkSetMacro(Lambda, double);
64 
66  itkGetMacro(NumberOfIterations, unsigned int);
67  itkSetMacro(NumberOfIterations, unsigned int);
69 
70 protected:
71  LastDimensionL0GradientDenoisingImageFilter();
72  ~LastDimensionL0GradientDenoisingImageFilter() override = default;
73 
74  void GenerateInputRequestedRegion() override;
75 
77  void ThreadedGenerateData(const typename TInputImage::RegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId)) override;
78 
80  const itk::ImageRegionSplitterBase* GetImageRegionSplitter(void) const override;
82 
83  virtual void OneDimensionMinimizeL0NormOfGradient(InputPixelType* input, unsigned int length, double lambda, unsigned int nbIters);
84 
85  double m_Lambda;
86  unsigned int m_NumberOfIterations;
87 
88 };
89 } //namespace RTK
90 
91 
92 #ifndef ITK_MANUAL_INSTANTIATION
93 #include "rtkLastDimensionL0GradientDenoisingImageFilter.hxx"
94 #endif
95 
96 #endif
virtual void OneDimensionMinimizeL0NormOfGradient(InputPixelType *input, unsigned int length, double lambda, unsigned int nbIters)
Denoises along the last dimension, reducing the L0 norm of the gradient.
void ThreadedGenerateData(const typename TInputImage::RegionType &outputRegionForThread, itk::ThreadIdType) override
unsigned int ThreadIdType
ImageBaseType::RegionType RegionType
const itk::ImageRegionSplitterBase * GetImageRegionSplitter(void) const override
#define itkSetMacro(name, type)