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 __itkVotingBinaryHoleFillingImageFilter_h
00018 #define __itkVotingBinaryHoleFillingImageFilter_h
00019
00020 #include "itkVotingBinaryImageFilter.h"
00021 #include "itkArray.h"
00022
00023 namespace itk
00024 {
00038 template <class TInputImage, class TOutputImage>
00039 class ITK_EXPORT VotingBinaryHoleFillingImageFilter :
00040 public VotingBinaryImageFilter< TInputImage, TOutputImage >
00041 {
00042 public:
00044 itkStaticConstMacro(InputImageDimension, unsigned int,
00045 TInputImage::ImageDimension);
00046 itkStaticConstMacro(OutputImageDimension, unsigned int,
00047 TOutputImage::ImageDimension);
00049
00051 typedef TInputImage InputImageType;
00052 typedef TOutputImage OutputImageType;
00053
00055 typedef VotingBinaryHoleFillingImageFilter Self;
00056 typedef VotingBinaryImageFilter< InputImageType, OutputImageType> Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00061 itkNewMacro(Self);
00062
00064 itkTypeMacro(VotingBinaryHoleFillingImageFilter, VotingBinaryImageFilter);
00065
00067 typedef typename InputImageType::PixelType InputPixelType;
00068 typedef typename OutputImageType::PixelType OutputPixelType;
00069
00070 typedef typename InputImageType::RegionType InputImageRegionType;
00071 typedef typename OutputImageType::RegionType OutputImageRegionType;
00072
00073 typedef typename InputImageType::SizeType InputSizeType;
00074 typedef typename InputImageType::SizeValueType SizeValueType;
00075
00076
00083 itkGetConstReferenceMacro( MajorityThreshold, unsigned int );
00084 itkSetMacro( MajorityThreshold, unsigned int );
00086
00087
00089 itkGetConstReferenceMacro( NumberOfPixelsChanged, SizeValueType );
00090
00091 #ifdef ITK_USE_CONCEPT_CHECKING
00092
00093 itkConceptMacro(IntConvertibleToInputCheck,
00094 (Concept::Convertible<int, InputPixelType>));
00095 itkConceptMacro(UnsignedIntConvertibleToInputCheck,
00096 (Concept::Convertible<unsigned int, InputPixelType>));
00097
00099 #endif
00100
00101 protected:
00102 VotingBinaryHoleFillingImageFilter();
00103 virtual ~VotingBinaryHoleFillingImageFilter() {}
00104 void PrintSelf(std::ostream& os, Indent indent) const;
00105
00109 void SetBirthThreshold( const unsigned int value )
00110 { this->Superclass::SetBirthThreshold( value ); }
00111 void SetSurvivalThreshold( const unsigned int value )
00112 { this->Superclass::SetSurvivalThreshold( value ); }
00114
00115
00126 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00127 int threadId );
00128
00131 void BeforeThreadedGenerateData();
00132 void AfterThreadedGenerateData();
00134
00135 private:
00136 VotingBinaryHoleFillingImageFilter(const Self&);
00137 void operator=(const Self&);
00138
00139 unsigned int m_MajorityThreshold;
00140
00141 SizeValueType m_NumberOfPixelsChanged;
00142
00143
00144 Array<SizeValueType> m_Count;
00145 };
00146
00147 }
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkVotingBinaryHoleFillingImageFilter.txx"
00151 #endif
00152
00153 #endif
00154