ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkShotNoiseImageFilter.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 itkShotNoiseImageFilter_h
19 #define itkShotNoiseImageFilter_h
20 
22 
23 namespace itk
24 {
25 
92 template <class TInputImage, class TOutputImage=TInputImage>
93 class ITK_TEMPLATE_EXPORT ShotNoiseImageFilter :
94  public NoiseBaseImageFilter<TInputImage,TOutputImage >
95 {
96 public:
97  ITK_DISALLOW_COPY_AND_ASSIGN(ShotNoiseImageFilter);
98 
104 
106  itkNewMacro(Self);
107 
110 
112  using OutputImageType = typename Superclass::OutputImageType;
113  using OutputImagePointer = typename Superclass::OutputImagePointer;
114  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
115  using OutputImagePixelType = typename Superclass::OutputImagePixelType;
116 
118  using InputImageType = TInputImage;
119  using InputImagePointer = typename InputImageType::Pointer;
120  using InputImageConstPointer = typename InputImageType::ConstPointer;
122  using InputImagePixelType = typename InputImageType::PixelType;
123 
128  itkGetConstMacro(Scale, double);
129  itkSetMacro(Scale, double);
131 
132 #ifdef ITK_USE_CONCEPT_CHECKING
133 
134  itkConceptMacro(InputConvertibleToOutputCheck,
135  (Concept::Convertible<typename TInputImage::PixelType,
136  typename TOutputImage::PixelType>) );
137 
139 #endif
140 
141 protected:
143  ~ShotNoiseImageFilter() override = default;
144 
145  void PrintSelf(std::ostream & os, Indent indent) const override;
146 
147  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
148 
149 
150 private:
151  double m_Scale{ 1.0 };
152 
153 };
154 } // end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkShotNoiseImageFilter.hxx"
158 #endif
159 
160 #endif
typename OutputImageType::Pointer OutputImagePointer
Alter an image with shot noise.
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
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer