00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNonThreadedShrinkImageFilter_h
00018 #define __itkNonThreadedShrinkImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00040 template <class TInputImage, class TOutputImage>
00041 class ITK_EXPORT NonThreadedShrinkImageFilter:
00042 public ImageToImageFilter<TInputImage,TOutputImage>
00043 {
00044 public:
00046 typedef NonThreadedShrinkImageFilter Self;
00047 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro(NonThreadedShrinkImageFilter, ImageToImageFilter);
00056
00058 typedef TOutputImage OutputImageType;
00059 typedef TInputImage InputImageType;
00060 typedef typename OutputImageType::Pointer OutputImagePointer;
00061 typedef typename InputImageType::Pointer InputImagePointer;
00062 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00063
00065 typedef typename TOutputImage::RegionType OutputImageRegionType;
00066
00068 itkStaticConstMacro(ImageDimension, unsigned int,
00069 TInputImage::ImageDimension );
00070
00073 void SetShrinkFactors( unsigned int factors[] );
00074 void SetShrinkFactors( unsigned int factor );
00075 void SetShrinkFactor( unsigned int i, unsigned int factor )
00076 {
00077 m_ShrinkFactors[i] = factor;
00078 }
00079
00081 const unsigned int * GetShrinkFactors() const
00082 { return m_ShrinkFactors; }
00083
00091 virtual void GenerateOutputInformation();
00092
00099 virtual void GenerateInputRequestedRegion();
00100
00101 protected:
00102 NonThreadedShrinkImageFilter();
00103 ~NonThreadedShrinkImageFilter() {};
00104 void PrintSelf(std::ostream& os, Indent indent) const;
00105
00106 void GenerateData();
00107
00108 private:
00109 NonThreadedShrinkImageFilter(const Self&);
00110 void operator=(const Self&);
00111
00112 unsigned int m_ShrinkFactors[ImageDimension];
00113 };
00114
00115 }
00116
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118 #include "itkNonThreadedShrinkImageFilter.txx"
00119 #endif
00120
00121 #endif