Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNoiseImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNoiseImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-16 19:33:45 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkNoiseImageFilter_h
00018 #define __itkNoiseImageFilter_h
00019 
00020 // First make sure that the configuration is available.
00021 // This line can be removed once the optimized versions
00022 // gets integrated into the main directories.
00023 #include "itkConfigure.h"
00024 
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptNoiseImageFilter.h"
00027 #else
00028 
00029 
00030 #include "itkImageToImageFilter.h"
00031 #include "itkImage.h"
00032 #include "itkNumericTraits.h"
00033 
00034 namespace itk
00035 {
00054 template <class TInputImage, class TOutputImage>
00055 class ITK_EXPORT NoiseImageFilter :
00056     public ImageToImageFilter< TInputImage, TOutputImage >
00057 {
00058 public:
00060   itkStaticConstMacro(InputImageDimension, unsigned int,
00061                       TInputImage::ImageDimension);
00062   itkStaticConstMacro(OutputImageDimension, unsigned int,
00063                       TOutputImage::ImageDimension);
00065 
00067   typedef TInputImage  InputImageType;
00068   typedef TOutputImage OutputImageType;
00069 
00071   typedef NoiseImageFilter                                     Self;
00072   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00073   typedef SmartPointer<Self>                                   Pointer;
00074   typedef SmartPointer<const Self>                             ConstPointer;
00075 
00077   itkNewMacro(Self);
00078 
00080   itkTypeMacro(NoiseImageFilter, ImageToImageFilter);
00081 
00083   typedef typename InputImageType::PixelType               InputPixelType;
00084   typedef typename OutputImageType::PixelType              OutputPixelType;
00085   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00086 
00087   typedef typename InputImageType::RegionType  InputImageRegionType;
00088   typedef typename OutputImageType::RegionType OutputImageRegionType;
00089 
00090   typedef typename InputImageType::SizeType InputSizeType;
00091 
00095   itkSetMacro(Radius, InputSizeType);
00096 
00098   itkGetConstReferenceMacro(Radius, InputSizeType);
00099 
00106   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00107 
00108 #ifdef ITK_USE_CONCEPT_CHECKING
00109 
00110   itkConceptMacro(InputHasNumericTraitsCheck,
00111                   (Concept::HasNumericTraits<InputPixelType>));
00112 
00114 #endif
00115 
00116 protected:
00117   NoiseImageFilter();
00118   virtual ~NoiseImageFilter() {}
00119   void PrintSelf(std::ostream& os, Indent indent) const;
00120 
00131   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00132                             int threadId );
00133 
00134 private:
00135   NoiseImageFilter(const Self&); //purposely not implemented
00136   void operator=(const Self&); //purposely not implemented
00137 
00138   InputSizeType m_Radius;
00139 };
00140   
00141 } // end namespace itk
00142 
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkNoiseImageFilter.txx"
00145 #endif
00146 
00147 #endif
00148 
00149 #endif
00150 

Generated at Tue Sep 15 04:10:43 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000