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);
00084
00087 #ifdef ITK_USE_CONCEPT_CHECKING
00088
00090 itkConceptMacro(ImageDimensionCheck,
00091 (Concept::SameDimensionOrMinusOne<itkGetStaticConstMacro(InputImageDimension),
00092 itkGetStaticConstMacro(OutputImageDimension)>));
00093
00095 #endif
00096
00100 itkGetMacro( AccumulateDimension, unsigned int );
00101 itkSetMacro( AccumulateDimension, unsigned int );
00103
00109 itkSetMacro( Average, bool );
00110 itkGetMacro( Average, bool );
00111 itkBooleanMacro(Average);
00113
00114
00115
00116 protected:
00117 AccumulateImageFilter();
00118 virtual ~AccumulateImageFilter() {};
00119 void PrintSelf(std::ostream& os, Indent indent) const;
00120
00122 virtual void GenerateOutputInformation();
00123
00125 virtual void GenerateInputRequestedRegion();
00126
00131 void GenerateData(void);
00132
00133 private:
00134 AccumulateImageFilter(const Self&);
00135 void operator=(const Self&);
00136
00137 unsigned int m_AccumulateDimension;
00138 bool m_Average;
00139
00140 };
00141
00142 }
00143
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkAccumulateImageFilter.txx"
00146 #endif
00147
00148 #endif
00149
00150
00151