ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkAdditiveGaussianNoiseImageFilter.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 itkAdditiveGaussianNoiseImageFilter_h
19 #define itkAdditiveGaussianNoiseImageFilter_h
20 
22 
23 namespace itk
24 {
25 
52 template <class TInputImage, class TOutputImage=TInputImage>
53 class ITK_TEMPLATE_EXPORT AdditiveGaussianNoiseImageFilter :
54  public NoiseBaseImageFilter<TInputImage,TOutputImage >
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(AdditiveGaussianNoiseImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
70 
72  using OutputImageType = typename Superclass::OutputImageType;
73  using OutputImagePointer = typename Superclass::OutputImagePointer;
74  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
75  using OutputImagePixelType = typename Superclass::OutputImagePixelType;
76 
78  using InputImageType = TInputImage;
79  using InputImagePointer = typename InputImageType::Pointer;
80  using InputImageConstPointer = typename InputImageType::ConstPointer;
82  using InputImagePixelType = typename InputImageType::PixelType;
83 
86  itkGetConstMacro(Mean, double);
87  itkSetMacro(Mean, double);
89 
92  itkGetConstMacro(StandardDeviation, double);
93  itkSetMacro(StandardDeviation, double);
95 
96 #ifdef ITK_USE_CONCEPT_CHECKING
97 
98  itkConceptMacro(InputConvertibleToOutputCheck,
99  (Concept::Convertible<typename TInputImage::PixelType,
100  typename TOutputImage::PixelType>) );
101 
103 #endif
104 
105 protected:
107  ~AdditiveGaussianNoiseImageFilter() override = default;
108 
109  void PrintSelf(std::ostream & os, Indent indent) const override;
110 
111  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
112 
113 
114 private:
115  double m_Mean{ 0.0 };
116  double m_StandardDeviation{ 1.0 };
117 
118 };
119 } // end namespace itk
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
122 #include "itkAdditiveGaussianNoiseImageFilter.hxx"
123 #endif
124 
125 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
An Abstract Base class for Noise image filters.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Alter an image with additive Gaussian white noise.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer