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: 2004/11/21 02:29:10 $
00007   Version:   $Revision: 1.4 $
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);
00046 
00048   typedef TInputImage InputImageType;
00049   typedef TOutputImage OutputImageType;
00050 
00052   typedef VotingBinaryImageFilter Self;
00053   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00054   typedef SmartPointer<Self> Pointer;
00055   typedef SmartPointer<const Self>  ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(VotingBinaryImageFilter, ImageToImageFilter);
00062   
00064   typedef typename InputImageType::PixelType InputPixelType;
00065   typedef typename OutputImageType::PixelType OutputPixelType;
00066 
00067   typedef typename InputImageType::RegionType InputImageRegionType;
00068   typedef typename OutputImageType::RegionType OutputImageRegionType;
00069 
00070   typedef typename InputImageType::SizeType InputSizeType;
00071 
00073   itkSetMacro(Radius, InputSizeType);
00074 
00076   itkGetConstReferenceMacro(Radius, InputSizeType);
00077   
00080   itkSetMacro(BackgroundValue, InputPixelType);
00081   itkSetMacro(ForegroundValue, InputPixelType);
00082 
00085   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00086   itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
00087  
00090   itkGetConstReferenceMacro(BirthThreshold, InputPixelType);
00091   itkSetMacro(BirthThreshold, InputPixelType);
00092 
00095   itkGetConstReferenceMacro(SurvivalThreshold, InputPixelType);
00096   itkSetMacro(SurvivalThreshold, InputPixelType);
00097 
00104   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00105 
00106 protected:
00107   VotingBinaryImageFilter();
00108   virtual ~VotingBinaryImageFilter() {}
00109   void PrintSelf(std::ostream& os, Indent indent) const;
00110 
00121   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00122                             int threadId );
00123 
00124 private:
00125   VotingBinaryImageFilter(const Self&); //purposely not implemented
00126   void operator=(const Self&); //purposely not implemented
00127 
00128   InputSizeType m_Radius;
00129 
00130   InputPixelType     m_ForegroundValue;
00131   InputPixelType     m_BackgroundValue;
00132 
00133   InputPixelType     m_BirthThreshold;
00134   InputPixelType     m_SurvivalThreshold;
00135 };
00136   
00137 } // end namespace itk
00138 
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkVotingBinaryImageFilter.txx"
00141 #endif
00142 
00143 #endif

Generated at Thu May 25 00:16:28 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000