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);
00052
00054 typedef TInputImage InputImageType;
00055 typedef TOutputImage OutputImageType;
00056
00058 typedef MeanImageFilter Self;
00059 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00060 typedef SmartPointer<Self> Pointer;
00061 typedef SmartPointer<const Self> ConstPointer;
00062
00064 itkNewMacro(Self);
00065
00067 itkTypeMacro(MeanImageFilter, ImageToImageFilter);
00068
00070 typedef typename InputImageType::PixelType InputPixelType;
00071 typedef typename OutputImageType::PixelType OutputPixelType;
00072 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00073
00074 typedef typename InputImageType::RegionType InputImageRegionType;
00075 typedef typename OutputImageType::RegionType OutputImageRegionType;
00076
00077 typedef typename InputImageType::SizeType InputSizeType;
00078
00080 itkSetMacro(Radius, InputSizeType);
00081
00083 itkGetConstReferenceMacro(Radius, InputSizeType);
00084
00091 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00092
00093 #ifdef ITK_USE_CONCEPT_CHECKING
00094
00095 itkConceptMacro(InputHasNumericTraitsCheck,
00096 (Concept::HasNumericTraits<InputPixelType>));
00097
00099 #endif
00100
00101 protected:
00102 MeanImageFilter();
00103 virtual ~MeanImageFilter() {}
00104 void PrintSelf(std::ostream& os, Indent indent) const;
00105
00116 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00117 int threadId );
00118
00119 private:
00120 MeanImageFilter(const Self&);
00121 void operator=(const Self&);
00122
00123 InputSizeType m_Radius;
00124 };
00125
00126 }
00127
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkMeanImageFilter.txx"
00130 #endif
00131
00132 #endif
00133