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: 2010-04-01 20:51:27 $
00007   Version:   $Revision: 1.11 $
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   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&); //purposely not implemented
00137   void operator=(const Self&); //purposely not implemented
00138 
00139   unsigned int            m_MajorityThreshold;
00140 
00141   SizeValueType           m_NumberOfPixelsChanged;
00142 
00143   // Auxiliary array for multi-threading
00144   Array<SizeValueType>    m_Count;
00145 };
00146   
00147 } // end namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkVotingBinaryHoleFillingImageFilter.txx"
00151 #endif
00152 
00153 #endif
00154 

Generated at Mon Jul 12 2010 20:16:21 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000