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

itkVotingBinaryImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVotingBinaryImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-04-19 14:54:10 $
00007   Version:   $Revision: 1.7 $
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 __itkVotingBinaryImageFilter_h
00018 #define __itkVotingBinaryImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 
00023 namespace itk
00024 {
00036 template <class TInputImage, class TOutputImage>
00037 class ITK_EXPORT VotingBinaryImageFilter :
00038     public ImageToImageFilter< TInputImage, TOutputImage >
00039 {
00040 public:
00042   itkStaticConstMacro(InputImageDimension, unsigned int,
00043                       TInputImage::ImageDimension);
00044   itkStaticConstMacro(OutputImageDimension, unsigned int,
00045                       TOutputImage::ImageDimension);
00047 
00049   typedef TInputImage InputImageType;
00050   typedef TOutputImage OutputImageType;
00051 
00053   typedef VotingBinaryImageFilter Self;
00054   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00055   typedef SmartPointer<Self> Pointer;
00056   typedef SmartPointer<const Self>  ConstPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(VotingBinaryImageFilter, ImageToImageFilter);
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 
00074   itkSetMacro(Radius, InputSizeType);
00075 
00077   itkGetConstReferenceMacro(Radius, InputSizeType);
00078 
00081   itkSetMacro(BackgroundValue, InputPixelType);
00082   itkSetMacro(ForegroundValue, InputPixelType);
00084 
00087   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00088   itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
00090 
00093   itkGetConstReferenceMacro(BirthThreshold, unsigned int);
00094   itkSetMacro(BirthThreshold, unsigned int);
00096 
00099   itkGetConstReferenceMacro(SurvivalThreshold, unsigned int);
00100   itkSetMacro(SurvivalThreshold, unsigned int);
00102 
00109   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00110 
00111 #ifdef ITK_USE_CONCEPT_CHECKING
00112 
00113   itkConceptMacro(InputEqualityComparableCheck,
00114     (Concept::EqualityComparable<InputPixelType>));
00115   itkConceptMacro(IntConvertibleToInputCheck,
00116     (Concept::Convertible<int, InputPixelType>));
00117   itkConceptMacro(InputConvertibleToOutputCheck,
00118     (Concept::Convertible<InputPixelType, OutputPixelType>));
00119   itkConceptMacro(SameDimensionCheck,
00120     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00121   itkConceptMacro(InputOStreamWritableCheck,
00122     (Concept::OStreamWritable<InputPixelType>));
00123 
00125 #endif
00126 
00127 protected:
00128   VotingBinaryImageFilter();
00129   virtual ~VotingBinaryImageFilter() {}
00130   void PrintSelf(std::ostream& os, Indent indent) const;
00131 
00142   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00143                             int threadId );
00144 
00145 private:
00146   VotingBinaryImageFilter(const Self&); //purposely not implemented
00147   void operator=(const Self&); //purposely not implemented
00148 
00149   InputSizeType m_Radius;
00150 
00151   InputPixelType     m_ForegroundValue;
00152   InputPixelType     m_BackgroundValue;
00153 
00154   unsigned int       m_BirthThreshold;
00155   unsigned int       m_SurvivalThreshold;
00156 };
00157   
00158 } // end namespace itk
00159 
00160 #ifndef ITK_MANUAL_INSTANTIATION
00161 #include "itkVotingBinaryImageFilter.txx"
00162 #endif
00163 
00164 #endif
00165 

Generated at Tue Jul 29 23:48:42 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000