00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNoiseImageFilter_h
00018 #define __itkNoiseImageFilter_h
00019
00020
00021
00022
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&);
00136 void operator=(const Self&);
00137
00138 InputSizeType m_Radius;
00139 };
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkNoiseImageFilter.txx"
00145 #endif
00146
00147 #endif
00148
00149 #endif
00150