1 #ifndef clitkConditionalBinaryDilateImageFilter_h
2 #define clitkConditionalBinaryDilateImageFilter_h
4 /* =================================================
5 * @file clitkConditionalBinaryDilateImageFilter.h
11 ===================================================*/
15 #include "clitkCommon.h"
20 #include "itkBinaryMorphologyImageFilter.h"
22 #include "itkNumericTraits.h"
23 #include "itkNeighborhoodIterator.h"
24 #include "itkConstNeighborhoodIterator.h"
25 #include "itkNeighborhood.h"
26 #include "itkImageBoundaryCondition.h"
27 #include "itkImageRegionIterator.h"
28 #include "itkConceptChecking.h"
33 template <class TInputImage, class TOutputImage, class TKernel>
34 class ITK_EXPORT ConditionalBinaryDilateImageFilter :
35 public itk::BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
38 /** Extract dimension from input and output image. */
39 itkStaticConstMacro(InputImageDimension, unsigned int,
40 TInputImage::ImageDimension);
41 itkStaticConstMacro(OutputImageDimension, unsigned int,
42 TOutputImage::ImageDimension);
44 /** Extract the dimension of the kernel */
45 itkStaticConstMacro(KernelDimension, unsigned int,
46 TKernel::NeighborhoodDimension);
48 /** Convenient typedefs for simplifying declarations. */
49 typedef TInputImage InputImageType;
50 typedef TOutputImage OutputImageType;
51 typedef TKernel KernelType;
54 /** Standard class typedefs. */
55 typedef ConditionalBinaryDilateImageFilter Self;
56 typedef itk::BinaryMorphologyImageFilter<InputImageType, OutputImageType,
57 KernelType> Superclass;
58 typedef itk::SmartPointer<Self> Pointer;
59 typedef itk::SmartPointer<const Self> ConstPointer;
61 /** Method for creation through the object factory. */
64 /** Run-time type information (and related methods). */
65 itkTypeMacro(ConditionalBinaryDilateImageFilter, BinaryMorphologyImageFilter);
67 /** Kernel (structuring element) iterator. */
68 typedef typename KernelType::ConstIterator KernelIteratorType;
70 /** Image typedef support. */
71 typedef typename InputImageType::PixelType InputPixelType;
72 typedef typename OutputImageType::PixelType OutputPixelType;
73 typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
74 typedef typename InputImageType::OffsetType OffsetType;
75 typedef typename InputImageType::IndexType IndexType;
77 typedef typename InputImageType::RegionType InputImageRegionType;
78 typedef typename OutputImageType::RegionType OutputImageRegionType;
79 typedef typename InputImageType::SizeType InputSizeType;
81 /** Set the value in the image to consider as "foreground". Defaults to
82 * maximum value of PixelType. This is an alias to the
83 * ForegroundValue in the superclass. */
84 void SetDilateValue(const InputPixelType& value)
85 { this->SetForegroundValue( value ); }
87 /** Get the value in the image considered as "foreground". Defaults to
88 * maximum value of PixelType. This is an alias to the
89 * ForegroundValue in the superclass. */
90 InputPixelType GetDilateValue() const
91 { return this->GetForegroundValue(); }
94 ConditionalBinaryDilateImageFilter();
95 virtual ~ConditionalBinaryDilateImageFilter(){}
96 void PrintSelf(std::ostream& os, itk::Indent indent) const;
100 // type inherited from the superclass
101 typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer;
104 ConditionalBinaryDilateImageFilter(const Self&); //purposely not implemented
105 void operator=(const Self&); //purposely not implemented
109 } // end namespace itk
111 #ifndef ITK_MANUAL_INSTANTIATION
112 #include "clitkConditionalBinaryDilateImageFilter.txx"