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 itkStaticConstMacro(OutputImageDimension, unsigned int,
00073 TOutputImage::ImageDimension);
00075
00077 itkSetMacro(Constant, OutputImagePixelType);
00078 itkGetMacro(Constant, OutputImagePixelType);
00080
00081 #ifdef ITK_USE_CONCEPT_CHECKING
00082
00083 itkConceptMacro(OutputEqualityComparableCheck,
00084 (Concept::EqualityComparable<OutputImagePixelType>));
00085 itkConceptMacro(InputConvertibleToOutputCheck,
00086 (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00087 itkConceptMacro(SameDimensionCheck,
00088 (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00089 itkConceptMacro(OutputOStreamWritableCheck,
00090 (Concept::OStreamWritable<OutputImagePixelType>));
00091
00093 #endif
00094
00095 protected:
00096 ConstantPadImageFilter();
00097 ~ConstantPadImageFilter() {};
00098 void PrintSelf(std::ostream& os, Indent indent) const;
00099
00109 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00110 int threadId );
00111
00117 int GenerateNextRegion(long *regIndices, long *regLimit,
00118 OutputImageIndexType *indices,
00119 OutputImageSizeType *sizes,
00120 OutputImageRegionType& outputRegion);
00121
00122 private:
00123 ConstantPadImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00126 OutputImagePixelType m_Constant;
00127 };
00128
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkConstantPadImageFilter.txx"
00134 #endif
00135
00136 #endif
00137