RTK  1.4.0
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:
50  typedef typename TInputImage::PixelType InputPixelType;
51 
53  itkNewMacro(Self)
54 
55 
57 
59  itkGetMacro(Lambda, double);
60  itkSetMacro(Lambda, double);
62 
64  itkGetMacro(NumberOfIterations, unsigned int);
65  itkSetMacro(NumberOfIterations, unsigned int);
67 
68 protected:
69  LastDimensionL0GradientDenoisingImageFilter();
70  virtual ~LastDimensionL0GradientDenoisingImageFilter() ITK_OVERRIDE {}
71 
72  void GenerateInputRequestedRegion() ITK_OVERRIDE;
73 
75  void ThreadedGenerateData(const typename TInputImage::RegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId)) ITK_OVERRIDE;
76 
78  const itk::ImageRegionSplitterBase* GetImageRegionSplitter(void) const ITK_OVERRIDE;
80 
81  virtual void OneDimensionMinimizeL0NormOfGradient(InputPixelType* input, unsigned int length, double lambda, unsigned int nbIters);
82 
83  double m_Lambda;
84  unsigned int m_NumberOfIterations;
85 
86 private:
87  LastDimensionL0GradientDenoisingImageFilter(const Self &); //purposely not implemented
88  void operator=(const Self &); //purposely not implemented
89 
90 };
91 } //namespace RTK
92 
93 
94 #ifndef ITK_MANUAL_INSTANTIATION
95 #include "rtkLastDimensionL0GradientDenoisingImageFilter.hxx"
96 #endif
97 
98 #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
const itk::ImageRegionSplitterBase * GetImageRegionSplitter(void) const override
itk::InPlaceImageFilter< TInputImage, TInputImage > Superclass
#define itkSetMacro(name, type)