Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkVotingBinaryHoleFillingImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVotingBinaryHoleFillingImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-17 20:50:03 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00075 
00082   itkGetConstReferenceMacro( MajorityThreshold, unsigned int );
00083   itkSetMacro( MajorityThreshold, unsigned int );
00085 
00086 
00088   itkGetConstReferenceMacro( NumberOfPixelsChanged, unsigned int );
00089 
00090 #ifdef ITK_USE_CONCEPT_CHECKING
00091 
00092   itkConceptMacro(IntConvertibleToInputCheck,
00093                  (Concept::Convertible<int, InputPixelType>));
00094   itkConceptMacro(UnsignedIntConvertibleToInputCheck,
00095                   (Concept::Convertible<unsigned int, InputPixelType>));
00096 
00098 #endif
00099 
00100 protected:
00101   VotingBinaryHoleFillingImageFilter();
00102   virtual ~VotingBinaryHoleFillingImageFilter() {}
00103   void PrintSelf(std::ostream& os, Indent indent) const;
00104 
00108   void SetBirthThreshold( const unsigned int value ) 
00109     { this->Superclass::SetBirthThreshold( value );  }
00110   void SetSurvivalThreshold( const unsigned int value ) 
00111     { this->Superclass::SetSurvivalThreshold( value );  }
00113 
00114 
00125   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00126                             int threadId );
00127 
00130   void BeforeThreadedGenerateData();
00131   void AfterThreadedGenerateData();
00133 
00134 private:
00135   VotingBinaryHoleFillingImageFilter(const Self&); //purposely not implemented
00136   void operator=(const Self&); //purposely not implemented
00137 
00138   unsigned int m_MajorityThreshold;
00139 
00140   unsigned int m_NumberOfPixelsChanged;
00141 
00142   // Auxiliary array for multi-threading
00143   Array<unsigned int>     m_Count;
00144 };
00145   
00146 } // end namespace itk
00147 
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #include "itkVotingBinaryHoleFillingImageFilter.txx"
00150 #endif
00151 
00152 #endif
00153 

Generated at Tue Sep 15 05:26:49 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000