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: 2004/12/16 17:24:32 $
00007   Version:   $Revision: 1.5 $
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 
00022 namespace itk
00023 {
00037 template <class TInputImage, class TOutputImage>
00038 class ITK_EXPORT VotingBinaryHoleFillingImageFilter :
00039     public VotingBinaryImageFilter< TInputImage, TOutputImage >
00040 {
00041 public:
00043   itkStaticConstMacro(InputImageDimension, unsigned int,
00044                       TInputImage::ImageDimension);
00045   itkStaticConstMacro(OutputImageDimension, unsigned int,
00046                       TOutputImage::ImageDimension);
00047 
00049   typedef TInputImage InputImageType;
00050   typedef TOutputImage OutputImageType;
00051 
00053   typedef VotingBinaryHoleFillingImageFilter Self;
00054   typedef VotingBinaryImageFilter< InputImageType, OutputImageType> Superclass;
00055   typedef SmartPointer<Self> Pointer;
00056   typedef SmartPointer<const Self>  ConstPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(VotingBinaryHoleFillingImageFilter, VotingBinaryImageFilter);
00063   
00065   typedef typename InputImageType::PixelType InputPixelType;
00066   typedef typename OutputImageType::PixelType OutputPixelType;
00067 
00068   typedef typename InputImageType::RegionType InputImageRegionType;
00069   typedef typename OutputImageType::RegionType OutputImageRegionType;
00070 
00071   typedef typename InputImageType::SizeType InputSizeType;
00072 
00073 
00080   itkGetConstReferenceMacro( MajorityThreshold, unsigned int );
00081   itkSetMacro( MajorityThreshold, unsigned int );
00082 
00083 
00085   itkGetConstReferenceMacro( NumberOfPixelsChanged, unsigned int );
00086 
00087 protected:
00088   VotingBinaryHoleFillingImageFilter();
00089   virtual ~VotingBinaryHoleFillingImageFilter() {}
00090   void PrintSelf(std::ostream& os, Indent indent) const;
00091 
00095   void SetBirthThreshold( const InputPixelType value ) 
00096             { this->Superclass::SetBirthThreshold( value );  }
00097   void SetSurvivalThreshold( const InputPixelType value ) 
00098             { this->Superclass::SetSurvivalThreshold( value );  }
00099 
00100 
00111   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00112                             int threadId );
00113 
00116   void BeforeThreadedGenerateData();
00117   void AfterThreadedGenerateData();
00118   
00119 private:
00120   VotingBinaryHoleFillingImageFilter(const Self&); //purposely not implemented
00121   void operator=(const Self&); //purposely not implemented
00122 
00123   unsigned int m_MajorityThreshold;
00124 
00125   unsigned int m_NumberOfPixelsChanged;
00126 
00127   // Auxiliary array for multi-threading
00128   Array<unsigned int>     m_Count;
00129 };
00130   
00131 } // end namespace itk
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkVotingBinaryHoleFillingImageFilter.txx"
00135 #endif
00136 
00137 #endif

Generated at Wed Mar 30 00:15:56 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000