ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkNoiseImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkNoiseImageFilter_h
00019 #define __itkNoiseImageFilter_h
00020 
00021 #include "itkBoxImageFilter.h"
00022 #include "itkImage.h"
00023 #include "itkNumericTraits.h"
00024 
00025 namespace itk
00026 {
00050 template< class TInputImage, class TOutputImage >
00051 class ITK_EXPORT NoiseImageFilter:
00052   public BoxImageFilter< TInputImage, TOutputImage >
00053 {
00054 public:
00056   itkStaticConstMacro(InputImageDimension, unsigned int,
00057                       TInputImage::ImageDimension);
00058   itkStaticConstMacro(OutputImageDimension, unsigned int,
00059                       TOutputImage::ImageDimension);
00061 
00063   typedef TInputImage  InputImageType;
00064   typedef TOutputImage OutputImageType;
00065 
00067   typedef NoiseImageFilter                                  Self;
00068   typedef BoxImageFilter< InputImageType, OutputImageType > Superclass;
00069   typedef SmartPointer< Self >                              Pointer;
00070   typedef SmartPointer< const Self >                        ConstPointer;
00071 
00073   itkNewMacro(Self);
00074 
00076   itkTypeMacro(NoiseImageFilter, BoxImageFilter);
00077 
00079   typedef typename InputImageType::PixelType                 InputPixelType;
00080   typedef typename OutputImageType::PixelType                OutputPixelType;
00081   typedef typename NumericTraits< InputPixelType >::RealType InputRealType;
00082 
00083   typedef typename InputImageType::RegionType  InputImageRegionType;
00084   typedef typename OutputImageType::RegionType OutputImageRegionType;
00085 
00086   typedef typename InputImageType::SizeType InputSizeType;
00087 
00088 #ifdef ITK_USE_CONCEPT_CHECKING
00089 
00090   itkConceptMacro( InputHasNumericTraitsCheck,
00091                    ( Concept::HasNumericTraits< InputPixelType > ) );
00092 
00094 #endif
00095 protected:
00096   NoiseImageFilter();
00097   virtual ~NoiseImageFilter() {}
00098 
00109   void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
00110                             ThreadIdType threadId);
00111 
00112 private:
00113   NoiseImageFilter(const Self &); //purposely not implemented
00114   void operator=(const Self &);   //purposely not implemented
00115 };
00116 } // end namespace itk
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkNoiseImageFilter.hxx"
00120 #endif
00121 
00122 #endif
00123