ITK  4.13.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:
102 
104  itkNewMacro(Self);
105 
108 
110  typedef typename Superclass::OutputImageType OutputImageType;
111  typedef typename Superclass::OutputImagePointer OutputImagePointer;
112  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
113  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
114 
116  typedef TInputImage InputImageType;
117  typedef typename InputImageType::Pointer InputImagePointer;
118  typedef typename InputImageType::ConstPointer InputImageConstPointer;
119  typedef typename InputImageType::RegionType InputImageRegionType;
120  typedef typename InputImageType::PixelType InputImagePixelType;
121 
126  itkGetConstMacro(Scale, double);
127  itkSetMacro(Scale, double);
129 
130 #ifdef ITK_USE_CONCEPT_CHECKING
131 
132  itkConceptMacro(InputConvertibleToOutputCheck,
133  (Concept::Convertible<typename TInputImage::PixelType,
134  typename TOutputImage::PixelType>) );
135 
137 #endif
138 
139 protected:
141  virtual ~ShotNoiseImageFilter() ITK_OVERRIDE {}
142 
143  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
144 
145  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE;
146 
147 private:
148  ITK_DISALLOW_COPY_AND_ASSIGN(ShotNoiseImageFilter);
149 
150  double m_Scale;
151 
152 };
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkShotNoiseImageFilter.hxx"
157 #endif
158 
159 #endif
InputImageType::Pointer InputImagePointer
InputImageType::RegionType InputImageRegionType
Superclass::OutputImagePointer OutputImagePointer
Alter an image with shot noise.
An Abstract Base class for Noise image filters.
Superclass::OutputImageRegionType OutputImageRegionType
NoiseBaseImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
InputImageType::ConstPointer InputImageConstPointer
Superclass::OutputImagePixelType OutputImagePixelType
virtual ~ShotNoiseImageFilter() override
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InputImageType::PixelType InputImagePixelType
#define itkConceptMacro(name, concept)
Superclass::OutputImageType OutputImageType