00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBinaryDilateImageFilter_h
00018 #define __itkBinaryDilateImageFilter_h
00019
00020 #include <vector>
00021 #include <queue>
00022 #include "itkBinaryMorphologyImageFilter.h"
00023 #include "itkImage.h"
00024 #include "itkNumericTraits.h"
00025 #include "itkNeighborhoodIterator.h"
00026 #include "itkConstNeighborhoodIterator.h"
00027 #include "itkNeighborhood.h"
00028 #include "itkImageBoundaryCondition.h"
00029 #include "itkImageRegionIterator.h"
00030 #include "itkConceptChecking.h"
00031
00032 namespace itk
00033 {
00102 template <class TInputImage, class TOutputImage, class TKernel>
00103 class ITK_EXPORT BinaryDilateImageFilter :
00104 public BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
00105 {
00106 public:
00108 itkStaticConstMacro(InputImageDimension, unsigned int,
00109 TInputImage::ImageDimension);
00110 itkStaticConstMacro(OutputImageDimension, unsigned int,
00111 TOutputImage::ImageDimension);
00112
00114 itkStaticConstMacro(KernelDimension, unsigned int,
00115 TKernel::NeighborhoodDimension);
00116
00118 typedef TInputImage InputImageType;
00119 typedef TOutputImage OutputImageType;
00120 typedef TKernel KernelType;
00121
00122
00124 typedef BinaryDilateImageFilter Self;
00125 typedef BinaryMorphologyImageFilter<InputImageType, OutputImageType, KernelType> Superclass;
00126 typedef SmartPointer<Self> Pointer;
00127 typedef SmartPointer<const Self> ConstPointer;
00128
00130 itkNewMacro(Self);
00131
00133 itkTypeMacro(BinaryDilateImageFilter, BinaryMorphologyImageFilter);
00134
00136 typedef typename KernelType::ConstIterator KernelIteratorType ;
00137
00139 typedef typename InputImageType::PixelType InputPixelType;
00140 typedef typename OutputImageType::PixelType OutputPixelType;
00141 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00142 typedef typename InputImageType::OffsetType OffsetType;
00143 typedef typename InputImageType::IndexType IndexType;
00144
00145 typedef typename InputImageType::RegionType InputImageRegionType;
00146 typedef typename OutputImageType::RegionType OutputImageRegionType;
00147 typedef typename InputImageType::SizeType InputSizeType;
00148
00152 void SetDilateValue(const InputPixelType& value)
00153 { this->SetForegroundValue( value ); }
00154
00158 InputPixelType GetDilateValue() const
00159 { return this->GetForegroundValue(); }
00160
00161 protected:
00162 BinaryDilateImageFilter();
00163 virtual ~BinaryDilateImageFilter(){}
00164 void PrintSelf(std::ostream& os, Indent indent) const;
00165
00176 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00177 int threadId );
00178
00179 void BeforeThreadedGenerateData();
00180
00181
00182 typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer;
00183 typedef typename Superclass::BorderCellContainer BorderCellContainer;
00184 typedef typename Superclass::BorderCell BorderCell;
00185
00186 private:
00187 BinaryDilateImageFilter(const Self&);
00188 void operator=(const Self&);
00189
00190 };
00191
00192 }
00193
00194 #ifndef ITK_MANUAL_INSTANTIATION
00195 #include "itkBinaryDilateImageFilter.txx"
00196 #endif
00197
00198 #endif