00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAccumulateImageFilter_h
00018 #define __itkAccumulateImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkConceptChecking.h"
00022
00023 namespace itk
00024 {
00025
00051 template <class TInputImage, class TOutputImage>
00052 class ITK_EXPORT AccumulateImageFilter : public ImageToImageFilter<TInputImage,TOutputImage>
00053 {
00054 public:
00056 typedef AccumulateImageFilter Self;
00057 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00062 itkNewMacro(Self);
00063
00065 itkTypeMacro(AccumulateImageFilter, ImageToImageFilter);
00066
00068 typedef TInputImage InputImageType;
00069 typedef typename InputImageType::Pointer InputImagePointer;
00070 typedef typename InputImageType::RegionType InputImageRegionType;
00071 typedef typename InputImageType::PixelType InputImagePixelType;
00072 typedef TOutputImage OutputImageType;
00073 typedef typename OutputImageType::Pointer OutputImagePointer;
00074 typedef typename OutputImageType::RegionType OutputImageRegionType;
00075 typedef typename OutputImageType::PixelType OutputImagePixelType;
00076
00077
00079 itkStaticConstMacro(InputImageDimension, unsigned int,
00080 TInputImage::ImageDimension);
00081 itkStaticConstMacro(OutputImageDimension, unsigned int,
00082 TOutputImage::ImageDimension);
00083
00085 itkConceptMacro(ImageDimensionCheck,
00086 (Concept::SameDimension<itkGetStaticConstMacro(InputImageDimension),
00087 itkGetStaticConstMacro(OutputImageDimension)>));
00088
00092 itkGetMacro( AccumulateDimension, unsigned int );
00093 itkSetMacro( AccumulateDimension, unsigned int );
00094
00100 itkSetMacro( Average, bool );
00101 itkGetMacro( Average, bool );
00102 itkBooleanMacro(Average);
00103
00104
00105
00106 protected:
00107 AccumulateImageFilter();
00108 virtual ~AccumulateImageFilter() {};
00109 void PrintSelf(std::ostream& os, Indent indent) const;
00110
00112 virtual void GenerateOutputInformation();
00113
00115 virtual void GenerateInputRequestedRegion();
00116
00121 void GenerateData(void);
00122
00123 private:
00124 AccumulateImageFilter(const Self&);
00125 void operator=(const Self&);
00126
00127 unsigned int m_AccumulateDimension;
00128 bool m_Average;
00129
00130 };
00131
00132 }
00133
00134 #ifndef ITK_MANUAL_INSTANTIATION
00135 #include "itkAccumulateImageFilter.txx"
00136 #endif
00137
00138 #endif
00139
00140