OTB  9.0.0
Orfeo Toolbox
otbGaussianAdditiveNoiseSampleListFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbGaussianAdditiveNoiseSampleListFilter_h
22 #define otbGaussianAdditiveNoiseSampleListFilter_h
23 
25 
26 namespace otb
27 {
28 namespace Statistics
29 {
30 
47 template <class TInputSampleList, class TOutputSampleList = TInputSampleList>
48 class ITK_EXPORT GaussianAdditiveNoiseSampleListFilter : public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList>
49 {
50 public:
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56 
59 
61  itkNewMacro(Self);
62 
64  typedef TInputSampleList InputSampleListType;
65  typedef typename InputSampleListType::Pointer InputSampleListPointer;
66  typedef typename InputSampleListType::ConstPointer InputSampleListConstPointer;
67  typedef typename InputSampleListType::MeasurementVectorType InputMeasurementVectorType;
68  typedef typename InputMeasurementVectorType::ValueType InputValueType;
69 
71  typedef TOutputSampleList OutputSampleListType;
72  typedef typename OutputSampleListType::Pointer OutputSampleListPointer;
73  typedef typename OutputSampleListType::ConstPointer OutputSampleListConstPointer;
74  typedef typename OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType;
75  typedef typename OutputMeasurementVectorType::ValueType OutputValueType;
76 
78  itkSetMacro(Mean, double);
79  itkGetMacro(Mean, double);
81 
83  itkSetMacro(Variance, double);
84  itkGetMacro(Variance, double);
86 
88  itkSetMacro(NumberOfIteration, unsigned int);
89  itkGetMacro(NumberOfIteration, unsigned int);
91 
92 protected:
94  void GenerateData() override;
95 
99  void GenerateRandomSequence();
100 
103  {
104  }
105  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
106 
107 private:
108  GaussianAdditiveNoiseSampleListFilter(const Self&) = delete;
109  void operator=(const Self&) = delete;
110 
111  // Mean and variance for the white gaussian noise to generate
112  double m_Mean;
113  double m_Variance;
114  std::vector<double> m_WhiteGaussianNoiseCoefficients;
115  unsigned int m_NumberOfIteration;
116 
117 }; // end of class ImageToListGenerator
118 
119 } // end of namespace Statistics
120 } // end of namespace otb
121 
122 #ifndef OTB_MANUAL_INSTANTIATION
124 #endif
125 
126 #endif
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::m_Variance
double m_Variance
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:113
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::OutputSampleListPointer
OutputSampleListType::Pointer OutputSampleListPointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:72
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::OutputSampleListType
TOutputSampleList OutputSampleListType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:71
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::InputMeasurementVectorType
InputSampleListType::MeasurementVectorType InputMeasurementVectorType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:67
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::OutputSampleListConstPointer
OutputSampleListType::ConstPointer OutputSampleListConstPointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:73
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:55
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::Self
GaussianAdditiveNoiseSampleListFilter Self
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:52
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::InputSampleListType
TInputSampleList InputSampleListType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:61
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::m_Mean
double m_Mean
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:112
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::m_NumberOfIteration
unsigned int m_NumberOfIteration
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:115
otb::Statistics::ListSampleToListSampleFilter
This class is a base class for filters using ListSample as input and returning ListSample.
Definition: otbListSampleToListSampleFilter.h:43
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::~GaussianAdditiveNoiseSampleListFilter
~GaussianAdditiveNoiseSampleListFilter() override
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:102
otbListSampleToListSampleFilter.h
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::InputSampleListConstPointer
InputSampleListType::ConstPointer InputSampleListConstPointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:66
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::InputSampleListPointer
InputSampleListType::Pointer InputSampleListPointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:65
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::OutputValueType
OutputMeasurementVectorType::ValueType OutputValueType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:75
otbGaussianAdditiveNoiseSampleListFilter.hxx
otb::Statistics::GaussianAdditiveNoiseSampleListFilter
This class generate a noised version of the input sample list.
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:48
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::OutputMeasurementVectorType
OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:74
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::Superclass
otb::Statistics::ListSampleToListSampleFilter< TInputSampleList, TOutputSampleList > Superclass
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:53
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::InputValueType
InputMeasurementVectorType::ValueType InputValueType
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:68
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::m_WhiteGaussianNoiseCoefficients
std::vector< double > m_WhiteGaussianNoiseCoefficients
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:114
otb::Statistics::GaussianAdditiveNoiseSampleListFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbGaussianAdditiveNoiseSampleListFilter.h:54