00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMeanImageFilter_h
00018 #define __itkMeanImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkNumericTraits.h"
00023
00024 namespace itk
00025 {
00041 template <class TInputImage, class TOutputImage>
00042 class ITK_EXPORT MeanImageFilter :
00043 public ImageToImageFilter< TInputImage, TOutputImage >
00044 {
00045 public:
00047 itkStaticConstMacro(InputImageDimension, unsigned int,
00048 TInputImage::ImageDimension);
00049 itkStaticConstMacro(OutputImageDimension, unsigned int,
00050 TOutputImage::ImageDimension);
00051
00053 typedef TInputImage InputImageType;
00054 typedef TOutputImage OutputImageType;
00055
00057 typedef MeanImageFilter Self;
00058 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00059 typedef SmartPointer<Self> Pointer;
00060 typedef SmartPointer<const Self> ConstPointer;
00061
00063 itkNewMacro(Self);
00064
00066 itkTypeMacro(MeanImageFilter, ImageToImageFilter);
00067
00069 typedef typename InputImageType::PixelType InputPixelType;
00070 typedef typename OutputImageType::PixelType OutputPixelType;
00071 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00072
00073 typedef typename InputImageType::RegionType InputImageRegionType;
00074 typedef typename OutputImageType::RegionType OutputImageRegionType;
00075
00076 typedef typename InputImageType::SizeType InputSizeType;
00077
00079 itkSetMacro(Radius, InputSizeType);
00080
00082 itkGetConstReferenceMacro(Radius, InputSizeType);
00083
00090 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00091
00092 protected:
00093 MeanImageFilter();
00094 virtual ~MeanImageFilter() {}
00095 void PrintSelf(std::ostream& os, Indent indent) const;
00096
00107 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00108 int threadId );
00109
00110 private:
00111 MeanImageFilter(const Self&);
00112 void operator=(const Self&);
00113
00114 InputSizeType m_Radius;
00115 };
00116
00117 }
00118
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkMeanImageFilter.txx"
00121 #endif
00122
00123 #endif