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
#include "itkImageToImageFilter.h"
00021
#include "itkImage.h"
00022
#include "itkNumericTraits.h"
00023
00024
namespace itk
00025 {
00044
template <
class TInputImage,
class TOutputImage>
00045 class ITK_EXPORT NoiseImageFilter :
00046
public ImageToImageFilter< TInputImage, TOutputImage >
00047 {
00048
public:
00050
itkStaticConstMacro(InputImageDimension,
unsigned int,
00051 TInputImage::ImageDimension);
00052
itkStaticConstMacro(OutputImageDimension,
unsigned int,
00053 TOutputImage::ImageDimension);
00054
00056
typedef TInputImage
InputImageType;
00057 typedef TOutputImage
OutputImageType;
00058
00060
typedef NoiseImageFilter
Self;
00061 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00062 typedef SmartPointer<Self> Pointer;
00063 typedef SmartPointer<const Self> ConstPointer;
00064
00066
itkNewMacro(
Self);
00067
00069
itkTypeMacro(NoiseImageFilter,
ImageToImageFilter);
00070
00072
typedef typename InputImageType::PixelType
InputPixelType;
00073 typedef typename OutputImageType::PixelType
OutputPixelType;
00074 typedef typename NumericTraits<InputPixelType>::RealType
InputRealType;
00075
00076
typedef typename InputImageType::RegionType
InputImageRegionType;
00077 typedef typename OutputImageType::RegionType
OutputImageRegionType;
00078
00079
typedef typename InputImageType::SizeType
InputSizeType;
00080
00084
itkSetMacro(Radius,
InputSizeType);
00085
00087
itkGetConstReferenceMacro(Radius,
InputSizeType);
00088
00095
virtual void GenerateInputRequestedRegion() throw(
InvalidRequestedRegionError);
00096
00097 protected:
00098 NoiseImageFilter();
00099 virtual ~NoiseImageFilter() {}
00100 void PrintSelf(std::ostream& os,
Indent indent)
const;
00101
00112
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00113
int threadId );
00114
00115
private:
00116 NoiseImageFilter(
const Self&);
00117
void operator=(
const Self&);
00118
00119
InputSizeType m_Radius;
00120 };
00121
00122 }
00123
00124
#ifndef ITK_MANUAL_INSTANTIATION
00125
#include "itkNoiseImageFilter.txx"
00126
#endif
00127
00128
#endif