SimpleITK  1.3.0.dev466
sitkPatchBasedDenoisingImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software 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 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 
61 
65  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthSigma ( double KernelBandwidthSigma ) { this->m_KernelBandwidthSigma = KernelBandwidthSigma; return *this; }
66 
70  double GetKernelBandwidthSigma() const { return this->m_KernelBandwidthSigma; }
71 
76  SITK_RETURN_SELF_TYPE_HEADER SetPatchRadius ( uint32_t PatchRadius ) { this->m_PatchRadius = PatchRadius; return *this; }
77 
82  uint32_t GetPatchRadius() const { return this->m_PatchRadius; }
83 
88  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
89 
94  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }
95 
100  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfSamplePatches ( uint32_t NumberOfSamplePatches ) { this->m_NumberOfSamplePatches = NumberOfSamplePatches; return *this; }
101 
104  uint32_t GetNumberOfSamplePatches() const { return this->m_NumberOfSamplePatches; }
105 
110  SITK_RETURN_SELF_TYPE_HEADER SetSampleVariance ( double SampleVariance ) { this->m_SampleVariance = SampleVariance; return *this; }
111 
116  double GetSampleVariance() const { return this->m_SampleVariance; }
117 
118  typedef enum {NOMODEL,GAUSSIAN,RICIAN,POISSON} NoiseModelType;
119 
124  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModel ( NoiseModelType NoiseModel ) { this->m_NoiseModel = NoiseModel; return *this; }
125 
130  NoiseModelType GetNoiseModel() const { return this->m_NoiseModel; }
131 
135  SITK_RETURN_SELF_TYPE_HEADER SetNoiseSigma ( double NoiseSigma ) { this->m_NoiseSigma = NoiseSigma; return *this; }
136 
139  double GetNoiseSigma() const { return this->m_NoiseSigma; }
140 
145  SITK_RETURN_SELF_TYPE_HEADER SetNoiseModelFidelityWeight ( double NoiseModelFidelityWeight ) { this->m_NoiseModelFidelityWeight = NoiseModelFidelityWeight; return *this; }
146 
151  double GetNoiseModelFidelityWeight() const { return this->m_NoiseModelFidelityWeight; }
152 
157  SITK_RETURN_SELF_TYPE_HEADER SetAlwaysTreatComponentsAsEuclidean ( bool AlwaysTreatComponentsAsEuclidean ) { this->m_AlwaysTreatComponentsAsEuclidean = AlwaysTreatComponentsAsEuclidean; return *this; }
158 
160  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOn() { return this->SetAlwaysTreatComponentsAsEuclidean(true); }
161  SITK_RETURN_SELF_TYPE_HEADER AlwaysTreatComponentsAsEuclideanOff() { return this->SetAlwaysTreatComponentsAsEuclidean(false); }
162 
167  bool GetAlwaysTreatComponentsAsEuclidean() const { return this->m_AlwaysTreatComponentsAsEuclidean; }
168 
173  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthEstimation ( bool KernelBandwidthEstimation ) { this->m_KernelBandwidthEstimation = KernelBandwidthEstimation; return *this; }
174 
176  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOn() { return this->SetKernelBandwidthEstimation(true); }
177  SITK_RETURN_SELF_TYPE_HEADER KernelBandwidthEstimationOff() { return this->SetKernelBandwidthEstimation(false); }
178 
183  bool GetKernelBandwidthEstimation() const { return this->m_KernelBandwidthEstimation; }
184 
188  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthMultiplicationFactor ( double KernelBandwidthMultiplicationFactor ) { this->m_KernelBandwidthMultiplicationFactor = KernelBandwidthMultiplicationFactor; return *this; }
189 
193  double GetKernelBandwidthMultiplicationFactor() const { return this->m_KernelBandwidthMultiplicationFactor; }
194 
199  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthUpdateFrequency ( uint32_t KernelBandwidthUpdateFrequency ) { this->m_KernelBandwidthUpdateFrequency = KernelBandwidthUpdateFrequency; return *this; }
200 
205  uint32_t GetKernelBandwidthUpdateFrequency() const { return this->m_KernelBandwidthUpdateFrequency; }
206 
210  SITK_RETURN_SELF_TYPE_HEADER SetKernelBandwidthFractionPixelsForEstimation ( double KernelBandwidthFractionPixelsForEstimation ) { this->m_KernelBandwidthFractionPixelsForEstimation = KernelBandwidthFractionPixelsForEstimation; return *this; }
211 
215  double GetKernelBandwidthFractionPixelsForEstimation() const { return this->m_KernelBandwidthFractionPixelsForEstimation; }
217  std::string GetName() const { return std::string ("PatchBasedDenoisingImageFilter"); }
218 
220  std::string ToString() const;
221 
222 
224  Image Execute ( const Image& image1 );
225 
226 
228  Image Execute ( const Image& image1, double kernelBandwidthSigma, uint32_t patchRadius, uint32_t numberOfIterations, uint32_t numberOfSamplePatches, double sampleVariance, PatchBasedDenoisingImageFilter::NoiseModelType noiseModel, double noiseSigma, double noiseModelFidelityWeight, bool alwaysTreatComponentsAsEuclidean, bool kernelBandwidthEstimation, double kernelBandwidthMultiplicationFactor, uint32_t kernelBandwidthUpdateFrequency, double kernelBandwidthFractionPixelsForEstimation );
229 
230  private:
231 
234  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
235  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
236 
237 
238  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
239 
240  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
241 
242 
243  /* KernelBandwidthSigma */
246  /* Number of iterations to run */
251  double m_NoiseSigma;
258  };
259 
260 
261  }
262 }
263 #endif
#define SITKBasicFilters_EXPORT
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
Self & SetKernelBandwidthFractionPixelsForEstimation(double KernelBandwidthFractionPixelsForEstimation)
Self & SetNumberOfSamplePatches(uint32_t NumberOfSamplePatches)
Self & SetAlwaysTreatComponentsAsEuclidean(bool AlwaysTreatComponentsAsEuclidean)
::uint32_t uint32_t
Self & SetNoiseModelFidelityWeight(double NoiseModelFidelityWeight)
Self & SetKernelBandwidthEstimation(bool KernelBandwidthEstimation)
Derived class implementing a specific patch-based denoising algorithm, as detailed below...
The Image class for SimpleITK.
Definition: sitkImage.h:78
Self & SetKernelBandwidthUpdateFrequency(uint32_t KernelBandwidthUpdateFrequency)
Self & SetKernelBandwidthMultiplicationFactor(double KernelBandwidthMultiplicationFactor)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
The base interface for SimpleITK filters that take one input image.