ITK  6.0.0
Insight Toolkit
itkShotNoiseImageFilter.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 * https://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
23namespace itk
24{
25
93template <class TInputImage, class TOutputImage = TInputImage>
94class ITK_TEMPLATE_EXPORT ShotNoiseImageFilter : public NoiseBaseImageFilter<TInputImage, TOutputImage>
95{
96public:
97 ITK_DISALLOW_COPY_AND_MOVE(ShotNoiseImageFilter);
105
107 itkNewMacro(Self);
108
110 itkOverrideGetNameOfClassMacro(ShotNoiseImageFilter);
111
113 using typename Superclass::OutputImageType;
114 using typename Superclass::OutputImagePointer;
115 using typename Superclass::OutputImageRegionType;
116 using typename Superclass::OutputImagePixelType;
117
119 using InputImageType = TInputImage;
123 using InputImagePixelType = typename InputImageType::PixelType;
124
129 itkGetConstMacro(Scale, double);
130 itkSetMacro(Scale, double);
133#ifdef ITK_USE_CONCEPT_CHECKING
135 itkConceptMacro(InputConvertibleToOutputCheck,
137
139#endif
140
141protected:
143 ~ShotNoiseImageFilter() override = default;
144
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
148 void
149 ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
150
151
152private:
153 double m_Scale{ 1.0 };
154};
155} // end namespace itk
156
157#ifndef ITK_MANUAL_INSTANTIATION
158# include "itkShotNoiseImageFilter.hxx"
159#endif
160
161#endif
typename OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
An Abstract Base class for Noise image filters.
Alter an image with shot noise.
void PrintSelf(std::ostream &os, Indent indent) const override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
~ShotNoiseImageFilter() override=default
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition: itkIntTypes.h:102