SimpleITK  
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::simple {
33 
46  public:
48 
51 
55 
58 \
59 
63  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthSigma ( double KernelBandwidthSigma ) { this->m_KernelBandwidthSigma = KernelBandwidthSigma; return *this; }
64 
68  double GetKernelBandwidthSigma() const { return this->m_KernelBandwidthSigma; }\
69 
74  SITK_RETURN_SELF_TYPE_HEADER SetPatchRadius ( uint32_t PatchRadius ) { this->m_PatchRadius = PatchRadius; return *this; }
75 
80  uint32_t GetPatchRadius() const { return this->m_PatchRadius; }\
81 
86  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
87 
92  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
93 
98  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfSamplePatches ( uint32_t NumberOfSamplePatches ) { this->m_NumberOfSamplePatches = NumberOfSamplePatches; return *this; }
99 
102  uint32_t GetNumberOfSamplePatches() const { return this->m_NumberOfSamplePatches; }\
103 
108  SITK_RETURN_SELF_TYPE_HEADER SetSampleVariance ( double SampleVariance ) { this->m_SampleVariance = SampleVariance; return *this; }
109 
114  double GetSampleVariance() const { return this->m_SampleVariance; }
115 
116  typedef enum {NOMODEL,GAUSSIAN,RICIAN,POISSON} NoiseModelType;\
117 
122  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModel ( NoiseModelType NoiseModel ) { this->m_NoiseModel = NoiseModel; return *this; }
123 
128  NoiseModelType GetNoiseModel() const { return this->m_NoiseModel; }\
129 
133  SITK_RETURN_SELF_TYPE_HEADER SetNoiseSigma ( double NoiseSigma ) { this->m_NoiseSigma = NoiseSigma; return *this; }
134 
137  double GetNoiseSigma() const { return this->m_NoiseSigma; }\
138 
143  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModelFidelityWeight ( double NoiseModelFidelityWeight ) { this->m_NoiseModelFidelityWeight = NoiseModelFidelityWeight; return *this; }
144 
149  double GetNoiseModelFidelityWeight() const { return this->m_NoiseModelFidelityWeight; }\
150 
155  SITK_RETURN_SELF_TYPE_HEADER SetAlwaysTreatComponentsAsEuclidean ( bool AlwaysTreatComponentsAsEuclidean ) { this->m_AlwaysTreatComponentsAsEuclidean = AlwaysTreatComponentsAsEuclidean; return *this; }
156 
158  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOn() { return this->SetAlwaysTreatComponentsAsEuclidean(true); }
159  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOff() { return this->SetAlwaysTreatComponentsAsEuclidean(false); }
160 
165  bool GetAlwaysTreatComponentsAsEuclidean() const { return this->m_AlwaysTreatComponentsAsEuclidean; }\
166 
171  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthEstimation ( bool KernelBandwidthEstimation ) { this->m_KernelBandwidthEstimation = KernelBandwidthEstimation; return *this; }
172 
174  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOn() { return this->SetKernelBandwidthEstimation(true); }
175  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOff() { return this->SetKernelBandwidthEstimation(false); }
176 
181  bool GetKernelBandwidthEstimation() const { return this->m_KernelBandwidthEstimation; }\
182 
186  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthMultiplicationFactor ( double KernelBandwidthMultiplicationFactor ) { this->m_KernelBandwidthMultiplicationFactor = KernelBandwidthMultiplicationFactor; return *this; }
187 
191  double GetKernelBandwidthMultiplicationFactor() const { return this->m_KernelBandwidthMultiplicationFactor; }\
192 
197  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthUpdateFrequency ( uint32_t KernelBandwidthUpdateFrequency ) { this->m_KernelBandwidthUpdateFrequency = KernelBandwidthUpdateFrequency; return *this; }
198 
203  uint32_t GetKernelBandwidthUpdateFrequency() const { return this->m_KernelBandwidthUpdateFrequency; }\
204 
208  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthFractionPixelsForEstimation ( double KernelBandwidthFractionPixelsForEstimation ) { this->m_KernelBandwidthFractionPixelsForEstimation = KernelBandwidthFractionPixelsForEstimation; return *this; }
209 
213  double GetKernelBandwidthFractionPixelsForEstimation() const { return this->m_KernelBandwidthFractionPixelsForEstimation; }
214 
216  std::string GetName() const { return std::string ("PatchBasedDenoisingImageFilter"); }
217 
219  std::string ToString() const;
220 
221 
224  Image Execute ( const Image& image1 );
225 
226  private:
227 
230  using MemberFunctionType = Image (Self::*)( const Image& image1 );
231  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
232 
233 
235 
236  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
237 
238 
239  /* KernelBandwidthSigma */
240  double m_KernelBandwidthSigma{400.0};
241 
242  uint32_t m_PatchRadius{4u};
243 
244  /* Number of iterations to run */
245  uint32_t m_NumberOfIterations{1u};
246 
247  uint32_t m_NumberOfSamplePatches{200u};
248 
249  double m_SampleVariance{400.0};
250 
252 
253  double m_NoiseSigma{0.0};
254 
255  double m_NoiseModelFidelityWeight{0.0};
256 
257  bool m_AlwaysTreatComponentsAsEuclidean{false};
258 
259  bool m_KernelBandwidthEstimation{false};
260 
261  double m_KernelBandwidthMultiplicationFactor{1.0};
262 
263  uint32_t m_KernelBandwidthUpdateFrequency{3u};
264 
265  double m_KernelBandwidthFractionPixelsForEstimation{0.2};
266 
267 
268  };
269 
270 
271 }
272 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::PatchBasedDenoisingImageFilter
Derived class implementing a specific patch-based denoising algorithm, as detailed below.
Definition: sitkPatchBasedDenoisingImageFilter.h:45
itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOff
Self & KernelBandwidthEstimationOff()
Definition: sitkPatchBasedDenoisingImageFilter.h:175
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthUpdateFrequency
Self & SetKernelBandwidthUpdateFrequency(uint32_t KernelBandwidthUpdateFrequency)
Definition: sitkPatchBasedDenoisingImageFilter.h:197
itk::simple::PatchBasedDenoisingImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkPatchBasedDenoisingImageFilter.h:236
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:28
itk::simple::PatchBasedDenoisingImageFilter::RICIAN
@ RICIAN
Definition: sitkPatchBasedDenoisingImageFilter.h:116
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModel
Self & SetNoiseModel(NoiseModelType NoiseModel)
Definition: sitkPatchBasedDenoisingImageFilter.h:122
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModel
NoiseModelType GetNoiseModel() const
Definition: sitkPatchBasedDenoisingImageFilter.h:128
itk::simple::BasicPixelIDTypeList
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:51
itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOff
Self & AlwaysTreatComponentsAsEuclideanOff()
Definition: sitkPatchBasedDenoisingImageFilter.h:159
itk::simple::PatchBasedDenoisingImageFilter::AlwaysTreatComponentsAsEuclideanOn
Self & AlwaysTreatComponentsAsEuclideanOn()
Definition: sitkPatchBasedDenoisingImageFilter.h:158
itk::simple::PatchBasedDenoisingImageFilter::GetSampleVariance
double GetSampleVariance() const
Definition: sitkPatchBasedDenoisingImageFilter.h:114
itk::simple::PatchBasedDenoisingImageFilter::SetSampleVariance
Self & SetSampleVariance(double SampleVariance)
Definition: sitkPatchBasedDenoisingImageFilter.h:108
sitkImageFilter.h
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthFractionPixelsForEstimation
Self & SetKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation)
Definition: sitkPatchBasedDenoisingImageFilter.h:208
itk::simple::PatchBasedDenoisingImageFilter::GetAlwaysTreatComponentsAsEuclidean
bool GetAlwaysTreatComponentsAsEuclidean() const
Definition: sitkPatchBasedDenoisingImageFilter.h:165
itk::simple::PatchBasedDenoisingImageFilter::NoiseModelType
NoiseModelType
Definition: sitkPatchBasedDenoisingImageFilter.h:116
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthMultiplicationFactor
Self & SetKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor)
Definition: sitkPatchBasedDenoisingImageFilter.h:186
itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkPatchBasedDenoisingImageFilter.h:92
NoiseModel
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthEstimation
bool GetKernelBandwidthEstimation() const
Definition: sitkPatchBasedDenoisingImageFilter.h:181
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseSigma
double GetNoiseSigma() const
Definition: sitkPatchBasedDenoisingImageFilter.h:137
itk::simple::PatchBasedDenoisingImageFilter::KernelBandwidthEstimationOn
Self & KernelBandwidthEstimationOn()
Definition: sitkPatchBasedDenoisingImageFilter.h:174
itk::simple::PatchBasedDenoisingImageFilter::SetAlwaysTreatComponentsAsEuclidean
Self & SetAlwaysTreatComponentsAsEuclidean(bool AlwaysTreatComponentsAsEuclidean)
Definition: sitkPatchBasedDenoisingImageFilter.h:155
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthSigma
Self & SetKernelBandwidthSigma(double KernelBandwidthSigma)
Definition: sitkPatchBasedDenoisingImageFilter.h:63
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseModelFidelityWeight
Self & SetNoiseModelFidelityWeight(double NoiseModelFidelityWeight)
Definition: sitkPatchBasedDenoisingImageFilter.h:143
itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfSamplePatches
Self & SetNumberOfSamplePatches(uint32_t NumberOfSamplePatches)
Definition: sitkPatchBasedDenoisingImageFilter.h:98
itk::simple::PatchBasedDenoisingImageFilter::GetNoiseModelFidelityWeight
double GetNoiseModelFidelityWeight() const
Definition: sitkPatchBasedDenoisingImageFilter.h:149
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthMultiplicationFactor
double GetKernelBandwidthMultiplicationFactor() const
Definition: sitkPatchBasedDenoisingImageFilter.h:191
itk::simple::PatchBasedDenoisingImageFilter::SetPatchRadius
Self & SetPatchRadius(uint32_t PatchRadius)
Definition: sitkPatchBasedDenoisingImageFilter.h:74
itk::simple::PatchBasedDenoisingImageFilter::GetName
std::string GetName() const
Definition: sitkPatchBasedDenoisingImageFilter.h:216
itk::simple::PatchBasedDenoisingImageFilter::GetPatchRadius
uint32_t GetPatchRadius() const
Definition: sitkPatchBasedDenoisingImageFilter.h:80
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthUpdateFrequency
uint32_t GetKernelBandwidthUpdateFrequency() const
Definition: sitkPatchBasedDenoisingImageFilter.h:203
itk::simple::PatchBasedDenoisingImageFilter::NOMODEL
@ NOMODEL
Definition: sitkPatchBasedDenoisingImageFilter.h:116
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthSigma
double GetKernelBandwidthSigma() const
Definition: sitkPatchBasedDenoisingImageFilter.h:68
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:34
itk::simple::PatchBasedDenoisingImageFilter::SetKernelBandwidthEstimation
Self & SetKernelBandwidthEstimation(bool KernelBandwidthEstimation)
Definition: sitkPatchBasedDenoisingImageFilter.h:171
itk::simple::PatchBasedDenoisingImageFilter::GetNumberOfSamplePatches
uint32_t GetNumberOfSamplePatches() const
Definition: sitkPatchBasedDenoisingImageFilter.h:102
itk::simple::PatchBasedDenoisingImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkPatchBasedDenoisingImageFilter.h:86
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::PatchBasedDenoisingImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkPatchBasedDenoisingImageFilter.h:230
itk::simple::PatchBasedDenoisingImageFilter::GetKernelBandwidthFractionPixelsForEstimation
double GetKernelBandwidthFractionPixelsForEstimation() const
Definition: sitkPatchBasedDenoisingImageFilter.h:213
itk::simple::PatchBasedDenoisingImageFilter::SetNoiseSigma
Self & SetNoiseSigma(double NoiseSigma)
Definition: sitkPatchBasedDenoisingImageFilter.h:133
itk::simple::PatchBasedDenoisingImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkPatchBasedDenoisingImageFilter.h:57