Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGrayscaleConnectedOpeningImageFilter_h
00018 #define __itkGrayscaleConnectedOpeningImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00043 template<class TInputImage, class TOutputImage>
00044 class ITK_EXPORT GrayscaleConnectedOpeningImageFilter :
00045 public ImageToImageFilter<TInputImage, TOutputImage>
00046 {
00047 public:
00049 typedef GrayscaleConnectedOpeningImageFilter Self;
00050 typedef ImageToImageFilter<TInputImage, TOutputImage>
00051 Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 typedef TInputImage InputImageType;
00057 typedef typename InputImageType::Pointer InputImagePointer;
00058 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00059 typedef typename InputImageType::RegionType InputImageRegionType;
00060 typedef typename InputImageType::PixelType InputImagePixelType;
00061 typedef typename InputImageRegionType::IndexType InputImageIndexType;
00062 typedef TOutputImage OutputImageType;
00063 typedef typename OutputImageType::Pointer OutputImagePointer;
00064 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00065 typedef typename OutputImageType::RegionType OutputImageRegionType;
00066 typedef typename OutputImageType::PixelType OutputImagePixelType;
00067
00069 itkStaticConstMacro(InputImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071 itkStaticConstMacro(OutputImageDimension, unsigned int,
00072 TOutputImage::ImageDimension);
00074
00076 itkNewMacro(Self);
00077
00079 itkTypeMacro(GrayscaleConnectedOpeningImageFilter,
00080 ImageToImageFilter);
00081
00083 itkSetMacro(Seed, InputImageIndexType);
00084 itkGetConstMacro(Seed, InputImageIndexType);
00086
00091 unsigned long GetNumberOfIterationsUsed()
00092 {
00093 itkLegacyBodyMacro(itk::GrayscaleConnectedOpeningImageFilter::GetNumberOfIterationsUsed, 2.2);
00094 return m_NumberOfIterationsUsed;
00095 };
00097
00104 itkSetMacro(FullyConnected, bool);
00105 itkGetConstReferenceMacro(FullyConnected, bool);
00106 itkBooleanMacro(FullyConnected);
00108
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110
00111 itkConceptMacro(InputEqualityComparableCheck,
00112 (Concept::EqualityComparable<InputImagePixelType>));
00113 itkConceptMacro(InputConvertibleToOutputCheck,
00114 (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00115 itkConceptMacro(InputOStreamWritableCheck,
00116 (Concept::OStreamWritable<InputImagePixelType>));
00117
00119 #endif
00120
00121 protected:
00122 GrayscaleConnectedOpeningImageFilter();
00123 ~GrayscaleConnectedOpeningImageFilter() {};
00124 void PrintSelf(std::ostream& os, Indent indent) const;
00125
00129 void GenerateInputRequestedRegion();
00130
00132 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00133
00136 void GenerateData();
00137
00138
00139 private:
00140 GrayscaleConnectedOpeningImageFilter(const Self&);
00141 void operator=(const Self&);
00142
00143 unsigned long m_NumberOfIterationsUsed;
00144 InputImageIndexType m_Seed;
00145
00146 bool m_FullyConnected;
00147
00148 };
00149
00150 }
00151
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkGrayscaleConnectedOpeningImageFilter.txx"
00154 #endif
00155
00156 #endif
00157