00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkConstantPadImageFilter_h
00018 #define __itkConstantPadImageFilter_h
00019
00020 #include "itkPadImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00037 template <class TInputImage, class TOutputImage>
00038 class ITK_EXPORT ConstantPadImageFilter:
00039 public PadImageFilter<TInputImage,TOutputImage>
00040 {
00041 public:
00043 typedef ConstantPadImageFilter Self;
00044 typedef PadImageFilter<TInputImage,TOutputImage> Superclass;
00045 typedef SmartPointer<Self> Pointer;
00046 typedef SmartPointer<const Self> ConstPointer;
00047
00049 itkNewMacro(Self);
00050
00052 itkTypeMacro(ConstantPadImageFilter, PadImageFilter);
00053
00055 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00056 typedef typename Superclass::InputImageRegionType InputImageRegionType;
00057
00059 typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00060 typedef typename Superclass::InputImagePixelType InputImagePixelType;
00061
00063 typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
00064 typedef typename Superclass::InputImageIndexType InputImageIndexType;
00065 typedef typename Superclass::OutputImageSizeType OutputImageSizeType;
00066 typedef typename Superclass::InputImageSizeType InputImageSizeType;
00067
00069 itkStaticConstMacro(ImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071
00073 itkSetMacro(Constant, OutputImagePixelType);
00074 itkGetMacro(Constant, OutputImagePixelType);
00075
00076 protected:
00077 ConstantPadImageFilter();
00078 ~ConstantPadImageFilter() {};
00079 void PrintSelf(std::ostream& os, Indent indent) const;
00080
00090 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00091 int threadId );
00092
00098 int GenerateNextRegion(long *regIndices, long *regLimit,
00099 OutputImageIndexType *indices,
00100 OutputImageSizeType *sizes,
00101 OutputImageRegionType& outputRegion);
00102
00103 private:
00104 ConstantPadImageFilter(const Self&);
00105 void operator=(const Self&);
00106
00107 OutputImagePixelType m_Constant;
00108 };
00109
00110
00111 }
00112
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkConstantPadImageFilter.txx"
00115 #endif
00116
00117 #endif