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
00038 template <class TInputImage, class TOutputImage>
00039 class ITK_EXPORT ConstantPadImageFilter:
00040 public PadImageFilter<TInputImage,TOutputImage>
00041 {
00042 public:
00044 typedef ConstantPadImageFilter Self;
00045 typedef PadImageFilter<TInputImage,TOutputImage> Superclass;
00046 typedef SmartPointer<Self> Pointer;
00047 typedef SmartPointer<const Self> ConstPointer;
00048
00050 itkNewMacro(Self);
00051
00053 itkTypeMacro(ConstantPadImageFilter, PadImageFilter);
00054
00056 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00057 typedef typename Superclass::InputImageRegionType InputImageRegionType;
00058
00060 typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00061 typedef typename Superclass::InputImagePixelType InputImagePixelType;
00062
00064 typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
00065 typedef typename Superclass::InputImageIndexType InputImageIndexType;
00066 typedef typename Superclass::OutputImageSizeType OutputImageSizeType;
00067 typedef typename Superclass::InputImageSizeType InputImageSizeType;
00068
00070 itkStaticConstMacro(ImageDimension, unsigned int,
00071 TInputImage::ImageDimension);
00072
00074 itkSetMacro(Constant, OutputImagePixelType);
00075 itkGetMacro(Constant, OutputImagePixelType);
00076
00077 protected:
00078 ConstantPadImageFilter();
00079 ~ConstantPadImageFilter() {};
00080 void PrintSelf(std::ostream& os, Indent indent) const;
00081
00091 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00092 int threadId );
00093
00099 int GenerateNextRegion(long *regIndices, long *regLimit,
00100 OutputImageIndexType *indices,
00101 OutputImageSizeType *sizes,
00102 OutputImageRegionType& outputRegion);
00103
00104 private:
00105 ConstantPadImageFilter(const Self&);
00106 void operator=(const Self&);
00107
00108 OutputImagePixelType m_Constant;
00109 };
00110
00111
00112 }
00113
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkConstantPadImageFilter.txx"
00116 #endif
00117
00118 #endif