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 itkStaticConstMacro(OutputImageDimension, unsigned int,
00071 TOutputImage::ImageDimension );
00073
00076 void SetShrinkFactors( unsigned int factors[] );
00077 void SetShrinkFactors( unsigned int factor );
00078 void SetShrinkFactor( unsigned int i, unsigned int factor )
00079 {
00080 m_ShrinkFactors[i] = factor;
00081 }
00083
00085 const unsigned int * GetShrinkFactors() const
00086 { return m_ShrinkFactors; }
00087
00095 virtual void GenerateOutputInformation();
00096
00103 virtual void GenerateInputRequestedRegion();
00104
00105 #ifdef ITK_USE_CONCEPT_CHECKING
00106
00107 itkConceptMacro(InputConvertibleToOutputCheck,
00108 (Concept::Convertible<typename TInputImage::PixelType,
00109 typename TOutputImage::PixelType>));
00110 itkConceptMacro(SameDimensionCheck,
00111 (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00112
00114 #endif
00115
00116 protected:
00117 NonThreadedShrinkImageFilter();
00118 ~NonThreadedShrinkImageFilter() {};
00119 void PrintSelf(std::ostream& os, Indent indent) const;
00120
00121 void GenerateData();
00122
00123 private:
00124 NonThreadedShrinkImageFilter(const Self&);
00125 void operator=(const Self&);
00126
00127 unsigned int m_ShrinkFactors[ImageDimension];
00128 };
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkNonThreadedShrinkImageFilter.txx"
00134 #endif
00135
00136 #endif
00137