SimpleITK  2.0.0
sitkPatchBasedDenoisingImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
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 sitkPatchBasedDenoisingImageFilter_h
19 #define sitkPatchBasedDenoisingImageFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkBasicFilters.h"
30 #include "sitkImageFilter.h"
31 
32 namespace itk {
33  namespace simple {
34 
47  public:
49 
52 
56 
59 \
60 
64  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthSigma ( double KernelBandwidthSigma ) { this->m_KernelBandwidthSigma = KernelBandwidthSigma; return *this; }
65 
69  double GetKernelBandwidthSigma() const { return this->m_KernelBandwidthSigma; }\
70 
75  SITK_RETURN_SELF_TYPE_HEADER SetPatchRadius ( uint32_t PatchRadius ) { this->m_PatchRadius = PatchRadius; return *this; }
76 
81  uint32_t GetPatchRadius() const { return this->m_PatchRadius; }\
82 
87  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
88 
93  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
94 
99  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfSamplePatches ( uint32_t NumberOfSamplePatches ) { this->m_NumberOfSamplePatches = NumberOfSamplePatches; return *this; }
100 
103  uint32_t GetNumberOfSamplePatches() const { return this->m_NumberOfSamplePatches; }\
104 
109  SITK_RETURN_SELF_TYPE_HEADER SetSampleVariance ( double SampleVariance ) { this->m_SampleVariance = SampleVariance; return *this; }
110 
115  double GetSampleVariance() const { return this->m_SampleVariance; }
116 
117  typedef enum {NOMODEL,GAUSSIAN,RICIAN,POISSON} NoiseModelType;\
118 
123  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModel ( NoiseModelType NoiseModel ) { this->m_NoiseModel = NoiseModel; return *this; }
124 
129  NoiseModelType GetNoiseModel() const { return this->m_NoiseModel; }\
130 
134  SITK_RETURN_SELF_TYPE_HEADER SetNoiseSigma ( double NoiseSigma ) { this->m_NoiseSigma = NoiseSigma; return *this; }
135 
138  double GetNoiseSigma() const { return this->m_NoiseSigma; }\
139 
144  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModelFidelityWeight ( double NoiseModelFidelityWeight ) { this->m_NoiseModelFidelityWeight = NoiseModelFidelityWeight; return *this; }
145 
150  double GetNoiseModelFidelityWeight() const { return this->m_NoiseModelFidelityWeight; }\
151 
156  SITK_RETURN_SELF_TYPE_HEADER SetAlwaysTreatComponentsAsEuclidean ( bool AlwaysTreatComponentsAsEuclidean ) { this->m_AlwaysTreatComponentsAsEuclidean = AlwaysTreatComponentsAsEuclidean; return *this; }
157 
159  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOn() { return this->SetAlwaysTreatComponentsAsEuclidean(true); }
160  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOff() { return this->SetAlwaysTreatComponentsAsEuclidean(false); }
161 
166  bool GetAlwaysTreatComponentsAsEuclidean() const { return this->m_AlwaysTreatComponentsAsEuclidean; }\
167 
172  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthEstimation ( bool KernelBandwidthEstimation ) { this->m_KernelBandwidthEstimation = KernelBandwidthEstimation; return *this; }
173 
175  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOn() { return this->SetKernelBandwidthEstimation(true); }
176  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOff() { return this->SetKernelBandwidthEstimation(false); }
177 
182  bool GetKernelBandwidthEstimation() const { return this->m_KernelBandwidthEstimation; }\
183 
187  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthMultiplicationFactor ( double KernelBandwidthMultiplicationFactor ) { this->m_KernelBandwidthMultiplicationFactor = KernelBandwidthMultiplicationFactor; return *this; }
188 
192  double GetKernelBandwidthMultiplicationFactor() const { return this->m_KernelBandwidthMultiplicationFactor; }\
193 
198  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthUpdateFrequency ( uint32_t KernelBandwidthUpdateFrequency ) { this->m_KernelBandwidthUpdateFrequency = KernelBandwidthUpdateFrequency; return *this; }
199 
204  uint32_t GetKernelBandwidthUpdateFrequency() const { return this->m_KernelBandwidthUpdateFrequency; }\
205 
209  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthFractionPixelsForEstimation ( double KernelBandwidthFractionPixelsForEstimation ) { this->m_KernelBandwidthFractionPixelsForEstimation = KernelBandwidthFractionPixelsForEstimation; return *this; }
210 
214  double GetKernelBandwidthFractionPixelsForEstimation() const { return this->m_KernelBandwidthFractionPixelsForEstimation; }
215 
217  std::string GetName() const { return std::string ("PatchBasedDenoisingImageFilter"); }
218 
220  std::string ToString() const;
221 
222 
225  Image Execute ( const Image& image1 );
226 
227  private:
228 
231  using MemberFunctionType = Image (Self::*)( const Image& image1 );
232  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
233 
234 
236 
237  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
238 
239 
240  /* KernelBandwidthSigma */
241  double m_KernelBandwidthSigma{400.0};
242 
243  uint32_t m_PatchRadius{4u};
244 
245  /* Number of iterations to run */
246  uint32_t m_NumberOfIterations{1u};
247 
248  uint32_t m_NumberOfSamplePatches{200u};
249 
250  double m_SampleVariance{400.0};
251 
253 
254  double m_NoiseSigma{0.0};
255 
256  double m_NoiseModelFidelityWeight{0.0};
257 
258  bool m_AlwaysTreatComponentsAsEuclidean{false};
259 
260  bool m_KernelBandwidthEstimation{false};
261 
262  double m_KernelBandwidthMultiplicationFactor{1.0};
263 
264  uint32_t m_KernelBandwidthUpdateFrequency{3u};
265 
266  double m_KernelBandwidthFractionPixelsForEstimation{0.2};
267 
268 
269  };
270 
271 
272  }
273 }
274 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
sitkBasicFilters.h
itk::simple::PatchBasedDenoisingImageFilter
Derived class implementing a specific patch-based denoising algorithm, as detailed below.
Definition: sitkPatchBasedDenoisingImageFilter.h:46
itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOff
Self & KernelBandwidthEstimationOff()
Definition: sitkPatchBasedDenoisingImageFilter.h:176
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthUpdateFrequency
Self & SetKernelBandwidthUpdateFrequency(uint32_t KernelBandwidthUpdateFrequency)
Definition: sitkPatchBasedDenoisingImageFilter.h:198
itk::simple::PatchBasedDenoisingImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkPatchBasedDenoisingImageFilter.h:237
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::PatchBasedDenoisingImageFilter::RICIAN
@ RICIAN
Definition: sitkPatchBasedDenoisingImageFilter.h:117
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModel
Self & SetNoiseModel(NoiseModelType NoiseModel)
Definition: sitkPatchBasedDenoisingImageFilter.h:123
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModel
NoiseModelType GetNoiseModel() const
Definition: sitkPatchBasedDenoisingImageFilter.h:129
itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOff
Self & AlwaysTreatComponentsAsEuclideanOff()
Definition: sitkPatchBasedDenoisingImageFilter.h:160
itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOn
Self & AlwaysTreatComponentsAsEuclideanOn()
Definition: sitkPatchBasedDenoisingImageFilter.h:159
itk::simple::PatchBasedDenoisingImageFilter::GetSampleVariance
double GetSampleVariance() const
Definition: sitkPatchBasedDenoisingImageFilter.h:115
itk::simple::PatchBasedDenoisingImageFilter::SetSampleVariance
Self & SetSampleVariance(double SampleVariance)
Definition: sitkPatchBasedDenoisingImageFilter.h:109
itk::simple::BasicPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:53
sitkImageFilter.h
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthFractionPixelsForEstimation
Self & SetKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation)
Definition: sitkPatchBasedDenoisingImageFilter.h:209
itk::simple::PatchBasedDenoisingImageFilter::GetAlwaysTreatComponentsAsEuclidean
bool GetAlwaysTreatComponentsAsEuclidean() const
Definition: sitkPatchBasedDenoisingImageFilter.h:166
itk::simple::PatchBasedDenoisingImageFilter::NoiseModelType
NoiseModelType
Definition: sitkPatchBasedDenoisingImageFilter.h:117
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthMultiplicationFactor
Self & SetKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor)
Definition: sitkPatchBasedDenoisingImageFilter.h:187
itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkPatchBasedDenoisingImageFilter.h:93
NoiseModel
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthEstimation
bool GetKernelBandwidthEstimation() const
Definition: sitkPatchBasedDenoisingImageFilter.h:182
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseSigma
double GetNoiseSigma() const
Definition: sitkPatchBasedDenoisingImageFilter.h:138
itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOn
Self & KernelBandwidthEstimationOn()
Definition: sitkPatchBasedDenoisingImageFilter.h:175
itk::simple::PatchBasedDenoisingImageFilter::SetAlwaysTreatComponentsAsEuclidean
Self & SetAlwaysTreatComponentsAsEuclidean(bool AlwaysTreatComponentsAsEuclidean)
Definition: sitkPatchBasedDenoisingImageFilter.h:156
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthSigma
Self & SetKernelBandwidthSigma(double KernelBandwidthSigma)
Definition: sitkPatchBasedDenoisingImageFilter.h:64
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModelFidelityWeight
Self & SetNoiseModelFidelityWeight(double NoiseModelFidelityWeight)
Definition: sitkPatchBasedDenoisingImageFilter.h:144
itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfSamplePatches
Self & SetNumberOfSamplePatches(uint32_t NumberOfSamplePatches)
Definition: sitkPatchBasedDenoisingImageFilter.h:99
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModelFidelityWeight
double GetNoiseModelFidelityWeight() const
Definition: sitkPatchBasedDenoisingImageFilter.h:150
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthMultiplicationFactor
double GetKernelBandwidthMultiplicationFactor() const
Definition: sitkPatchBasedDenoisingImageFilter.h:192
itk::simple::PatchBasedDenoisingImageFilter::SetPatchRadius
Self & SetPatchRadius(uint32_t PatchRadius)
Definition: sitkPatchBasedDenoisingImageFilter.h:75
itk::simple::PatchBasedDenoisingImageFilter::GetName
std::string GetName() const
Definition: sitkPatchBasedDenoisingImageFilter.h:217
itk::simple::PatchBasedDenoisingImageFilter::GetPatchRadius
uint32_t GetPatchRadius() const
Definition: sitkPatchBasedDenoisingImageFilter.h:81
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthUpdateFrequency
uint32_t GetKernelBandwidthUpdateFrequency() const
Definition: sitkPatchBasedDenoisingImageFilter.h:204
itk
itk::simple::PatchBasedDenoisingImageFilter::NOMODEL
@ NOMODEL
Definition: sitkPatchBasedDenoisingImageFilter.h:117
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthSigma
double GetKernelBandwidthSigma() const
Definition: sitkPatchBasedDenoisingImageFilter.h:69
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthEstimation
Self & SetKernelBandwidthEstimation(bool KernelBandwidthEstimation)
Definition: sitkPatchBasedDenoisingImageFilter.h:172
itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfSamplePatches
uint32_t GetNumberOfSamplePatches() const
Definition: sitkPatchBasedDenoisingImageFilter.h:103
itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkPatchBasedDenoisingImageFilter.h:87
itk::uint32_t
::uint32_t uint32_t
itk::simple::PatchBasedDenoisingImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkPatchBasedDenoisingImageFilter.h:231
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthFractionPixelsForEstimation
double GetKernelBandwidthFractionPixelsForEstimation() const
Definition: sitkPatchBasedDenoisingImageFilter.h:214
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseSigma
Self & SetNoiseSigma(double NoiseSigma)
Definition: sitkPatchBasedDenoisingImageFilter.h:134
itk::simple::PatchBasedDenoisingImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkPatchBasedDenoisingImageFilter.h:58