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
00053 template <class TInputImage, class TOutputImage>
00054 class ITK_EXPORT AccumulateImageFilter : public ImageToImageFilter<TInputImage,TOutputImage>
00055 {
00056 public:
00058 typedef AccumulateImageFilter Self;
00059 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00060 typedef SmartPointer<Self> Pointer;
00061 typedef SmartPointer<const Self> ConstPointer;
00062
00064 itkNewMacro(Self);
00065
00067 itkTypeMacro(AccumulateImageFilter, ImageToImageFilter);
00068
00070 typedef TInputImage InputImageType;
00071 typedef typename InputImageType::Pointer InputImagePointer;
00072 typedef typename InputImageType::RegionType InputImageRegionType;
00073 typedef typename InputImageType::PixelType InputImagePixelType;
00074 typedef TOutputImage OutputImageType;
00075 typedef typename OutputImageType::Pointer OutputImagePointer;
00076 typedef typename OutputImageType::RegionType OutputImageRegionType;
00077 typedef typename OutputImageType::PixelType OutputImagePixelType;
00078
00079
00081 itkStaticConstMacro(InputImageDimension, unsigned int,
00082 TInputImage::ImageDimension);
00083 itkStaticConstMacro(OutputImageDimension, unsigned int,
00084 TOutputImage::ImageDimension);
00086
00089 #ifdef ITK_USE_CONCEPT_CHECKING
00090
00092 itkConceptMacro(ImageDimensionCheck,
00093 (Concept::SameDimensionOrMinusOne<itkGetStaticConstMacro(InputImageDimension),
00094 itkGetStaticConstMacro(OutputImageDimension)>));
00095
00097 #endif
00098
00102 itkGetMacro( AccumulateDimension, unsigned int );
00103 itkSetMacro( AccumulateDimension, unsigned int );
00105
00111 itkSetMacro( Average, bool );
00112 itkGetMacro( Average, bool );
00113 itkBooleanMacro(Average);
00115
00116
00117
00118 protected:
00119 AccumulateImageFilter();
00120 virtual ~AccumulateImageFilter() {};
00121 void PrintSelf(std::ostream& os, Indent indent) const;
00122
00124 virtual void GenerateOutputInformation();
00125
00127 virtual void GenerateInputRequestedRegion();
00128
00133 void GenerateData(void);
00134
00135 private:
00136 AccumulateImageFilter(const Self&);
00137 void operator=(const Self&);
00138
00139 unsigned int m_AccumulateDimension;
00140 bool m_Average;
00141
00142 };
00143
00144 }
00145
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkAccumulateImageFilter.txx"
00148 #endif
00149
00150 #endif
00151
00152
00153